Ultimate Amiga

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Moving a spaceship arnd :)  (Read 3519 times)

0 Members and 1 Guest are viewing this topic.

PanTheMan

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 6
Moving a spaceship arnd :)
« 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

Logged

SamuraiCrow

  • compile-time wierdo
  • Forum Mod
  • A1200
  • *****
  • Karma: 5
  • Offline Offline
  • Gender: Male
  • Posts: 946
  • Compile-time wierdo
Re: Moving a spaceship arnd :)
« Reply #1 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.  Particularly the Bob Update command should be what you are looking for.
Logged

PanTheMan

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 6
Re: Moving a spaceship arnd :)
« Reply #2 on: May 21, 2010, 03:22:33 PM »

thnxs m8
Logged

PanTheMan

  • A600
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 6
Re: Moving a spaceship arnd :)
« Reply #3 on: May 21, 2010, 03:34:01 PM »

yay!!! it works just got it working :)
Logged
Pages: [1]   Go Up
 

TinyPortal 2.2.2 © 2005-2022