> Your timer callback should update the position of your sprites. This > should not be done in the drawing code. This allows screen > redraws to > be combined when the processor gets busy, making for smoother > and faster > sprite movement which is independent of how long the drawing > code takes.
Oh yes - that's a very good point. It generally makes good sense to compute the changes in the scene at a fixed rate, independent of the rendering. Having a fixed, constant, rate makes a lot of the scene physics simpler to calculate and also means the code can run "the same" on a variety of different machines with no dependency on how fast each machine's graphics subsystem is. Then, the rendering code just takes a snapshot of the current scene and draws it whenever it runs, but does not need to do any of the recalculation at that point. I guess that becomes so natural after a while that we forget to mention it...! SELEX Galileo Ltd Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 3EL A company registered in England & Wales. Company no. 02426132 ******************************************************************** This email and any attachments are confidential to the intended recipient and may also be privileged. If you are not the intended recipient please delete it from your system and notify the sender. You should not copy it or use it for any purpose nor disclose or distribute its contents to any other person. ******************************************************************** _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

