C++ game

Started by
3 comments, last by weasel93 15 years, 11 months ago
hi, im new here and im not sure where to post this, so if this thread is in the wrong section, i apolagize. For a while i have been spending a lot of my time learning c++ and i'm really enjoying it. The only style games i can make are text based games that you play in the command prompt menu. I've been trying to figure out how to make a 2d/3d game where there is a character that you can move around in a worldspace. It doesn't have to be anything complex at all but i just can't figure out how to create something like that. Is there a specific program i need to use along with C++ to create a game like this? The only game design I have done before is modding games and i wanted to create a game from scratch so i learnt c++. Any help with this matter would be greatly appreciated, thanks. - Weasel93 EDIT: incase it helps, I have been following the C++ tutorials on this website http://www.cprogramming.com/tutorial.html
Advertisement
You need a graphics API, which is essentially a set of functions you call to interface with the graphics hardware. The choices you have for efficient, low-level functionality are OpenGL and DirectX. For slower, high-level functionality there are things like GTK. Most people seem to go with OpenGL or DX, though.

You also need an API to interface with the window manager of your operating system in order to create a window, capture mouse and keyboard events, etc. If you are only into making games, I strongly recommend SDL (www.libsdl.org); it's simple and easy to get into. It also has its own 2D API that's somewhat okay, but if you want more speed and functionality it's easy to use OpenGL with SDL.

Allegro (www.allegro.cc) is a similar alternative, but from my experience not nearly as simple and elegant as SDL. You could also use your OS's native API - WinAPI, POSIX or whatever - but there really is no point if you're making games. Those API's will just confuse you and delay your progress.

Hope that helps.
-------------Please rate this post if it was useful.
You may want to give SDL a go or maybe find a simple sprite engine you can use to draw your characters and whatnot.

Going from text to graphics has a bit more to it though. Good luck though!
I'd recommend SDL, following these tutorials. Another commonly suggested option is Allegro. For 3D, check out either DirectX or OpenGL. Google any of those four, and loads of tutorials will come up.

I keep hearing more and more about something called Haaf's Game Engine as well, so that's yet another option you can consider.
thanks for the fast replies, i'm doing the tutorials now.

This topic is closed to new replies.

Advertisement