Re: game design techniques
On Sep 5, 2004, at 8:23 AM, Josh Close wrote:
> I'm starting to do some game design for the first time. I can get
> things to move around the screen, but I don't really know what I'm
> doing. What are some of the game design standards? Probably for just
> 2D games to start.
I don't know that there are any real "standards" beyond those that
people impose upon themselves after figuring out what works for them.
For games, as for other areas of programming, I find that the best way
to learn is simply lots of trial and error, as well as looking at
others' code. Fortunately, python simplifies and quickens the trial
and error process.
> How do you organize things?
Well, I'm still working on my first pygame project so I still have lots
to learn, but for what it's worth: So far, I've got the bulk of the
game logic in a single class which handles the game loop, creating all
game objects, etc. I have a separate sprite subclass for each type of
object in my game, as well as classes for game levels, the high score
table, and a group of classes implementing a state machine for the game
state, plus some small utility classes.
> How do you get objects to move smoothly?
That depends. In my project, I'm throttling the game at 30 fps. At
the low resolution I'm using, all modern machines I've tried it on seem
to handle my game at 30 fps with ease, which means I can easily make
smooth movement occur by coding as if the frame rate is constant (since
in practice it generally is), just making sure that the movement
(Continue reading)