[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] colorkey and time scale



- I've noticed that some games use a time_scale variables to regulate
  the movement of the sprite in connection with the actual speed of the
  game. For example if I want to run my game with a framerate of 30fps
  and prev_tick - last_tick is time elapsed since last frame time_scale
  become:

  time_scale = (last_tick - prev_tick) / 30.0

  Is it really necessary with pygame?

Some sort of frame-rate control should probably be built in to your
game. Notice that this is usually a _maximum_ framerate (which I
never seem to hit on my 486 ;-)

If you do not have a control like this, the game will play at
different speeds on different machines, and might be unplayably
fast on systems much faster than the one on which you develop
the game.

I am thinking now about how to deal with slower systems.... I guess
if the framerate drops below the desired framerate, you might have
a motion-multiplier to pseudo-speed things up to normal. You might
run some sort of frame-rate test in the beginning of the game --
during a demo or intro -- and use that throughout?

Just some thoughts... I am pretty new to pygame also.

_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail

____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org