images.......

Blitz3D Forums/Blitz3D Beginners Area/images.......

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

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.

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