[racket] get-pixel

From: Sébastien Cano (hkjangshu at gmail.com)
Date: Tue Nov 30 15:44:06 EST 2010

I'm currently working on a Space Invaders, and I have an issue.
When a laser is fired,
its coordinates to send the color of the pixel at these coordinates to
a color% object at every tick.
Since the background is black and that the invaders are white, when (> (send
my-color-object blue) 0 ) (which gives the 0-255 blue value) , my program
starts to look for a dead flagged invader and removes it from the list. An
invader is considered as dead when a laser enters its perimeter.
However, it seems get-pixel is very slow when called at every tick. When you
fire 2 lasers, it becomes unplayable.
And of course, calling it every 2 ticks or more is not efficient enough.
Feel free to give me your thoughts on this...

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20101130/0bd606fe/attachment.html>

Posted on the users mailing list.