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

Re: [pygame] Pygame



>>> Pete Shinners wrote
> the one thing unrealscript has is it's state machine and latent 
> funcitons built into the language. i've never seen or heard anything 
> else like it. in a clumsy way it could perhaps be emulated with 
> generators or iterators or something in python.
> 
> the latent functions are like 'blocking functions' that don't actually 
> block the game. so in your monster class if you say 'sleep(5)' the 
> character will sleep for 5 ticks, but the game doesn't hang up. more 
> importantly than sleep you can do things like 'waitfordoortofinishopening()'


Look into Twisted and it's Deferreds. I think there was a paper on it
at PyCon... erm. Someone's not been installing the pydotorg CVS... more
in a bit.


Anthony

-- 
Anthony Baxter     <anthony@interlink.com.au>   
It's never too late to have a happy childhood.