Author Topic: HELP ME!!!!!  (Read 6620 times)


  • User
  • *
  • Posts: 1
HELP ME!!!!!
« on: December 12, 2007, 02:22:08 AM »
Hey i am new to this whole programming thing and would love to get some help for the more complicated subjects.  i would like to make my first game but don't know where to start.  I  know the basics like loops, if, switch, array, all the easy stuff but i need help with file IO's and bitmaps as well as any thing else that i may need for the game, like keyboard commands.  I use visual studio's cause i got it for free but i just can pin this down.  i think i have to much to learn. well thanks hope someone can help that would be great.  I saw some of the code for the games on this website but it was pretty complicated when if was not code like the #define that i have no clue where these came from unless it is just a global variable.  oh i am using C++ by the way.  if any one can help that would be great.  I ask my professor but he does not like to help the students in depth and loves to just tell us to find it on our own.  (guess that is school for ya).  Thanks


  • Administrator
  • User
  • *****
  • Posts: 147
Re: HELP ME!!!!!
« Reply #1 on: December 14, 2007, 11:29:46 PM »
You should get a good handle on C++ before trying to do something like a game (beyond things like guess a number or really simple stuff). The Allegro library is pretty easy to get started with, although today it is pretty aged in that it won't have support for modern graphics but it will let you do the basics.

As for the question on #define, it has two primary purposes, one is the #define/#ifdef, which supports conditional code compilation, for example if there is optional functionality or support for more than one environment (like PC vs Mac). In C code, more commonly it is used to define constants, for example "#define MY_PI 3.141526" will replace MY_PI with 3.141526. In C++ code, you should use "const double MY_PI = 3.141526;", which has the same effect except that it is cleaner and leads to less subtle errors (and better error messages if you do make mistakes).
Gillius's Programming