From: Pete S. <pe...@vi...> - 2000-06-08 23:47:16
|
> computer is. This is The Right Thing. I chose not to port that section > of code ( wait_frame() for anyone who wants to write a patch ), > partially because I wanted to see how performance varied over > different systems and different video flags, but mostly because I > didn't want to bother learning Python timing techniques last > night. You see, SDL has a timing-specific subsystem, but Mark has > decided (rightly, IMO) not to incorporate that subsystem into pySDL, > instead leaving timing issues up to the python library. I may write > the appropriate code tonight; we'll see how motivated I am. i believe you'll find the python "time" module will handle your timing needs just fine. the only thing that the SDL timing routines give you is the ability to get callback events after a certain amount of time. there isn't anything like this in the python "time" module, but it wouldn't be hard to make a quick python version of it, or wrap around SDL's. the only thing i wonder is if anyone really uses timing callbacks in game environments. the most useful place for timing callbacks is inside GUI mainloops, where the user has limited control over a programs main event loop. this is hardly the case when developing games with SDL. one has full control over the event loops and the overall timing of the game as well. i question if timer callbacks are really useful in game environments. can't wait to try battling aliens tonight from home! :] |