Jump to content
Posted 24 July 2012 - 12:07 AM
Posted 24 July 2012 - 02:34 AM
Posted 24 July 2012 - 11:28 AM
I think that would be less effective. It's not much of a slowdown to check the two arrays.
In my snake-like game, I have to check 2 arrays of coordinates and the "food" coordinates, regarding their collision with the head.Wouldnt it be easier to set in the center of each sprite a certain color and in the collision function to check wether the pixel color in center of the head's rectangle has those certain RGB values ?
If it's possible, how could I do that in SDL ?
My guess is that the blocks would first have to be blitted on the background and then the background to the display.