Page 1 of 1

Boundries

Posted: Fri Jan 03, 2003 7:50 am
by Guest
I wrote a racing game but I can't keep the Cars out of the walls.  I used the POINT function to stop it from going into the walls but as you speed up it messes it up.  The way I have it check is:  It checks the point right outside the car, if I am going slow enough it works, I have the speed increase by spd = spd +1 so at its fastest, its jumping about 5 pixels per frame.  Since it only checks one pixel away, it is two pixels away when it PUTs it it puts it in the wall causing an assortment of errors.  I have tried numerous different things t fix this but none work.    ??? TEXT I need the car to stop at the wall without going through it, does anyone know a quick and efficient way of doing this?

Re: Boundries

Posted: Mon Jan 06, 2003 12:51 am
by frankiebaby
Well, i assume it looks kinda like this?

IF POINT (X + 1,Y) = COLOR THEN

USE SUMTHIN LIKE THIS

IF POINT (X + spd, Y) = COLOR