Jump to content
  • Advertisement
Sign in to follow this  
JohnnyDread

How To Learn Game Programming

This topic is 3000 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

*** Disclaimer: This thread was created as a redirect for a very common question asked here in gamedev. I do not claim to be an expert, but after going through it myself and seeing the same replies over and over I decided to bump it all into one thread. Any suggestions for this are welcome. ***

How to learn game programming



Realism
First of all stop. You are not going to make that huge mmo you are thinking about, you will not be working on that killer FPS you had in mind, that procedurally generated RTS? Forget about it. For a few years at least. To begin with you are not going to be very good so you have to start small.

Which Language?
This is one of the biggest questions we get asked here at gamedev and the answer is it doesn't matter. Yes more large companies code in C++ but this irrelevant to you as they aren't going to hire you without at least a few years experience. Once you get good at a language switching between them is not as big a deal as you might think when starting out. I personally recommend either C# or Phython just for the fact that they are simpler to use then some other languages and still very powerful.

OpenGL or DirectX?
Neither. Newbies put a lot of weight into this question and its not a very important one really. Graphic programming is only a small part of game programming and a pretty boring part at that. To begin with you should be using a library that does it all for you, that way you can learn all about the real code of game programming before worrying about the nitty gritty stuff.

I recommend SDL, SFML, Irrlicht or any of the simple libraries that will handle the rendering for you (those also do input and window management which is one less headache when learning). Once you have made a few simple games you can learn either GL or DX, but remember that most game programmer would be able to use both depending on that the requirements for the game are.

Where do I start then?
Pong. Seriously. This game will teach you about lives, physics, collision, AI, game loop, scoring, leveling and much more.

Next make tetris. This will teach you much the same as above but with more advanced collision detection and smarter game logic for the score counting and block removal.

Now make PacMan to learn more about AI. Nuff said.

Now make a platformer (mario clone) to learn an abundance of new things. If you feel up to the challenge use a physics library and particle effects.

*** Side Note ***
Do all of your games have sound? Menus? Help screens? Pause? Scoring? Can you change controls? Save? Add all of this to your game to make it really complete.

Conclusion
Once you have done all of this you are well on your path to a career in game development. You will now be at a level where you know what benefits you will gain to learning a graphical AI (or you might have sense to stay away from them and use a decent engine instead). Either way, you will now have all of the core knowledge you will need to become a game programmer and if you are still having fun then you know that this is the career path for you.

Happy coding.

Share this post


Link to post
Share on other sites
Advertisement
URLs:
Python (http://www.python.org/)

Visual Studio ([C#, C++, F#, VB] http://www.microsoft.com/express/Windows/)

Monodevelop ([C#] http://monodevelop.com/)

Code::Blocks ([C++] http://www.codeblocks.org/)

NetBeans ([Java, but you could get plugins for other languages] http://netbeans.org/)

Eclipse ([Java, but you could get plugins for other languages] http://www.eclipse.org/)

Share this post


Link to post
Share on other sites
The language actually has a huge impact. Some have better documentation or easier syntax. Sure, switching might be easy ONCE you know a language, but if you choose a language with it-blocks, closures, and other fun garbage as your first language (features that are pretty new), you might have a hard time because of poor documentation. I spent a lot of time going on and finding these underground languages and found some that were really appealing. The poor documentation is what really gets you. Luckily, Sun and Microsoft have some of the best documentation and there are a lot of books regarding the programming languages these giants use and develop.

Share this post


Link to post
Share on other sites
I would add XNA if you are going the C# route.

If you are really new and going the C++ route, go with SFML(Their documentation is the most newb friendly. It even covers linking libraries etc.)

Share this post


Link to post
Share on other sites
Looks good but I think that jumping into a Tetris clone right after writing a Pong clone is a little tough. I had a really hard time getting my head around Tetris. Perhaps a space shooter can help bridge the gap.

Share this post


Link to post
Share on other sites
Quote:
Original post by X Abstract X
Looks good but I think that jumping into a Tetris clone right after writing a Pong clone is a little tough. I had a really hard time getting my head around Tetris. Perhaps a space shooter can help bridge the gap.


I agree that its harder, but the only real difference is the advanced collision detection. You have to worry about awkward angles rather then just radius vs radius, which is a good thing leading into pacman (where you have to deal with map based collision).

Share this post


Link to post
Share on other sites
Quote:
I agree that its harder, but the only real difference is the advanced collision detection. You have to worry about awkward angles rather then just radius vs radius, which is a good thing leading into pacman (where you have to deal with map based collision).
I don't know that Tetris is difficult because of the collision detection. How are there awkward angles? For Tetris, collision detection will typically reduce to some fairly simple array checks.

The tricky part about Tetris (IMO) is figuring out the logic to constrain the pieces (e.g. prevent rotation or linear motion) when they should be constrained, and handling other details such as adding pieces to the board at the appropriate time, dealing with timing issues, and so forth. Granted, it's not that complex overall, but it's a fair step up from Pong complexity-wise.

Trying to 'rank' these various games by complexity is probably somewhat arbitrary and pointless, but (based on my own experience at least) I'd tend to agree that something like, say, Space Invaders might be easier to put together than Tetris (even though, on the surface at least, the former might seem more complicated than the latter).

Share this post


Link to post
Share on other sites
Yup, I wouldn't call that thing in tetris "collision detection". And after all, it's not so hard to constrain the pieces: there's a very simple and universal solution to it: first transform the piece "virtually". If it collides, don't apply the transformation, if it doesn't: apply the transformation.

Share this post


Link to post
Share on other sites

This topic is 3000 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!