Ultimate Amiga

Network Boards => AMOS Programming Environment => AMOS Factory => AMOS BASIC => Topic started by: PanTheMan on May 21, 2010, 02:05:52 PM

Title: Moving a spaceship arnd :)
Post by: PanTheMan on May 21, 2010, 02:05:52 PM
Hi pple,

need your help heres my code want to move the ship around the screen with the joystick but it wont work below is my code can you tell me what i`ve done wrong:

Screen open 0,320,256,32,lowres
cls 0 : flash off
x=1
y=100
bob 1,x,y,3
do
if jright(1) then x=x+1
if jup(1)    then y=y+1
if jdown(1) then y=y-1
if jleft(1) then   x=x-1
bob 1,x,y,3
loop

thnxs guys

pan

Title: Re: Moving a spaceship arnd :)
Post by: SamuraiCrow on May 21, 2010, 02:56:02 PM
Maybe you should look into the Double Buffer, Autoback, Wait Vbl, and Bob Update commands in the AmosPro Manual (http://amos.condor.serverpro3.com/AmosProManual/).  Particularly the Bob Update command should be what you are looking for.
Title: Re: Moving a spaceship arnd :)
Post by: PanTheMan on May 21, 2010, 03:22:33 PM
thnxs m8
Title: Re: Moving a spaceship arnd :)
Post by: PanTheMan on May 21, 2010, 03:34:01 PM
yay!!! it works just got it working :)