Quick question: I've been in the web-dev world for several years now, I've wrapped my head around Java, Python, PHP, C# and Ruby- and currently make my living as a C#.NET programmer and I want to learn game development for real, no "build your own 2d sprite game over 14 days"-bs, the real deal. Where do I start? learning C? learning C++? Assembler? I've tried searching the net but most things I find is just tutorials of the "build something quick but don't really learn anything"-type.
I am well aware that this is a huge endeavor, yes - but my current realm of problems (the web side of things) is not giving me anymore challenges, or at least challenges that can't be answered by five minutes of searching on google or a question on stack overflow. I need to teach myself something, anyway: My long term goal (several years) is to build a simple 3d engine and create a simple game within it.
So where do I start? I know basically nothing about gaming programing, I've done my fair share of threading and networking in both python and java, but I know nothing of graphics or sound programming, Direct X, OpenGL, etc. and I'm pretty lost on what platform (Windows/Linux) to start, which language to teach myself, etc.
I suppose a long term pipe dream would be to get employed as a network programmer or graphics programmer at a game development company, but I'm aware that is many, many, many years away.
Right now I'm looking for advice on this:
And let me repeat, I'm aware of how huge this is - but I need to learn, or I get boored.
UPDATE - Jan 22nd, 2012 This answer, despite being over 3 years old, still gets a lot of traffic. In the years since I wrote this up, Smartphones and Tablets have become an altogether NEW platform for low-cost entry into making games. While the thoughts below are mostly relevant regardless of platform, Smartphone and Tablet development was not considered, and if you're a programmer looking to get into game design, Smartphone and Tablet games are definitely an option for you to consider.
I'm going to answer with two different ways to go. Choose depending on how you complete the following sentence: "My end goal is to ..."
1) "... make games for a living, preferably for a company that is an industry player."
Get experience and prove you can complete projects. The best way to do this is to use existing packages and build with simple game ideas.
Start with C# and the XNA Framework [1]. Aim to get published initially through XBOX LIVE Community Games [2]. Small projects are key, as you are starting alone.
Move from there to C/C++ [3] and build something with an existing engine, like Ogre3D [4] or Torque [5].
With experience and a proven track record, find ANY opportunity within the industry and apply.
2) "... push the edge of technology and build my own dreams, my way. Perhaps publish under my own name as an independent developer."
Start with
C/C++
[6].
Learn
DirectX
[7] or
OpenGL
[8].
Once you move from the above simple tutorials into more advanced concepts in both C and in your chosen graphics library, start researching heavily into Computer Graphics [9].
When you can load whatever graphics you need onto the screen, next is Physics and Object Interaction [10]. * UPDATE 2011/02/26 * Original link was broken, linking to Wikipedia temporarily.
Got physics down pat? Build or incorporate a Scripting Engine [11] in so you can create animated scenes without hard coding everything into the engine. As a hobbyist, I enjoy the idea of building my own just for the learning experience. However, as pointed out by Dan [12] in the comments, there are other options available for scripting, such as incorporating LuaJIT [13] (mentioned in the comments) or another ready-made scripting language into your code.
Your engine is now a wonderful tool for simulation. Next is Human Interaction. Refine your engine's API for player control so it's independent of whatever project you pursue.
I can't hear anything ... Sound [14] is next to implement.
Now we're going to get bored interacting with static obstacles and simple challenges. We need to implement Artificial Intelligence [15] next.
Alright, you're at least far enough into the engine building to hire a team for your grand dream. You need the following team members as a minimum, more than likely:
That's at least a start to what you'll need to do to make your own engine, your own way, with your own two hands. If that's what you're looking to do, I say go for it. It'll be fun! :)
[1] http://msdn.microsoft.com/en-us/xna/default.aspxHere's a secret....there's nothing special about game programming! It's just like any other bit of software engineering: you have a design, an implementation and a QA phase. Graphics and physics - they're just APIs. Audio - another API. AI - a big state machine.
You can write a game on any platform, the original Adventure was written in Fortran for a PDP-10 mainframe. Some of the most popular games today are written using Flash.
If you want to make games, design one and make it using the software development methods you already have (if you've written threaded code that works, you're well above most game programmers I've met already). Also, you need to accept that you won't produce anything on a par with consoles or bleeding edge PC games unless you have an artistic friend willing to work for free, you're willing to pay for models and textures or you're artistic yourself. But don't let this put you off! Implement something that you can do (i.e. doesn't need a fully animated humanoid character or large, detailed environments) - tetris is usually a good start or games involving spheres and boxes.
Anyone can make a game, the really hard part is making a fun game that people want to play again and again and that is nothing to do with programming at all.
Maybe take a look around at http://www.gamedev.net/
I've been programming video games for 20+ years, you need to learn c and c++. I would recommend writing a game using http://www.libsdl.org/, it is a cross platform game engine framework. No need to come up with something original, try making clones of older classic games. The most important part is just to jump in with both feet and start.
I know it's not C or C++, but if you would like to stick with the C# you've learned, check out the XNA Framework from MS. It's a C# game development platform which you can develop games for Windows, XBox, and Zune (beta version). There are plenty of resources available on the web on how to get started.
If you prefer C++, take a look at the DarkGDK for rapid game development. It will at least allow you to get your head around the art.
http://gdk.thegamecreators.com/
[1] http://creators.xna.com/Start by making modifications for existing games.
I would strongly recommend the Half Life 2 engine, the mod tools are good, and are pretty easy to pick-up (compared to the Unreal tools, in my experience), the Source Engine is still very relevant, it is very flexible, and has a great distribution system (Steam)..
This [1] seems like a good starting point. Of course the Source Engine is mostly aimed at first-person-shooter type games, you could mod it into model train-simulator, but you'd probably have more like mod'ing a different game engine!
"Making a MOD" [2] is a great (more general) article on creating game mods.
Mod'ing a game means you have assets to start with - you don't have to model a gun, or textures, just to start level-design. Not to say you wont replace those models/textures eventually, but you at least have a starting point.
Trying to write you own game from scratch will never end well. Most game developers (even "big" ones) do not write their own engines - it's an incredibly complex thing to do - that is why so many license the Unreal Engine, or the Source Engine.
If you really don't want to mod a game, at least use one of the pre-built engines (I would recommend PyGame [3] for 2D, Torque [4] for 3D, possibly DarkBASIC [5])
As an aside - many game developers started their game-making lives modifying existing games - creating, or being part of a decent game mod is a very good foot-in-the-door into "the games industry".
[1] http://developer.valvesoftware.com/wiki/MODs_on_SourceTo get your feet wet, you may want to consider PyGame [1], since you already have experience using Python. It's a Python library dedicated to making video games so it has a lot of the features you will have to learn.
Once you are comfortable using that, then you can move into C/C++ game development. That way you will have a solid foundation of what's required, know what works and what doesn't, and have an idea of how to tie everything together.
Don't forget there are a lot of game engines available for your use, such as the original Quake engine. Building games with those will let you concentrate on the actual game and show you what's needed to develop an engine.
You can also look at the mod scene. Counterstrike started out as simply a mod for Half-Life; now it's a bona-fide game of it's own. Many people got hired at game companies based on their mods.
[1] http://www.pygame.org/news.htmlRight now the market is all C++ and DirectX, While I'm a huge OpenGL advocate, Direct3D 10 on Vista solved the major marshalling problems of old D3D9. That coupled with OpenGL's glacial speed to adopt new video technology has started to make me think it's a sinking ship.
There are countless places to learn C++, and if you really understand C# and the CLR, C++ should be a pretty easy slide over.
Once you feel comfortable with general Win32 C++ just grab the DirectX SDK, there are some pretty decent tutorials there on the basics and advanced stuff. Unfortunately there is a weird absence of intermediate level tutorials.
If you want to stick with Python, you can do OpenGL with pyglet [1].
Or if you want to do C++, my favorite tutorial on OpenGL is at videotutorialsrock.com [2]
[1] http://www.pyglet.orgTotally disagree with your assumption that building a 2D sprite engine in two weeks isn't real game development. It is. Take C++, a basic engine such as Haaf's Game Engine (http://hge.relishgames.com/), a physics engine such as Box2D (http://www.box2d.org/), get them all talking together happily, then build the fundamental entity system yourself, and build a game on top of that. Depending on the game you choose, you'll need to solve all the same kinds of problems that real game developers face every day.
As far as languages go, learn C++. If you don't already know C, then learn C first, then C++.
Also, don't worry about low-end graphics and sound programming to begin with; I'd recommend that you leave those things to the library that you use (HGE or SDL or whatever) and focus on the underlying mechanisms that all games share. Once you understand those, then drill down into the graphics or sound layers, sure.
Where do I start?
Flash. Forget trying to do a full-blown download-and-install application complete with snazzy graphics, aim for something self-contained and with good gameplay. This is what people actually like playing. Don't just take my word on it, though - if XKCD [1] says so, it must be true.
[1] http://xkcd.com/484/On a somewhat different tack is Inform [1], which is a modern reconstruction of the language Infocom used to make all their Interactive Fiction back in the old days. So, while there aren't any graphics or sounds, it does provide a really solid way to learn how games works in the big picture sense - how to put together an environment that the player can move around in and interact with. Also, as it's just text, you can knock together an entire playable game in a weekend, which is pretty hard to do in anything else.
It also runs on just about every environment in existence, so you get to put off making platform decisions for a while longer.
[1] http://en.wikipedia.org/wiki/InformGames aren't all about 3D graphics. Believe me, I spent 10 years building 3D engines...
3D graphics programmers are like guitarists - they rock hard, but at the end of the day there are loads of them around. If you've ever tried to put a band together, you'd realize that finding bass players and drummers is very hard...
Take a look at the other areas, for example AI and sound. Skilled specialists in these areas are always in demand...
You have the right mindset, and you're aware of the amount of work it's going to take - which is by far the most important consideration. I did the same thing that you set out to do, apart from that I had some game dev skills already when I started making my engine and games. These were my goals:
I'm now some 10 yrs+ in the making... :))) (But it's really just the last seven years I worked extremely hard. :)
These are my hands-on recommendations, if you don't want to end up in the same pitfalls I have:
I've learned loads from reinventing the wheel [5], but I'd definitely learnt more if I'd pushed myself in other areas. For instance, implementing your own threading toolkit is fun and a valuable experience, but if I hadn't wasted my time there, I could have investigated elaborate rendering techniques or fabulous input control methods.
Stay hungry, stay foolish! (And best of luck!)
[1] http://en.wikipedia.org/wiki/Eating_your_own_dog_foodC/C++ is where you want to go for the end-result of high-end high performance gaming applications. Though to be honest I'd recommend starting off with some manged game programming it'll help you wrap your brain around it because it's no small task. I've put my feet in that pool and burned myself.
Here are some resources.
These are both places to start working with DirectX. With your background in C# I'd say this is a great starting point. Once you're rolling you can move your way to C++ once you need the performance and have a grasp of the subject.
Creating your own engine from scratch is not the best idea. Sure it can bring a lot of experience, but there are enough engines already done and working. And for the time you will spend on creating your own, there'll be more. If you're interested in game development, you shold first of all get familiar with existing engines.
If you want to focus on 3D engines, you already have a starting point. ;-)
Look for open source 3D engines like e.g.
Ogre 3d
[1].
Download the source, learn the language it is written in and dig into it.
Become a member of the community, fix bugs, read their documentation.
After a year ore two you have learned enough to write your own engine, I guess :-)
Additional to the stuff recommended above ( and to start with you can develop in a language you are familliar with - for what you will achieve in your first few attempts C# is fine and then you'll know what you want if you do decide to move to something lower level ) I would look into game design as well.
You may want to be doing something epic and awe-inspiring full of sparkly particles and dramatic physics effects, but as countless games have shown us in the past, that is no use if the game isn't fun. It's worth spending a while with a simple prototyping environment, experimenting with different kinds of gameplay and trying to find something that works well in a simple form- books like A Theory Of Fun [1] may be useful in helping you find inspiration and ideas to experiment with.
Once you've got great gameplay you can build it up however you want and know that you have a really solid foundation to start with.
Another thought is that if you want to finish a project, you may find you get more joy starting out by building mods rather than building engines or whatever else- for a single person a modern game is a project of enormous scope, but extending an existing engine and building new content for it is a little more achievable and certainly a few games development teams now started out from the modding scene.
[1] http://www.theoryoffun.com/C might be a good language to start with, but have you considered the iphone/ipod touch as a platform? it's (objective-)C based, has opengl and animation lib's, has sound, and also has a very good "getting paid" model :)
Just a thought.
These 2 articles are very useful for beginners to know as a preliminary to game development:
Write games not engines: http://scientificninja.com/advice/write-games-not-engines
Teach yourself programming in 10 years: http://www.norvig.com/21-days.html
edit: added the cached version as link doesn't appear to work
[1] http://209.85.229.132/search?q=cache:SHt7f6BhFjIJ:norvig.com/21-days.html+Teach+Yourself+Programming+in+Ten+Years&cd=1&hl=en&ct=clnk&gl=ukI attended a school that offered a Game Programming degree, and I remember hearing about a book called 3D Game Engine Programming by Stefan Zerbst. I haven't read it personally, but you can get it here.
http://www.amazon.com/3D-Game-Engine-Programming-Development/dp/1592003516 [1]
[1] http://rads.stackoverflow.com/amzn/click/1592003516Intro to making games [1] is a the best place to start. I'd also recommend reading this C++ [2] book. And reading this book [3] for no other reason then I like it and find it valuable for any developer.
[1] http://www.gamedev.net/reference/design/features/makegames/If you want to get into game development, I strongly recommend the 3DBuzz.com [1] - XNA Xtreme 101 : Volumes 1, 2 and 3 [2], especially as you already have C# experience.
Have you ever been interested in creating your own games? Welcome to the XNA Xtreme 101 video training course! This first volume covers nearly 30 hours of lecture and is specially geared toward the first-time programmer interested in creating games for the PC and Xbox 360 platforms!
Volume I will quickly get you up to speed in programming with a strong foundation in the C# programming language. You’ll also get a clear description of the .NET infrastructure, while learning precisely what .NET is and how it is defining the next generation of computer programming. The lessons have a strong emphasis on programming using proper design principles, including creating your initial requirement spec, moving on the design phase, and laying out a solid implementation plan.
You’ll also get a taste of the artistic side of game creation as well, with discussions of the creative process, the importance of artist-programmer interaction, and even videos that cover the creation of graphics within Photoshop!
There are a number of XNA sample videos for each volume, include two full projects for volume one.
I believe XNA Xtreme 202 is currently in development, and is planned to involve the building a 3D RPG of reasonable size, I'm trying to find a link for this but it may have only been mentioned in the Radio Show.
[1] http://www.3dbuzz.comYou could a totally different route than C / C++ / C#, etc. and try Dark Basic Pro - yes it is basic, but it has a huge library of game constructs for 3D and 2D and include extensions for just about anything. It is tied to Direct X, so no cross-platform stuff as with Open GL, but it produces very quick results.
3D API choices are overrated, nobody is using fixed function pipeline anymore anyway, so you will sooner or later have to let go the helpers of the API. Porting from one to another is not that big deal, if you are not in the release state or have hundeds of shaders.
For an independent developer, for any independent project in fact, I believe the most important thing is to know where to stop. It is easy to lost your way while the client is yourself.
So prototyping is critical, for that I think the best way is to go with high level dynamic languages, you can change stuff easily, try your ideas, let your work evolve, trying to design everyting without experimenting is for dinosaurs anyway. Once your game design, your requirements, data structures and file formats etc. are clear, start implementing with compiled languages, if you ever need to of course.
I can highly recommend the book "Game Physics Engine Development" by Ian Millington. This has practical examples written in C++ and uses the OpenGL framework. It will take you step by step in developing a physics engine that can be applied in many different realistic gaming environments and has very nice practical examples, for example, a simple 3D flight simulator (code examples included on an additional CD)
All the best, Ben.
EDIT: Additionally, I would recommend a language like C++ since this allows integration with a variety of 3D graphics apis (e.g. openGL) relatively seemlessly, yet also has the advantages of object orientation, and the ability to integrate assembly and `normal' c code for purposes of fine-tuning...