[FREE] A Simple FrameGenerator Class :)
dragonmystics at yahoo.com.au
Wed Aug 16 06:15:36 UTC 2000
Here is a simple "frames per second" generator class
i have recently written. You use it by creating an
instance, binding it to an object which needs it (by
putting the fps instance in the objects inst var, and
giving the object to the fps instance as it's
clientObject inst var). The fps instance will then
send the #doFrame message to that object every 'x'
times a second. This is useful for display engines,
and any other sub-system which requires periodic
animation. I created this class to prototype a game
engine i am working on. It uses a "priority 3" process
to poll elapsed time, but if you needed to port it to
a proceedural language like C, you just need to
substitute the Smalltalk process aspect with a
proceedural 'do while' loop.
There is an example on the class side. Please feel
free to use or modify the source code for whatever
purpose you need.
Digital AV Artist.
Spark Digital Pty Ltd.
"What direction you should go in depends
very much on where you want to end up..."
- some wise guy.
http://geocities.yahoo.com.au - Yahoo! Australia & NZ GeoCities
- Build your own Web Site - for free!
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3329 bytes
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20000816/8ad70f8e/FrameGenerator.bin
More information about the Squeak-dev