Mainloops

Kyle raises ThreadError

Comments are moderated. It may take a few minutes before your comment appears.
Markdown is supported in your comments.

More often I've used this multiple-rate setup in games, to run a physics engine at a slower framerate than the GUI. A physics engine adds another wrinkle: it needs to know exactly how much time has passed since the last frame. Note that I make no attempt to regulate framerate minimum framerate. Makes the code simpler, and I've not needed it in practice. Here I'm using the PyMunk for physics, running it at the same framerate as the GUI, and I'm ignoring a lot of boilerplate.

Name:
Mail: (not shown)

Please type this: