Dim x as int 'x coordinate Dim y as int 'y coordinate Dim z as int 'bitmap number Dim mode as int 'mode x=0 y=0 z=0 mode=0 Sprite 1, "sprite.pic" 'load the sprites While(true) 'do forever If key(#KEY_LEFT) then x=x-1 'move left mode=1 'face left z=z+1 'move feet if z>=5 then z=0 'cycle animation end if If key(#KEY_RIGHT) then x=x+1 'move right mode=0 'face right z=z+1 'move feet if z>=5 then z=0 'cycle animation end if If key(#KEY_UP) then y=y+1 'move up If key(#KEY_DOWN) then y=y-1 'move down Move 1, x, y, z, mode 'move and animate sprite Redraw Wend