[plt-scheme] how to optimize my code ?

From: Ziboon (ziboon at gmail.com)
Date: Sat Apr 25 13:28:23 EDT 2009


=>  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

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.

=>  I don't know how I can  get more fluidity. (using opengl ? )

(actually  my prog takes  20 sec to load and 160 MO memory oO)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20090425/a0d2298c/attachment.html>

Posted on the users mailing list.