Jump to content
  • Advertisement
Sign in to follow this  
JosephParrilla

Starting C++ games

This topic is 2603 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

Hey everyone,

So Ive messed around with programming games in Java for a while now and I really feel like I want to move to C++. The documentation and support for Java in games is just sort of scarce, I want to use something more standard. I do know C++, so Im not really concerned with learning the language, what I want to know is what I will need to begin 2d games. The more popular books ive seen seem to use DirectX, but I would prefer OpenGL. So basically, what would you recommend for me to start with, any good books or tutorials? I know about SDL and Allegro, but Im really not sure about what I need. With Java it was pretty simple, I just used Java2d for my stuff, but I know I need to add libraries to be able to use C++. Thanks in advance.

Share this post


Link to post
Share on other sites
Advertisement

Hey everyone,

So Ive messed around with programming games in Java for a while now and I really feel like I want to move to C++. The documentation and support for Java in games is just sort of scarce, I want to use something more standard. I do know C++, so Im not really concerned with learning the language, what I want to know is what I will need to begin 2d games. The more popular books ive seen seem to use DirectX, but I would prefer OpenGL. So basically, what would you recommend for me to start with, any good books or tutorials? I know about SDL and Allegro, but Im really not sure about what I need. With Java it was pretty simple, I just used Java2d for my stuff, but I know I need to add libraries to be able to use C++. Thanks in advance.


It's a matter of preference and project needs, if you want to target multiple platforms, your best shot would be SDL and OpenGL which will remove all the trivial code that gets you away from the specific underlying architectures of various operating systems and what not. If you are going to stay on the Windows platform, then you can simply use DirectX, there is a rich, guided documentation, lots of books and tutorials. A huge percentage of games are written exclusively in DirectX, exclusively for the Windows platform. And, is still, the number one platform for desktop gaming. In the end, OpenGL and DirectX (or more abstract libraries/frameworks) are just two ways of getting to the same goal.

If you want to start quickly, go for SDL and OpenGL. If you have some patience to study some additional stuff and no need for multi-platforming, go for DirectX. DirectX is a complete software development kit and includes a lot of the stuff which OpenGL, as a graphics-only library, doesn't have (although SDL compensates). Hope it helps!

Share this post


Link to post
Share on other sites
I think Id rather go the OpenGL/SDL route for two reasons, firstly because I dont want to go exclusively windows (Im a big linux user) and I also have some OpenGL 3d experience (not much, but some). Ok so what resources can help me learn how to combine C++, SDL, and OpenGL to create games? I was under the impression that SDL sort of wrapped OpenGL and I would only have to use that. I have no idea how to begin using these 3 technologies together to form a game. Is there any step by step beginner book or something?

Share this post


Link to post
Share on other sites
Ok so I have SDL set up to work with Code::Blocks, and its running fine. Ive been looking at LazyFoos tutorials as well as some others. Are theyre any "official" books on the topic or should I just stick to internet tutorials? The top books on amazon, especially C++ Game Programming is done using directX.. If you all think that online tutorials are more than enough than I guess Ill just work through the two that I found.

Share this post


Link to post
Share on other sites
You don't need a book to learn SDL. The SDL API documentation can be useful to look things up: http://www.libsdl.org/cgi/docwiki.cgi/SDL_API
Everything is not documented in detail but the SDL source code is relatively easy to read if you need to find out how things work.

Share this post


Link to post
Share on other sites
That makes sense. So then can you point me towards any good general game programming books? The games I programmed in Java were all very simple. Usually one level shmups or a one screen side scroller. Basically I want to get deeper and learn how to make levels, maps, battle systems, etc. I dont really have a definite game goal but I really like action rpgs and strategy games like Civilization. I really want to learn to make isometric levels and the like. Where can I learn about this stuff?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!