[plt-scheme] how to optimize my code ?

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Mon Apr 27 06:17:18 EDT 2009

At Sat, 25 Apr 2009 19:28:23 +0200, Ziboon wrote:
> thanks,
> 
> =>  I don't measure its speed, I just see if my game is  fluid,
> 
> And actually If I move the mousse (it moves my cannon) and in the same time
> I click to shoot a ball :  I see some slow-down on my canvas.
> 
> => I try to change sleep/yield time :
> 0.01-0.02 it's OK but it doesn't change.
> 0.1  it becomes really lagging

Ok, it sounds like individual refreshes really are too slow...

> But this troubles came since I made  my cannon:
> it's 72 bitmap of the same picture but different angle in a vector.
>  and every time when I move my mousse: I compute an angle and pick the
> correct bitmap in my vector.

... but nothing in that process sounds particularly slow. Can you show
more of your canvas paint callback?



Posted on the users mailing list.