GP2X How Do I Even Start Game Programming?


uh guys i don't want to know how to learn SDL , that's finding out how the function works.
I want to know how to create games, the only thing i know is how to create a game loop with states.
 
I guess the question is then, what do you want to do that your state-based loop won't let you?
There isn't really a generic answer to how to write games...
 
You could get some source code for an open source game that is similar to what you want to do. If it's well documented at all, then you could pickup some good ideas that way.
 
http://gamasutra.com will give you an insight to games. Learning about state machines would be a good start. If you are still learning C++ then grab Thinking In C+ Vol 1 and 2 from http://www.bruceeckel.com for free. As treefrog said there isn't a generic anwser to it, its more learning and apply to your concepts.

Also http://www.gamedev.net/

Start off with a simple clone like space invaders and work your way up...
 
Good links thanks :)

WooHoo. I was worrying I'd need to learn linux and a 'SDL language'. But I can see from the links, its all C++, sort of like .NET :ph34r: and it looks easy to understand :)

Do I need to use the 1.2.9 version or the 1.0.8 version?
 
Well, if you already know c/c++, then games are just an extension of what you already know. Just break it down into all the blocks you need and figure each one out individually. Look at it from a high level perspective first and then drill down until you get to code level and then code it :) Like has been mentioned, there is no set way to do it.

You already mentioned a game loop and game states, which is a really good start. What else do you really want to know?? :blink:

Basic game loop:

STATE 1 - in game
1) Process input
2) Update game objects based on input
3) Process AI
4) Update game objects based on AI
5) Check for object interaction (colisions etc)
6) Change state based on interaction
7) Render scene

STATE 2 - lose life
1) Process input
2) Change state based on input
3) Render scene

STATE 3 - level up
1) Process input
2) Change state based on input
3) Render scene

etc...
A flow digram would be the best way after that to break each state down further.

HIH
 
pea posted on Sep 30 2005 at 04:31 AM said:
Well, if you already know c/c++, then games are just an extension of what you already know. Just break it down into all the blocks you need and figure each one out individually. Look at it from a high level perspective first and then drill down until you get to code level and then code it :) Like has been mentioned, there is no set way to do it.

You already mentioned a game loop and game states, which is a really good start. What else do you really want to know?? :blink:

Basic game loop:

STATE 1 - in game
1) Process input
2) Update game objects based on input
3) Process AI
4) Update game objects based on AI
5) Check for object interaction (colisions etc)
6) Change state based on interaction
7) Render scene

STATE 2 - lose life
1) Process input
2) Change state based on input
3) Render scene

STATE 3 - level up
1) Process input
2) Change state based on input
3) Render scene

etc...
A flow digram would be the best way after that to break each state down further.

HIH

Thank you for your help this is exactly what i meant.
 
Last edited by a moderator:
Back
Top