Boundries
Moderators:Administrator, Global Moderator
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?
- frankiebaby
- Global Moderator
- Posts:95
- Joined:Tue Apr 30, 2002 1:38 am
- Location:Pennsylvania
- Contact:
Re: Boundries
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
IF POINT (X + 1,Y) = COLOR THEN
USE SUMTHIN LIKE THIS
IF POINT (X + spd, Y) = COLOR