Advice in starting 2D game programming

Started by
12 comments, last by antiHUMANDesigns 11 years, 10 months ago
SDL and www.lazyfoo.net

His tutorials are amazing for setting up the environment, and understanding the basic logic and flow of a game. Each tutorial adds a new game element to your toolbelt, and by the end you are able to recreate just about anything.

I had a game programming class in college that followed his tutorials and it was awesome. By the end of the semester we had made breakout, bejweled, space invaders, and a custom project (I re-made super mario for the snes (only the first couple levels though)). It was a quite rewarding experience. I cannot recommend SDL and lazyfoo strongly enough.
Advertisement
Here are the options I have used for 2D game development:

- C# with XNA (This is my current favorite).
- C++ with SFML.
- C++ with SDL.
- Python with Pygame.

I know XNA might turn you off based on its lack of platform options, but imo it's the best out of the four I tried when it came to productivity. I also have tried C++ with OpenGL alone but this might not be your best option since OpenGL only handles graphics, you would need something else to handle input, sound, etc.

The only book I know of for SDL is Focus on SDL, but I cant vouch for how good it is.
I would suggest IF you go SDL , visit :

http://lazyfoo.net/index.php for good tutorials and tricks , plus articles.
http://www.sdltutorials.com/ for some more SDL based techniques

or for SFML you could try

http://www.gamefromscratch.com/

Both SDL and SFML have lots of online resources but I doubt you will find many books to read through on the subject.

Hope that helps some.


Yes it does help, thank you, and based solely on reviews the book doesn't seem all that detailed in specifics but provides an overview of SDL itself.


SDL and www.lazyfoo.net

His tutorials are amazing for setting up the environment, and understanding the basic logic and flow of a game. Each tutorial adds a new game element to your toolbelt, and by the end you are able to recreate just about anything.

I cannot recommend SDL and lazyfoo strongly enough.


I've already set up sdl but have not had a chance to code. Will start on the rest of the tutorials on Monday after a short weekend off.


I know XNA might turn you off based on its lack of platform options, but imo it's the best out of the four I tried when it came to productivity. I also have tried C++ with OpenGL alone but this might not be your best option since OpenGL only handles graphics, you would need something else to handle input, sound, etc.


Actually my main reason for putting of XNA development is because my school offers a course in it and I'd much rather learn something a course at my school won't teach. Also I found out a graphics class using OpenGL is being taught as well so I will be signing up for it next quarter. But for now I will be learning SDL/SFML through tutorials.
I also recommend openGL. And SDL works well with openGL, I actually used them together for a long time, until recently when I switched to GLFW, which is light-weght and everything you need for a good openGL base.

So yes, I would say SDL and openGL.

Using openGL for 2D stuff also teaches you how to do the same thing in 3D (in a sense, because openGL is the same whether you use 2 or 3 dimensions, really), at no extra cost, so for that reason it's great.

This topic is closed to new replies.

Advertisement