My first 2D games (C++ and Allegro)

Sep 13, 2012 at 8:40pm
Hi guys.

I'm pretty much a beginner. I started programming with Python around a year ago, and I've been learning C++ for almost 3-4 months now.

I actually went ahead and made two 2D games using the Allegro libraries.

Thought I'd make a topic here and ask what you guys think about them.

Feel free to take a look:

http://www.youtube.com/watch?v=t--x2WsC1D0&feature=relmfu
http://www.youtube.com/watch?v=m8RwxYh8x_Q&feature=plcp

Please let me know what you think about my first two games.

Thanks a lot! :)
Sep 14, 2012 at 9:24pm
thats a nice game for a beginner :) best of luck
it would have been much better had the other player attacked or atleast defended..
but still very good
keep it up.
Sep 14, 2012 at 10:59pm
I don't approve of the global variables in your first and second game.
Last edited on Sep 14, 2012 at 10:59pm
Sep 15, 2012 at 1:41am
Uh, as I said, I'm just a beginner. Every single global variable that you see there is being used for the game. I'd appreciate it, if you let me know what the problem with using so many global variables is.
Sep 15, 2012 at 2:09am
These global variables could be local to main and passed to the other functions. The link below will explain why they are bad and shouldn't be used unless there is no other option.

Why are global variables bad?
http://c2.com/cgi/wiki?GlobalVariablesAreBad
Sep 15, 2012 at 7:55am
Thanks for sharing this post.
http://www.editableclips.com/
Topic archived. No new replies allowed.