I STILL dont understand

Started by
6 comments, last by Oluseyi 17 years, 9 months ago
Hi, I have read a book on how to program in C. I have read another book on how to program games in C. I understand C (a little). I do not know what to do now. I guess im wondering how to program a game. I know a very little bit of C(just enough to get me by). If anyone could help that would be great. Tyler
Advertisement
Stop trying to make games and focus on learning how to program.
Well i havent tried yet but i would like to try. i should probably restate my question to make it simpler. Is there any suggestions on books or something of the sort to help me learn more on programing games? thanks in advance

Tyler
Begin by writing small (text based) apps. For example, a text based adventure game or tic tac toe. This will give at least some experience by applying what you have learned.

You can then post up the code for someone to review and advise you where to go next.

Steven Yau
[Blog] [Portfolio]

ok. thank you.
In order to program games you will need a very good understanding of C. Try making text based games such as Hangman, Tic-Tac-Toe, and World Jumble. Before you start each game make an effort to write down on paper what the game loop will look like, e.g. for Tic-Tac-Toe it might be:

While User has not quit and there is no winner
If its users turn
Get users move
Check to see if its valid
If it is valid draw board
Switch turns
Check to see if there is a winner

If its computers turn
Get computers move
Draw Board
Switch Turns
Check to see if there is a winner


After you get the grasp of C, then you can start trying to learn an API such as SDL, Allegro, DirectX, or OpenGl in order to make the graphics.

However, don't try to learn an API until you have a good grasp of the language because even though you might be able to learn how to implement some graphics fine with only a little knowledge you'll still need a good handle on C to make the rest of the game(inventory, game states, and whatnot).

Hope that helped.



Also (I have to say it) don't waste your time learning C. Start with C++, happily use std::string, std::vector et al and be comfortable having no idea how they work until such time as you are producing results and have a genuine curiosity.

I learnt to program in BASIC, then moved to C. What I am suggesting above is roughly equivalent, but better.
At some point you have to stop reading and start writing. Code, that is.

This topic is closed to new replies.

Advertisement