Game programmibg libraries

Jul 16, 2014 at 8:49pm
Okay, so ive been learning c++ the last week with the book "C++ without fear" and so ive always been interested in game programming, i was researching sone different libraries and came across allegro....is allegro comparable to directx? If not then what is directx...im i interested in using it, just not sure what it really is.


So to simplify it, can someone explain what directx is?
Last edited on Jul 16, 2014 at 8:49pm
Jul 16, 2014 at 9:01pm
Allegro is a library built ontop of what I would imagine is OpenGL (alternative to DirectX). DirectX and OpenGL are both low level graphics (and more with DirectX) APIs. I don't think anybody will recommend you use DirectX directly when first starting out. It is very low level, and as such requires a lot of work. Want to create a window? Get ready to write a good ~80 lines of boilerplate. In Allegro (and any other graphics library) something like creating a window will just be a single function call.

The difference essentially comes down to the level of abstraction. DirectX and OpenGL have very little abstraction. Libraries like Allegro have a good amount of abstraction, handling most of the low level troubles for you.

Unless you're writing an engine (don't), then you have no reason to use DirectX besides academic reasons. If you want to create some games, I highly recommend you grab one of the many free or cheap video game engines out there and use that.
Jul 16, 2014 at 9:13pm
Thanks alot, that explained it fully. Yeah i was thinking about the engine idea, such as unreal4 or unity.... but i think im gonna practice with allegro. Thanks again.
Jul 16, 2014 at 10:56pm
Learn C++ before talking about engines. What kind of game do you want to make?
Jul 17, 2014 at 1:34am
Something simple first like pong remake then move onto 2D platformers
Jul 17, 2014 at 1:58am
I like to use unity it's pretty easy though you use c sharp instead of c++(well you could use boo or javascript also but I prefer c sharp).
Jul 17, 2014 at 2:29am
If i was going to use an engine, id use unreal 4, its fantastic graphics whise and uses c++
Topic archived. No new replies allowed.