@UP
Y=Y-1
VSYNC 1
IF SPHITSP(1,0) THEN ACLS
RETURN
@DOWN
Y=Y+1
VSYNC 1
IF SPHITSP(1,0) THEN ACLS
RETURN
@LEFT
X=X-1
VSYNC 1
IF SPHITSP(1,0) THEN ACLS
RETURN
continued...
Heres a little sprite collision code.
SPSET 0,0,0
SPSET 1,16,0
SPHOME 1,-50,-100
SPCOL 0
SPCOL 1
@BUMP
SPOFS 0,X,Y,-10
B=BUTTON
IF B AND 1 THEN GOSUB @UP
IF B AND 2 THEN GOSUB @DOWN
IF B AND 4 THEN GOSUB @LEFT
IF B AND 8 THEN GOSUB @RIGHT
GOTO @BUMP
continued...
SPSET 0,0,0
@MOVE
SPOFS 0,X,Y,-10
B=BUTTON()
IF B AND 1 THEN Y=Y-1
IF B AND 2 THEN Y=Y+1
IF B AND 4 THEN X=X-1
IF B AND 8 THEN X=X-1
GOTO @MOVE
This makes a sprite move
INPUT "do you like bananas?";BANANA$
IF BANANA$=="no"THEN PRINT "okay then."
IF BANANA$=="yes"THEN PRINT "I love bananas too!"
INPUT asks a question, here you can only give two answers, yes and no so what this code means is, if you type yes then put i like bananas too! on the screen. But if you type no put okay then on the screen.