and below the same but a bit optimised hope you like :)
you don't need to retest the keys to know what image of the car you have to draw.
you don't need to retest the keys to know what image of the car you have to draw.
SetBuffer BackBuffer() While Not KeyHit(1) DrawImage track,0,0 If KeyDown(203) :car_x=car_x-1*car_speed:carframe=car_west:endif If KeyDown(205) :car_x=car_x+1*car_speed:carframe=car_east:endif If KeyDown(200) :car_y=car_y-1*car_speed:carframe=car_north:endif If KeyDown(208) :car_y=car_y+1*car_speed:carframe=car_south:endif If car_x>750 Then car_x=750 If car_x<0 Then car_x=0 If car_y>550 Then car_y=550 If car_y<0 Then car_y=0 DrawImage carframe,car_x,car_y Flip Cls Wend