to move a 2D sprite is simple once you get it down...
` this loads the bitmaps and declares some variables.
sync on
set display mode 800,600,16
load bitmap "space.bmp",0
load bitmap "ship.bmp",1
shipx# = 1
shipy# = 1
` this cuts the specified area out of the bitmap and loads them into an image number and starts the main loop
do
get image 1,0,0,50,75
` this sctually prints the image onto the screen the 1 on the left is the sprite number and the 1 on the right is the image number
sprite 1,shipx#,shipy#,1
` this increases or deacrease shipx# and shipY# depending on what key is pressed.
if rightkey() = 1 then shipx# = shipx# + 8
if leftkey() = 1 then shipx# = shipx# - 8
if upkey() = 1 then shipy# = shipy# - 7
if downkey() = 1 then shipy# = shipy# + 7
if returnkey() = 1 then gosub quit
if shiftkey() = 1 then gosub lost
` this syncs and loops back to do
sync
loop
lost:
shipx# = 1
shipy# = 1
return
i hope that wasnt too vague, if it was then please reply. I'm not exactly sure how to animate sprites yet but that will move one around screen for you. I hope i helped.
-gpex-
Your signature has been erased by a mod because it is larger than 600x120...