[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Help : speed



facelle@tiscali.it wrote:
> I want to be able to move them at different speeds.
> How to do that ?

Let them have different numbers of pixels per frame.

> Since I want to keep the animation as smooth as possible, I think movements
> must be always by one pixel at a time, so the question is WHEN to move
> characters going at different speeds within the time unit.

This is not going to work. You would need hundreds of frames per second,
which is a waste of energy because the human eye (and the monitor) is
limited to about 50 frames per second. And you won't succeed in having
much more than that if you want a scrolling engine (speaking from
experience: http://pybrian.sf.net)

My code is at
http://cvs.sourceforge.net/viewcvs.py/pybrian/brian/brian.py?rev=1.68&view=auto

yours,
Gerrit.

-- 
Weather in Twenthe, Netherlands 12/02 12:55 UTC:
	3.0°C light drizzle mostly cloudy wind 2.7 m/s SSW (57 m above NAP)
-- 
Asperger Syndroom - een persoonlijke benadering:
	http://people.nl.linux.org/~gerrit/
Kom in verzet tegen dit kabinet:
	http://www.sp.nl/