Board Thread:Questions and Answers/@comment-24720902-20130524153123/@comment-7236903-20130525165354

for a simple moving program try this:

SPSET 'your sprite

SPHOME 0,7,7

PX=128: PY=96

@MAIN

B=BUTTON

IF B AND 1 THEN PY=PY-1

IF B AND 2 THEN PY=PY+1

IF B AND 4 THEN PX=PX-1

IF B AND 8 THEN PX=PX+1

SPOFS 0,PX,PY

VSYNC 1

GOTO @MAIN

for a smoother more advanced moving, try this:

SPSET 'your sprite

SPHOME 0,7,7

PX=128:PY=96

@MAIN

B=BUTTON:CTR=0:ANG=0

IF B AND 15 THEN SPD=1 ELSE SPD=0

IF B AND 1 THEN CTR=1

IF B AND 2 THEN CTR=2

IF B AND 4 THEN CTR=CTR+4

IF B AND 8 THEN CTR=CTR+8

IF CTR==8 THEN ANG=0

IF CTR==10 THEN ANG=45

IF CTR==2 THEN ANG=90

IF CTR==6 THEN ANG=135

IF CTR==4 THEN ANG=180

IF CTR==5 THEN ANG=225

IF CTR==1 THEN ANG=270

IF CTR==9 THEN ANG=315

PX=PX+COS(RAD(ANG))*SPD

PY=PY+SIN(RAD(ANG))*SPD

SPOFS 0,PX,PY

VSYNC 1

GOTO @MAIN

this one will move in a circular motion to keep the speed the same when moving  diagonal   the other one will move at a speed of sqrt(2) when moving  diagonal  so you move faster when moving  diagonal, this one was meant to fix that.

I hope this helps!