Ask Slashdot: Best Way to Learn C# For Game Programming?
An anonymous reader writes So I, like many people, want to make my own game. Outside of MATLAB, Visual Basic, and LabVIEW I have no real programming experience. I initially started with Ruby, but after doing my homework decided that if I ever wanted to progress to a game that required some power, I would basically need to learn some form of C anyway. Further digging has led me to C#. The other parts of game design and theory I have covered: I have ~8 years of CAD modeling experience including Maya and Blender; I have a semiprofessional sound studio, an idie album on iTunes, and am adept at creating sound effects/music in a wide variety of programs; I'm familiar with the setbacks and frustration involved with game development — I beta tested DotA for 9ish years; I already have my game idea down on paper (RTS), including growth tables, unit types, unit states, story-lines, etc. I've been planning this out for a year or two; I will be doing this on my own time, by myself, and am prepared for it to take a couple years to finish. The reason for listing that stuff out, is that I want people to understand that I know what I'm getting myself in to, and I'm not trying to put out a not-so-subtle "help me make a game for free lol" type of post. With all of that said, where is a good place to start (i.e., recommended books) for learning C# for game programming? I am familiar with object oriented programming, so that's a little bit of help. I'm not necessarily looking for the syntax (that part is just memorization), but more for the methodology involved. If anyone also has any suggestions for other books or information that deal with game development, I would love to hear that too. I know enough to understand that I really don't know anything, but have a good foundation to build on.
Punch yourself in the face until your feet fall off.
You should just start. I'm an "expert" on game programming in C#, and the hardest thing about it is not reading slashdot.
So just do it. Use free tools so you don't spend coin on something until you are sure it's something you'll stick with.
i can't help ya, dude. but i'll take what you have so far.. for educational purposes, yeah. it's all on github rite?
Everyone I know that tried it, gave-up on it. Yes, it is harder to program in real C++, but it is necessary because C# is so damn slow. Even for the web-based payroll calculator my company created, we had to give-up on C#. It took almost three hours to generate a preview of our test company's payroll. With our old COBOL code, it only took about three minutes for our test company. Switching to C++ and to a real UNIX server instead of that Microsoft Windows garbage reduced the time to less than ten seconds. The C++ code was roughly a thousand times faster than C#. Of course that isn't a completely fair comparison since the C++ code ran on a server instead of a desktop OS like C# requires.
Udemy has 12 courses(https://www.udemy.com/courses/search/?ref=home&q=c%23) up there and they have big sales all the time. If you can get some for $10, it might be worth it.
"I say we take off, nuke the site from orbit. It's the only way to be sure."
Once you don't hear the noise, you can think. With no internet, you won't be able to cry for help and then have to work through your own problem. Don't worry about reinventing the wheel.
do the unity3d tutorials and mess around with C# in there. you get to use your 3d skills and actually make something whilst you learn
Everyone I know that tried it, gave-up on it.
Except for those people who had to target a platform that requires verifiably type-safe CIL that targets the .NET Compact Framework. Xbox Live Indie Games was this way, as was Windows Phone 7. Practically the only language that produces such bytecode is C#, as standard C++ as compiled by C++/CLI is not verifiably type-safe and IronPython requires Emit which isn't part of the Compact Framework.
the C++ code ran on a server instead of a desktop OS like C# requires.
Windows Server is a server operating system whose NT kernel is inspired by the architecture of Digital's VMS. It runs C# in the .NET Framework. FreeBSD is a server operating system. It has a port of Mono, a .NET Framework workalike, called BSD#.
Warning: this is blatantly self-promotional. It's also a pretty good answer to the question, I think, so hopefully I won't get violently modded down.
It sounds like you're exactly who Jenny Greene and I wrote Head First C# for. I played around with a lot of different ways to teach both C# language and core object oriented programming and computer science concepts, and I found that building games was easily the most satisfying way to do it.
The only way to really learn a language is writing a lot of code, and one of the biggest challenges I had putting the book together was coming up with many different projects. The answer was games: a card games, a turn-based game, arcade games -- it turns out that building a game is a great way to keep readers motivated, especially when they're learning new concepts. I've had a lot of really positive feedback from first-time programmers who found it really satisfying to get through the book, and especially building the final project (a retro Space Invaders game).
You can download a free PDF of the first three chapters of Head First C# from the O'Reilly page and see if you like it.
Building Better Software
Why C#? Develop your game in C++ using OpenGL ES for rendering. Your code will compile as-is for iOS, Android, Windows, OSX, and others. You will only need a couple hundred lines of native code (java for Android, Objective C for iOS, etc) to handle events and pass execution into your C++ code. My game engine runs on all the above platforms and 99.9% of my code is shared across all of them.
Also, these days many, many developers simply use an existing game engine and only bother with the high level code specific to their game. Mundane stuff like the low level rendering, Audio APIs (which unlike OpenGL ES, differ quite a bit from one platform to another), physics, etc, is ground that's been treaded several thousand times nowadays, and most game developers leave that stuff to the experts in the various fields to handle the nitty gritty. Optimization of those routines is usually where the "expert" part comes into play.
I work with a game designer / artist who implements all the high level game stuff in Lua, and my engine takes care of all the aforementioned "boring" stuff, freeing him up to actually develop games, and not worry about crap like polygon tessellation algorithms and tons of other very boring stuff that would just be a waste of his time.
Better known as 318230.
Like this one coursera or you could check into one of the many free game engines like these: develop-online
If your going to learn a proprietary language from scratch to program games you might as well learn Swift. Your game will perform better and be playable on more devices. Cocoa/iOS have great APIs for what your trying to do.
You start out saying that you have no real programming experience, but at the end say that you feel like you have a good foundation to build on. I think that is a contradiction. Serious game development benefits tremendously from a deep knowledge of computer science, and you are likely to struggle to accomplish much without a solid foundation in programming.
With that said, I suggest you download Unity3D and play around with it. You can do a lot purely visually, and knock yourself out with as much C# scripting as you feel like doing. In my opinion, it's both a low barrier to entry and a great option for you to quickly put together something much more than the OpenGL/DirectX equivalent of Hello World.
Disclosure: I am currently developing a cross platform MonoGame based game written in C#.
While C# may get you ahead in the business world, IMO you really need to go with something more OS-agnostic unless you're OK with limiting yourself to MS platforms. C++ (or Java... maybe) and OpenGL are the way to go IMO.
Forget C#. Start with Haskell and get a PHD in category theory and applied mathematics. Then study GHC internals for several years in order to figure out how to make Haskell fast enough for anything non trivial. Only approach game development once you have a solid understanding of GHC internals, endofunctors, lenses, monoids, monads, comonads, cofree, cofree comands, synergistic cold fusion, rankntypes, multi parameter typeclasses, string theory, functional dependencies, synthesized kinetic energy, generalized new type deriving, existential quantification, existential crisis, scoped type variables, GADTs, the space time continuum and have solved the halting problem. Also reimplement the entire standard library because the current one is terrible and horribly inefficient.
Either that or pick up any of the few dozen C++, C# or Python game development books and start reading.
I was in a similar position to you a few years ago. Wanted to code up my dream game and C# was the obvious answer. I knew C and Java at that point, so I ended up learning C# and using XNA. I'd say that it's not a bad choice these days, but Unity3d is easier. MonoGame is a good library that is the spiritual successor of XNA.
The issues of performance are an easy point to gripe about, but honestly I wouldn't worry about it too much. The advantages of a higher-level language offset the performance losses compared to C/C++. If you're going into this as a one man team, you should really focus on optimizing for development time instead of performance. You can optimize your code when you start to need it. Check out /r/gamedev there are a lot of really good people there that can help you with planning this out.
If you want to check out my project, it's at http://spacerambles.com/
you have your game...what's the first thing you're gonna need to program? (I needed a GUI for a project of mine...teaching myself python...started there) Ask google how to accomplish this. You may end up spending time in and around the stack exchange sites...and as each 'challenge' arises, you dig around and find out how to write it yourself, and in the process, slowly teach yourself c# (or any other language for that matter)...the important thing you already have, is familiarity with object oriented programming...the rest is just syntax. You're likely to get better results that way. Also as you spend your time sifting through answers on google, you'll likely come across peoples suggestions for reading or teaching etc...good school sites, sites bent on game creation and language of your choice...
There are three kinds of people in the world. Those that can count, and those that can't.
I love C#. I program in it every day. It's plenty fast, and it's a great language.
However, there are two reasons I would suggest looking to another language.
First, the hottest market for gaming right now is mobile. While it's possible to compile C# for iPhone or Android using Xamarin (along with Windows and OS X), it's not exactly a native experience.
Second, C# (like O-C, C++, etc.) is a general programming language -- it's not in any way specific to the domain of game programming. So, while it's *possible* to design complex games in any modern language, you're probably going to spend *way* too much time dealing with silly stuff like tracking graphics resources and animation loops and simulated physics. You'll have a higher chance of success if you use a language and platform that is more game-specific out of the box.
I would suggest looking into Swift -- it'll give you access to the lucrative iOS market, it's C-like, and it has features that are game-specific. Sure, it's a new language it doesn't compile to Android, but by all accounts it looks like a great language with first-class support for gaming, so you can focus less on infrastructure code and more on the game.
Another option would be HTML5. Depending what sort of game you're looking to build, Javascript and HTML5 may be just the ticket, and there are a number of libraries that can abstract away browser differences and assist with the plumbing needed to make a game run.
Might be depreciated but it's tailor made for C#. Go look it up.
For those who seek perfection there can be no rest on this side of the grave.
Pick an engine you want to use first, then pick a language to learn that is used by that engine. Very few games now are written purely in a native language with no supporting engine, so pick a modern game engine that will do a lot of the hard, low level work for you. Then, learn the language that is used for interacting with the desired engine. For example, if you wanted to use the Unity engine, then you would basic learn C#. If you wanted to use CryENGINE, then you would learn C++ and Lua scripting. If you wanted to use the Unreal4 engine, then you would learn blueprint visual scripting and C++.
Once you know the engine and language you need to use, then pick up a book, take a course, etc... There are lots of ways to learn a language, but the most important thing is to practice, especially in the environment and engine that you plan to use. Each of the engines have extensive documentation on how to program for their engine and interact with the game assets.
http://gameprogrammingpatterns...
This site takes a subset of the "Gang of Four" patterns and explains how and why to use them in your games.
You'll especially enjoy the command pattern which will be heavily used in an RPGSgame.
Cwm, fjord-bank glyphs vext quiz
The best way is to make games first, then see what language do you need later. Most games do not even need something such as C# and what might seem as " more powerful" can also be seem as "more wasted time doing something more complex than needed".
(Currently a CS undergrad with a deep love of games. Highly inexperienced, but I hope you'll find something useful here)
I understand some of the problems with wanting to make your own game. That you've chosen a language is a big first step. I can only assume you've decided not to go with a game engine like Unity3d and you have your reasons for that.
So I'd suggest this old book that I really like, it's called The Black Art of 3D Game Programming. http://amzn.com/1571690042 It's from 1995 but a lot of the basics are still the same. You just have to take it as a mini-primer. There's plenty of good information there if you're willing to dig through it.
There's a lot of other books that will get you going with a basic understanding of what the game engine is going to need. Basically, you need to handle graphics, sound, events, user interface and probably networking.
How you build those is really up to you.
There's a book I have heard good things about but I never have the money or opportunity to look at it: Game Coding Complete http://amzn.com/1133776574
I suggest trying that. Don't worry if the code in it isn't written in C#. If you pick up a little C or C++, translating it to anything (java, javascript, python, or c#) is really trivial.
Good luck!
My advice, as a professional game developer, is "don't write code unless you need to."
If you must write C# you should take a look at Unity, but honestly you would be remiss if you overlooked Unreal 4. It is the newest version of the Unreal Engine, and it includes most of the most important features of a game; behavior trees, navigation, user interface, physically-based rendering, animation state machines, multiplayer replication, etc. You can do most of what you want to in Blueprint (a visual scripting language), and if you really need to, you can edit the source code (the license is a full-source license) and make what enhancements you need in C++.
Writing most of this shit from scratch will take you years, just get down to the actual MAKING of the game, and use someone else's engine. The terms are fair ($20/mo, 5% gross revenue for PC platforms and mobile), and the engine is extremely well curated.
Let's get this straight. You have no programming experience and you want to make games. Well, I am a fat 42 year old without a drivers licence but I would like to become an F1 driver. We can all dream, but I am not going to post a question in F1 Magazine asking for advice on how to get signed up by a team.
These days games are made by production companies. They have huge resources and budgets. This is a good thing. It means that the games are better than you would get from one guy sitting at home. No matter what language you use, you are never going to come up with a competitor to Gran Turismo or GTA et al. by yourself. Whole teams work on these projects for years. Even Jon Skeet could not do this.
"Typical examples of commercial licensees include device manufacturers embedding Mono in hardware where the user is not able to independently upgrade the Mono virtual machine from the source code"
This rules out Android and iOS. Unity has a free version but also has restrictions:
Unity Free, which include the free platform add-on products, may not be licensed or used by a commercial entity with annual gross revenues (based on prior fiscal year) in excess of US$100,000, or by an educational, academic, non-profit or government entity with a total annual budget for the entire entity (based on prior fiscal year) in excess of US$100,000.
So, again, make sure you are doing your research well, because you might end up in an unexpected situation.
Then what are they built in? I've been wondering this because of a lot of stories and anecdotes about quickly built games, hackathons, etc. Is there some sort of "game builder" software that everyone uses, an update of RPGmaker that's actually useful, or...? Having been programming for 30+ years, I haven't seen any programming that is as easy as these hackathons or makerfaires seem to imply it is.
I think it's interesting that you know Visual Basic, but want to get into C#. My first question would be "Why?". Both run on the same framework and both are equally capable. All you're doing is learning new syntax to do things you already know how to do. After that question is the comment "You pretty much already know C#". Sure, it's a different language from VB, but that's the easy part. It uses the same tools and libraries, so you know 95% of it already.
Get howto program Linux games, and get a copy of the OpenGL spec. That's about all you need. It tells you howto setup the engine for proper operation. Swap out the 2D renderer from the book with a 3D renderer you write yourself. Simple enough.
Making your own game isn't kid stuff. You've got to be prepared to take on a professional mindset when you are using professional tools, otherwise your efforts will be hurt (the whole affair will be a waste of life, you'll build false confidence by using the wrong skills, etc.)
Here's a clue: programming language does not matter at all. The purpose of learning your first programming language is not to know the language, but to gain competency in expressing your thoughts in computer-interpretable written language through practicing writing in this language. All the major programming languages are the same exact thing, C, made with different ideas about what makes pleasant syntax and what 'extra features' are needed for modern code-writing. They all decide on pretty much the same thing.
That being said, if you really want to be pro, you'll do all the work you can in C++. All the languages are basically the same, but C++ is slightly better in several ways.
C++ will always be the best text-based interpreted programming language. It's lean, mean and everyone uses it. Java is proprietary bullshit, a dinovampire that should have had a stake through its heart 20 years ago. C# is the same thing but younger and from Microsoft. C is a dead language, the only use is writing for old hardware. Lisp and all the other gimmicky languages should never have been created. Python is trash. Fuck everyone who uses that shit.
Screw C#. Learn C++ like a man, or if thats too "hard" for you, use something like Unreal Engine and let someone smarter than you do the heavy lifting.
Surprisingly enough, there is. A lot of game developers use GameMaker to prototype games. But some of them are good enough to be published on Steam straight out of Gamemaker. And it's simple enough that my 11-yr old has been using it for his own game.
Disclaimer: my former prof built it.
There's also Unity3D.
These tools take away a lot of details that used to be 80% of the work, and leave you to work on the *game*, as opposed to rendering the screen without tearing or trying to get the audiobuffer to play without clipping, or... etc.
Therefore, by the (faulty) logic you're using, you're just a cow with a keyboard - osu-neko (2604)
Unless you want to be locked in to MS? Learn, any of the things that also work on iOS and Android and you may actually end up with an useful skill.
Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
The fact that you're not already coding and Ruby couldn't hold your interest makes me wonder exactly what you want to do and why.
If you plan to learn to code mainly as a necessary step towards creating your dream RTS then I hate to piss on your fireworks, but you're wasting your time. It's just way too much dang work and frustration for something you don't find interesting and exciting in and of itself.
If I got the wrong idea and you do find coding interesting, forget about the RTS for a while and just worry about getting good at the basics.
I've messed around with various languages. Save yourself the time and trouble and go with C++. You will undoubtedly run into road blocks with C#. C++ is the king!
The reason for listing that stuff out, is that I want people to understand that I know what I'm getting myself in to, and I'm not trying to put out a not-so-subtle "help me make a game for free lol" type of post
I'm sorry, but your long list of "I did this and that" means only that you are a gamer with a few artistic skills, it has absolutely no value for game programming !
During my 18 years of game programming, I met a lot of people that had "wonderful" ideas (it's funny how everybody has a dream game), but no skill to realize them.
They always boasted about the fact that their idea was great, but their project never got released.
Writing a game requires the following skills:
1) technical skill: coding
2) art skill: graphics/animation and sound/music
3) gameplay skill: making the game enjoyable
4) story telling: making a coherent game's universe
In my life, I never met a single person with all of these skills, at a decent level.
The most talented ones had only 2 skills.
Firstly, before coding your dream game, try to write a very simple game. It will show you where you'll need help.
If you are a beginner, you won't be able to code Starcraft.
Try something related to your project, so you can increase your knowledge.
Secondly, since most of the CPU power is spent on display and AI, you'll need to learn:
1) how to optimize the display.
Since the whole screen needs to be redrawn very frequently, you have to learn techniques to render fast.
There are tons of techniques in 2D and 3D.
2) AI algorithms, most notably path-finding algorithms if you want to program a RTS.
Thirdly, try to build a prototype in one month.
If you are able to build it in one month, you'll probably be able to work on your project during several months.
It will also show that you don't lose yourself on details (non-professionals tend to waste their time on small details, thus the final goal disappears).
If you are unable to build it in one month, it means that your project is not well defined, probably too ambitious or completely unrealizable.
Fourthly, I would recommend to build a motivated team around your game.
This is a virtuous circle: when your motivation will decrease, they'll encourage you and when they'll get demotivated, you'll encourage them.
Nowadays, I believe that it's impossible to write a game alone, unless your game is very simple.
Find people who believe in your project and who may help you.
By not using an engine, and writing it from scratch you may be wasting time you'd otherwise be spending on actual game content.
If you want to actually make a game, rather than learn some language you should check out ready-made engines, for example http://springrts.com/wiki/About or any of the dozens RTS engines out there.
Don't learn C# for game programming. None of the major engines use it. Learn C++
That's directly from one of the game designers of Ghosts.
I once spent ~6 months making an RTS in C# and it was quite hard, but I had the basics - shooting tanks, pathfinding, economy, 3d maps. I did it in XNA with the help of Riemers tutorials.
These days, monogame is now 'the C# way' of writing games. As a bonus you get multiple device support, but the the thing that is good for you is it's very like XNA, which until recently was the best choice, so all of the XNA tutorials still have relevance for you.
Unless you are making a simple game, C# is not going to cut it. If you are making C&C1, then it will be ok, but if you plan to make Supreme Commander then you will need C++ for performance reasons. Still, you could get it up to a certain level with C#.
I am a (perhaps obsessively) massive fan of the RTS Supreme Commander Forged Alliance and play daily on FaForever.com. In my mind the game is a technical marvel and recently I have come to understand how it is built, which may interest you. All of the hardcore processing is done in C++ (physics, pathfinding, 3D) and all of the game logic (eco, unit definitions, is a building finished, what can a unit do, ui) is done in LUA, which is like javascript. All of the LUA files are included in the game so you can see how they do things, but you can also edit it and change it. In fact you can rip all of the content out of the game and replace it with your own models, sounds, bitmaps, units, logic and behaviors. I think this could be interesting for you because you could actually implement your entire game now using their engine (it's called the moho engine) which would get your game up and running instantly (without having to spend 1 month just to get pathfinding working). You could never sell it this way, but in terms or rapid prototyping it's a great idea.
I'm not sure if you've thought about it but you will be a) building a game engine and b) building a game that uses it. The first step involves crazy headaches and frankly, a level of programming that most developers never achieve. Why not skip it?
Do Not try to write your own engine. look for an engine with favorable licensing terms, good features, and a scripting language you are comfortable with.
unity3D is written in optimized C and has scripting hooks in mono C#, plenty of options and plugins.
http://unity3d.com/unity/licenses
I started by working with the Quake 3 engine and seeing what I could do to it. I wound up modifying the guns by adding new firing modes, modifying how the camera a little and learned how to add effects to the game.
Then I messed around with the trigger editor in Starcraft.
Then I messed around with the trigger editor in Warcraft 3 and made a lot more complex things, including implementing the character progression system from a single game from a popular Japanese RPG series -- which shall remain nameless -- in a tower defense map. (It was an awesome-bad project.)
What did I find? This taught me the basics of game programming as well as a lot of about algorithms. It made me a better programmer. Then I made some Starcraft 2 maps, one of which was a port of a Warcraft 3 map. Then I said fuck this, and took the RPG I started in Warcraft 3, moved to Starcraft 2, and I now have a 2D RPG game engine written from scratch for PC that is well beyond the progress of either of the maps it came from. I would argue you don't learn to program games in a language. You just learn the paradigms used to make a game work, and then apply that to a language. You want to learn? Do it. Books may help if you get stuck along the way, but do yourself a favor and stick to libraries if they exist. No one wants to draw their own fonts or write a PNG loader.
Although yes, you may learn some more about the language you're using along the way. I learned a lot about C++. Try to stick with learning to do things The Right Way (tm) and you will surprise yourself with what you learn. For the record, I wrote my own game engine because I wanted to learn how to do that. I sometimes wonder if I should have used a ready-made engine but the learning experience is massive, although I don't recommend it for everyone. I am quite insane.
Hi, I worked on big budget FPS games as a technical designer for 7 years, and went indie about six months ago, and am currently working on two funded projects.
Unreal 4 costs $20 for a license with all source code. It includes C++ example projects for every major game type (FPS, Top-down, platformer, etc.), plus a metric shit-ton of free supporting assets and shaders.
If I knew all the things you know, but had the hole in my knowledge you describe, UE4 is the very first place I would head to.
C# is a pretty great choice for game development these days. My suggestion would be to go with Unity, especially if you're learning. The environment handles a LOT of the base stuff needed for creating a game that would usually take up a bunch of your development time. There's also a huge community so it's very easy to google anything you get stuck on and find an answer easily. (very important for learning any new language or system) Obviously there is a cost for a Unity license but if you value your time and the time you will save then in my experience it balances out very easily.
You might hear a bit about C# not having the performance needed for games (and to go with C++) but that's not really the case anymore. (and this is coming from a C++ programmer) I was quite surprised when I actually started using C# for development, it's fast enough for anything I've thrown at it. C# is a pretty nice language to use too.
An RTS is pretty difficult and you should make sure you're really up to scratch with proper inheritance technique, when to use composition vs inheritance, factory pattern (really simple in C#), state machines (Unity has 'co-routines' that simplify this greatly), observer pattern (C# delegates etc.). You'll need pathfinding and some reasonably good AI as well. Also don't underestimate the sheer amount of UI code that will be needed.
If you want multiplayer then know that is a HUGE can of worms and there is relatively few resources on the net for game networking, even less so for the techniques needed for a RTS. If you really want to go down that path you'll have to suck it up and dedicate a couple of months to getting a basic system going before you get too deep in the rest of the game. Shoe-horning in networking late in development is a lot of hassle. (I've worked on a large commercial game where the powers that be decided that should happen, can't recommend)
If you really want to get the project finished I would suggest just picking a simple small goal (one unit moving in a level) and really slowly work your way up. It can be very hard to solo develop a large project so you need achievable goals along the way to keep your own momentum up. Plenty of people will probably say it's too much work (and it kinda is...) but it is still possible, just really really hard.
Me - 20 years in game development with different languages (mostly C++ but now mostly C#) on range of projects from AAA console to solo indie releases. Anon coward because I hate creating accounts everywhere on the net.
Other people have suggested how to learn the basics of a language, so I'll ignore that problem.
Designing and writing good code is an art form. There are many anti-patterns you may fall into that could doom your project that a more experienced developer can help you avoid.
A couple hours a week spent explaining your design before you start writing code, or helping to track down why your code doesn't work as expected, or reviewing the code you believe is finished, will save you days of wasted effort.
Structure your code so that you can write automated tests to cover *everything*. It will seem like a pain to start with. But once your project picks up speed, it will be invaluable to ensure you never break something that you know already works. Tracking down bugs in old code is painful.
If you do this right, you will get into the habit of writing the tests first, or along side the code you are writing. You will find that you rarely run the code as a user would, because that just wastes time. And when you do finally run the code as a user, it just works.
09F91102 no, 455FE104 nope, F190A1E8 uh-uh, 7A5F8A09 that's not it, C87294CE no. Ah! 452F6E403CDF10714E41DFAA257D313F.
As someone who has been coding non-professionally for 20+ years as mostly a hobby (though I have developed a few apps to make my life easier at work) here is my advice:
I started coding as a kid with QuickBasic, them moved on to VisualBasic (pre .NET), did some x86 assembly too. Back then I tried and tried to learn C/C++ over the years but never really liked it for some reason. I finally started with VB.Net 10 years ago. Initially I found it hard to make the move to .NET, but grew to really like it's power, bells and whistles. I didn't code for a few years, but did tinker around with PHP/Javascript which is a C-like syntax. This forced me into getting used to such simple things like brace brackets, semi-colons, etc, and I began to really like finding that switching back to the VB syntax was a bit of a pain (I kept adding those damn semi-colons at the end of each line!!!)
About 5-6 years ago I finally started to make the switch to C#. I started with re-writing an app entirely in C# (previous version was in VB.NET). This allowed me to translate/transfer my knowledge to a new syntax as they are both very similar thanks to the CLI. Eventually I had completely moved over to C# and was loving it. Over the last few years I have been into programming in C/C++ for the Arduino/Atmega, which has taught me a huge amount about embedded programming and mostly how C/C++ manages memory (gotta love pointers). Nothing (except maybe assembly) forces you to understand memory management like coding in C/C++. I am by no means an advanced C/C++ coder, but I am getting stronger every day and love just how much control I have with it!
Now my actual advice:
Start with C/C++ because in my opinion it's the hardest to master and teaches you the 'nitty gritty' of coding without all the crutches of the other language like garbage collectors, type safety, exception handling, and fancy libraries. If you can learn to code in C, or more specifically C++ you will be able to learn anything easy. But do it the other way and you may struggle due to bad habits and crutches the other languages teach you! I wished I had started out with C/C++ way back when, however hindsight is always 20/20!
C# is a multi-paradigm object-oriented programming language designed to totally lock you into Microsoft dot.NET ..
H1B and the will to work 60-80 hours a week with no OT pay.
And you just need to be a sub par coder as well.
C# is one of the worst inventions in Computer Science history, you're better off using C and a graphics library.
As a game developer, I would suggest giving Unity3D a try. I've used it for a few years now for commercial and personal projects, and it's been great.
You get a visual editor to compose your scene, you can program in C# or Java, it handles 2D and 3D equally well now, and it supports building for all platforms you would care to deploy to. Building a game engine from scratch will be a waste of your time, so use a tool designed to build games that doesn't sacrifice any of the power you're looking for.
Google.
I'm 100% serious. I learned C# that way and wound up writing the application code for a product that sells for about 5 million a year.
Here is your task, since you're interested in making games. Make a game of pong in C#. Use Google to look up how to do it. Start with a hello world program. Then make a program with a form. Then figure out how to paint to it. Keep going.
At the end of the pong game you'll know enough to be dangerous. Good luck!
Weaselmancer
rediculous.
Then understand those people are your customers.
After that you won't want to make a game any more.
Try Beginning Game Programming with C#
About the Course
The Beginning Game Programming with C# course is all about learning how to develop video games using the C# programming language. Why use C# instead of C++, Java, ActionScript, or some other programming language you may have heard of? First, using C# lets us use the Microsoft XNA and open-source MonoGame frameworks, which help us quickly develop games for Windows, Android, iOS, Mac OS, and others. Second, the Unity game engine is very popular with indie game developers, and C# is one of the programming languages you can use in the Unity environment. And finally, C# is a really good language for learning how to program.
It's your call, if you want to tie your future to Microsoft that's your business, personally when it comes to languages I look at the ones that give me the widest audience.
It doesn't sound like you're a finisher. What is your motivation?
Since you beta tested a game for 9 years... and you're only digging into programming now. What is going to keep you working hard at learning code, language, environment? Make clear goals for yourself, and understand that it is only the long-term achievement ("I want to get a job in this") that keeps you focussed on the short-term achievements.
If you're going to plan for a year... realise you don't know enough to know what you're doing. So tackle that first, build a demo in what you do know - even flash - in as short a time as possible. Get feedback from someone you trust and knows their gaming arse from their elbow, and learn technicalities in parallel. Also read around working in teams, and find people who you can ping ideas off or technical discussion to shorten your learning cycle.
By the time you do know what you're doing, you can plan more a priori and learn to plan in the large so you're not sensitive to details, and have more flex. That could buy you back more than a year on a multi-year project.
C# is a private language. Private. It was designed as a response to real languages. It offers nothing that real languages offer, except that some members of a private fan club (and employed by a particular company) want their group to use it so that its incompatible with everything else. As for games, see what other games have been written in, and use that. Unless of course, you want to be limited to a single platform that someone can pull the plug on at any time without notice. Go as the .net developers. Ask them about the community. How happy are they? How much did they pay for training and manuals and updates? Ask them if they remember exactly when the rug got pulled out from under them, not unlike the death of a parent or life altering car accident.
If yes, learn C#. I'm sure your game will get noticed on .... maybe Windows CE. Or however they call embedded Windows this week. On Windows, not so much since all the AAA call of honor of duty games are available.
Otherwise, learn something that would be useful on more than Windows.
It's free. It's fun and there is a large community of people doing tutorials and videos and answering questions.
Just dive in.
I was thrown into the deep end with C# best way to learn it is to do it, that should be a no shit for anyone who has written in any language ever
programming a game however requires a totally different way of thinking about the problem at hand, and it doesnt matter the language, its the methodology of writing a game, just like writing a db app is different from writing a website
quit asking dumb questions, its a new to you language, do what you can and figure it out, god knows there's enough resources out there that even a non programmer like me can barf out fairly complex systems by basic programming structure + a bit of google within an hour.
Let alone a bazillion XNA articles to make your game even though for some odd reason you think that the game is made by the underlying language and not the gameplay formulas involved, which usually best suit pencil and paper
Settle down there buddy. Making something small and simple in scope. It's your first game - it's going to suck.
You can learn C from basics with CS50 online free course. Google it.
Also sign up at Coursera. They have a course titled "Beginning Game Programming with C#" taught by the University of Colorado. The course also teaches basic C# syntax, so it's very beginner friendly. You just have to wait for it to be offered again before signing up.
I love all the comments about not trying too hard or reaching too far.
I say go for it! I've written parts of my dream game at least 3 times. It didn't hurt me, it didn't discourage me, it was fun to realize at least part of my dream.
If I were in the OP's position, I would decompose it into small pieces and work on the small pieces.
The worst case scenario is you wasted some time learning a shit ton of stuff about writing a game, programming and the platform you're working on.
http://www.gamedev.net/
It will be more useful to learn C++ well for your programming career, no matter where it takes you.
But you need to get really good at it.
If you really want to learn to program games, start with Lua instead of C# or C++. It's a tiny little scripting language that can be learnt in a few hours and is used by an enormous number of game development companies. Lua is often tasked with providing a UI for the game, logic flow, rapid prototyping of features, anything really except for the critical loops - which are all handled in C++.
Once you have Lua under your belt you should learn C++, because at the heart this is what all performance sensitive games are written in. The game engine will be a mess of tight, sometimes obscure C++. If you want to make changes that are at that level then you absolutely need to be able to write C++.
Finally, think about learning C# if it's supported by the game engine you have chosen to use for your game. It should perform about the same speed as the Lua code and it's used for the same tasks - game logic, etc.
Since you're a beginner, I'd recommend you go with either Unity or Unreal Engine as these are both easier to learn and have a lot more community support. Unreal Engine now comes with the complete source code in C++, so you can take a solid look under the hood and see what's happening in there. CryEngine is moving towards releasing more of their source code, but are not there yet.
Really your first question should be which language to learn, but which engine to learn. The engine will dictate which languages you need to learn from there.
All those moments will be lost in time, like tears in rain.
I initially started with Ruby, but after doing my homework decided that if I ever wanted to progress to a game that required some power, I would basically need to learn some form of C anyway. Further digging has led me to C#.
C# is basically Java with some enhancements and differences. It does not have much relation to C.
Anyway, C# is a good choice if you are going to use a framework like Unity that supports it. If you are not, make the choice based on what platform you want to make games to. Java might be a better option than C# in that case, as Android supports Java. Lack of operator overloading does hurt a bit when making lots of vector calculations, though.
Hi I think this course is perfect for you. https://www.coursera.org/cours... Regards
Not specifically for game creation, but I've seen a few people mention mono on this thread.
The last time I was doing any serious .NET programming (VB, not C#) was several years ago and mono was in its infancy. One of the biggest drawbacks to using .NET at the time was that it pretty much made your application windows only.
Has mono come far enough that this is no longer true? With respect to games or really any .NET app?
You have a more important problem than which language to chose. The most striking thing about your post is it sounds like you have grand designs for a game (your first game) and that's a bad thing. What you are doing is what almost every new game developer attempts to do... or at least thinks about: going in too big, running before you can walk, building a supersonic jet before you've built your first paper plane etc etc...
Sure you have programming experience and sound design and 3D modeling experience. But when you made your first 3D model did you create a masterpiece with immense detail? or just randomly poke around vertices of an abstract nurb? It's easy to get carried away having big plans for a big game, but you are one person, and you haven't? made your first game yet. You will fail in one way or another, so fail on something small first, then build up to your big idea (which will almost definitely change after you get your feet wet and get a sense of how practical the original ideas were).
Even just pick a small part of the big game that you envision... something so small that it should not take long to build (but it will take longer than you think), don't flesh it out, don't get carried away with detail, focus on a basic concept and see how far you get, this is how you learn: iterate. Wanting to have everything you imagine in your game is easy, deciding what you can have and what is more important is what you will learn.
Also something that might bias your choice of language, is that you will have to decide how much you want to build from scratch and how much 3rd party code you want to use, i.e in terms of engines. If you have very little interest in the physics engines and graphics engines behind games then you will have the task of choosing from the vast range of readily available ones. Not only does that sway your choice of language but it also sets you on a different path of learning, you have to learn how to use someone elses engine rather than learn how to write your own. Using someone else will give you more capability but less creative freedom and insight into how things really work, and could limit you to particular languages.
Hasn't anyone noticed that? Rithet there in the right up? C# is more like Java. Either that is a typo or the poster is clueless. So what what does the poster really want, a C# like language or a C/C++/Objective C type language?
putting the 'B' in LGBTQ+
OpenRA is an RTS written in C#. Study it's code for a while, see what you like and what you don't.
Lastly, there's a "game" you can buy through Steam - called GTGD (Gamer to Game Developer) - some Aussie walks through creating a first person shooter with teams and multiple weapons. There's a S1 and S2 and after about 12 or so of the videos (out of 20+ in S1) I had enough to start programming my own game. He's writing it all in c# and explains the code decently.
Use Unreal Engine 4. No programming necessary. In fact all that problem solving and creating algorithms part is still there you only do it visually with "Blueprints" by connecting nodes to each other. And it's way polished and advanced than it sounds. You have interfaces/inheritance in blueprints. Some thing you can't do with blueprints? Write a blueprint node for it in c++.
It's also alot cheaper than Unity.
You'll probably want to pick up a framework that will provide a game engine or the tools to make your own. Why reinvent the wheel? If you're looking to stick with c# try Unity. Many popular games are written, or prototyped, in Unity. Unity is a game engine, and game making tool set, that will allow you to relatively easily make a playable piece of software. The only drawbacks for Unity are it costs money and has less flexibility; if you don't pay for it they display a 2-3 second ad at the start of your game and if you wanted to implement some quirky new mechanic into your game it may be more difficult than if you had also written the engine. Xamarin is another option, but it is also not cheap.
There are frameworks out there for making your own engine. The one I like is Libgdx, it is fast, free, and easy to use (its in Java but knowing C# that shouldn't matter). This also comes with Box2d, which I would highly recommend if you ever make a physics based game, or just wanna add realistic physics to any game. Box2d is used in many of the most successful mobile games: Angry Birds, Limbo, Tiny Wings... (You will be amazed at how little effort went into the Angry Birds code after using Box2d).
I would start with tutorials on Libgdx from youtube, my favorite are by a guy named dermetfan (links at the bottom). He covers everything you will need to know to start making a game with Libgdx and Box2d. This will help get an idea of what it takes to implement various mechanics in your game.
The most common advice I have heard for people trying to start making games is: reduce your scope. "Take the really awesome idea that you have, cut it in half, now cut that in half again, now it might be possible for you to make that in less than a year." Your first game cannot be the idea that made you wanna start making games, or else you will get frustrated and abandon game dev all together. Never start with 3d or multiplayer. Baby steps. Create really simple things that just demonstrate certain mechanics. Or my favorite, clone other games. Make a clone of tetris, or Angry Birds :) I usually pick old atari games.
Here are some links you may find helpful. Since you are most interested in methodology watch the talks given by Jonathan Blow and Will Wright, they contain better advice than I could ever give.
These talks by Jonathan Blow are a must watch for anyone interested in making games. In here he talks about the methodology and general mind set you should have about making a game on your own. Key advice includes, 'your biggest enemy is early optimization', 'quickly implemented specific systems, are often better than general systems', 'as an independent developer dont try to make a AAA game, make an indie game'
How to program independent game - by Jonathan Blow
Indie Prototyping - by Jonathan Blow
The Implementation of Rewind in Braid - by Jonathan Blow
Game Design - by Will Wright
The Theory of Fun (must read!)
Dermetfan Libgdx Tutorials
iForce2d Box2d Turorials
Open Game Art
Indie Game the movie (for inspiration)
Sup Holmes (awesome interviews with indie game devs)
If you want, there a lot of resources on Monogames. It's basically the XNA 4.0 framework. It's pretty easy to find pdfs of XNA 4.0 books. http://it-ebooks.info/book/439/ is a good one.
You'll have to figure out the content pipeline, and learning how to compile shaders is a pain, but there is online material that can help you with that.
That is the only "methodology" you need to use in order to save your sanity.
Gaming power of the iphone lol
If you want to make DotA then you are in for a long haul. It's not as simple as understanding how the game works, you need to know the underlying mathematics of how it all works. Remember in a computer it's all numbers, there is no magic move unit up, it is all add 5 to xPos of object 015Bh. Then you get into the complicated 3D stuff, this includes shaders, meshes, possibly bone manipulation. That is after you decide which you would rather use Direct X, OpenGL. Don't forget to implement intersection and clipping detection. If it renders slow it is unlikely that you will get much of a following. .net are rather primitive if they even exist.
Don't forget sound, and how to implement movement controls (please remember key mapping, as it is rather annoying for the rest of us if you forget it.)
Now that you got all of that, you get to figure out how to attack another unit, oh this part gets fun as you need to optimize your algorithms so that you do not need to check every unit to see if it was damaged for each unit doing damage, and this sucks because if you do it wrong you will have to impose some serious limitations to the number of units.
How do you plan to save your data, what file format(s) are you going to use? Do you use encryption, compression, are you going to use a master data file like Blizzard, or just leave everything open, to make moding easier? Is it all binary or plaintext, you might need to write an efficient parser depending on your decision here.
Next is Networking, you will need to code up a server, this should be fairly easy after you have everything else down, unless you want a scalable server E.g. do you plan on having over a couple hundred people playing at a time? If you want to support a million connections at once you are going to need to write a good server, don't forget the chat interface.
And before you can even do this you need your artist, are you making all of the art and sounds your self?
What platform are you planing to code for Windows, MAC, Linux, Xbox, PlayStation, iPhone, Android, etc... Each is different, I'm assuming since your using C# it is Windows or Xbox, as other implementations of
and lastly don't forget hosting
How do you plan on funding this? Are you paying everyone helping? Who's paying for the host server?
Game development seems easy and fun until you actually have to consider all of this, the idea is easy, but if you actually want to build it then you need a bit more. All of this can be learned online via tuts, free books, and/or free/cheap classes. But don't expect to be done this year, or even within 5 years, at least not if your making it yourself. A real formal CS education will really help you, but don't expect it to be as easy as dreaming up a game, you need real dedication for this, think beyond Calculus type dedication.
What about learning Java instead? It's free and it has free frameworks and IDEs too!
Yes c#!! It's the main scripting language for the unity game engine which has a basic version that is free. I've been learning it for a year and compared to many things out there is phenomenally user friendly and has a great online community that can walk you through just about everything and provide piles of sample code for free. Especially if you want to make an rts, look for the a* path finding project which provides all the basic navigation functionality for your ai. Google - unity rts and there are several projects that are already done and free to use that you can learn by tweaking. Unity!!!
http://kickass.to/head-first-c...
Casteism
My six year old son spends a lot of time on this learning-to-code site. I think his kindergarten teacher introduced him to it. It's probably the best thing I've ever seen for teaching kids coding.
Click on a starter project. Click the green flag to run the program. Click "See Inside" to look at the code in their editor. It's visual, easy to read, and quite elegant.
It really is a completely fantastic site. Brilliantly done.
scratch.mit.edu
Weaselmancer
rediculous.
Hey! I'm a game designer who also has moderate programming experience, but am in the same boat as you. Recently I taught myself Playmaker- a visual scripting tool for Unity. It is similar to Unreal's blueprints, and it really makes it easy to create a game without too much programming knowledge. Basically it has all the basic scripts you need, and you just attach them to your game objects. The logic becomes easy because it's all visually represented. I definitely recommend you learn a visual scripting tool and this will allow you to also learn a bit of C# since you can create your own custom scripts.
All the best,
m3ndi3
Mike Murach C#
You'll want his books, I've been with them since they were used as textbooks in schools where I learned programming, systems analysis, etc. His method is based on the psychology of learning, you get a whole overview ch. 1, fleshed-out skeleton of parts by ch. 2 when you begin coding, rest of ch. #'s expand on skeleton parts; detail info is well organized in tables, not scattered everywhere: http://www.murach.com/books/
So I, like many people, want to make my own game. Outside of MATLAB, Visual Basic, and LabVIEW I have no real programming experience. I initially started with Ruby, but after doing my homework decided that if I ever wanted to progress to a game that required some power, I would basically need to learn some form of C anyway. Further digging has led me to C#. The other parts of game design and theory I have covered: I have ~8 years of CAD modeling experience including Maya and Blender; I have a semiprofessional sound studio, an idie album on iTunes, and am adept at creating sound effects/music in a wide variety of programs; I'm familiar with the setbacks and frustration involved with game development — I beta tested DotA for 9ish years; I already have my game idea down on paper (RTS), including growth tables, unit types, unit states, story-lines, etc. I've been planning this out for a year or two; I will be doing this on my own time, by myself, and am prepared for it to take a couple years to finish
I don't have any gaming programming experience and a lot less programming experience than you do already.
You mentioned a lot of details but failed to mention if you'll be targeting a particular platform. For instance: will you release you game for sale/free? Is a mobile version ever a possibility? Will you release it for the "Windows Store"? Steam? Both? Neither? Is this just a hobbie no one else will ever see? A resume bullet point?
Anyway, speaking not as somebody who has done what your describing but merely as someone who did a lot of research into it I would say go to steam and filter the game list to only "Strategy - RTS" genre and start looking at the ones with both an extensive map editors/mod creator and a fairly large community. Try a few out. Pick a favorite. Make sure it's something you can stick with because it will be consuming thousands of hours of your life. This will probably work better if it's a game you're not that familiar with. Thus your learning the game creation bit along side the actual editor/scripting/programming end of it.
Then at least get a version of your game up and going/playable. After creating the most polished version of your laid out game in your engine of choice if you still want to build an engine from scratch with it...well best of luck to you.
"UNIX is very simple, it just needs a genius to understand its simplicity." -Dennis Ritchie
Riemer Grootjans has some pretty decent DirectX tutorials if you want to go that way:
http://www.riemers.net/eng/Tutorials/DirectX/Csharp/series1.php
Mobile Vo Lam is based on the story of the late Kim dynasty, famine raging across the country, puts Disorders harassed everywhere. Ethnic Man Outside visual intrigue invaded territory. Inside the busy military power competition no longer worry about her own life essence, more black people pushed into poverty and suffering misery, food robbed, exploited wealth from taxation. During that time the factions also gradually create hinhthanh many Vo Lam Mobile in 03 major power including: + The mission: This sect was formed by three main sects: Shaolin, My Russia, Wudang + Neutrality: including his account of the sect 3: Uranus, trails, Thuy Yen. + I must: is the set of the heroes of the sect 3: Christian forbearance, Doc Ngu, Ming Church. Map Vo lam mobile Every great power on a local, they have said that only they can help spread misery nature from catastrophe. 3 This power is growing stronger. That power increasing peak. And everyone wants to eliminate the remaining forces and become an independent Vo Lam Mobile. And what is to come, a forest can not have two tigers. Competition is becoming increasingly fierce and intense. The skirmish escalated to the level of the head of the 3 forces declare: "No Friends could also be to the left side" and the battle between the forces 3 becomes ever more stressful, the power of this artist's implacable determination to fight, attended by other factions became fierce than ever. Download Mobile Vo Lam (The program automatically detect the phone) Or write: TG 525 190 6086 posts
I suggest you look at using D instead. It is as powerful and efficient as C++, syntactically very similar to C#, and can link C++ libraries.
The main benefit this provides (apart from performance) is that it will be much easier to do a cross-platform release - although C# has Mono, I've found it to be unreliable.
That said, D is somewhat obscure, so caveat emptor.
Most human behaviour can be explained in terms of identity.
As the title says, start with Unity. It's amazingly simple, powerful and can be an amazing C# tool while also allowing you to use javascript.