JET BITMAP by Reign14th Jul 2006 1:24
|
---|
Summary here's another rookie program, it's a jet flying, it used 8 points of movement and rotation for turning. Description Code ` This code was downloaded from The Game Creators ` It is reproduced here with full permission ` http://www.thegamecreators.com x=640 y=512 set display mode 1280,1024,32 load image "jet.bmp",1 sprite 1,x,y,1 offset sprite 1,41,57.5 repeat rem move left if leftkey()=1 x=x-1 rotate sprite 1,270.0 sprite 1,x,y,1 endif rem move right if rightkey()=1 x=x+1 rotate sprite 1,90.0 sprite 1,x,y,1 endif rem move up if upkey()=1 y=y-1 rotate sprite 1,0.0 sprite 1,x,y,1 endif rem move down if downkey()=1 y=y+1 rotate sprite 1,180.0 sprite 1,x,y,1 endif rem move up/right if upkey()=1 and rightkey()=1 rotate sprite 1,45.0 endif rem move down/right if downkey()=1 and rightkey()=1 rotate sprite 1,135.0 endif rem move down/left if downkey()=1 and leftkey()=1 rotate sprite 1,225.0 endif rem move up/left if upkey()=1 and leftkey()=1 rotate sprite 1,315.0 endif until escapekey()=1 |