Re: TIB: Snake engine


[Prev][Next][Index][Thread]

Re: TIB: Snake engine




Sure, you just make a second loop that turns off the pixels at the end every time.

say your going right:

while(1)
.... (the top part, drawing the head of the snake)...

    Turn off the pixels in the current body part
    Check if the body part to the right is "on"
    if so, change the variables for turning the body part off to reflect the position of the body part to the right (ie. V+3 STO V)
    if not, check if the body part to the top is on
        if so change the vars to reflect the new position (up)
        if not change the vars to reflect the new position (down)
end

"Jeff S." wrote:

> Hello, I have made several different snake engines, but I have a problem.  I can't seem to get the engine to delete the parts behind the snake.  Could anyone help?
>




References: