Board Thread:Questions and Answers/@comment-72.10.97.5-20140610125817/@comment-24454571-20140610214253

I personally don't know too much about that kind of stuff, but I think most people here do know quite a lot about that stuff. I know a few things here and there, like how two of the parameters of the SPOFS (SPRITE OFFSET) command are X, & Y values on the screen, 256x192, [although it can go beyond the screen]. By using commands like BUTTON you can have that characters X & Y values be altered.

Try something like...

ACLS:CLEAR X=128:Y=128

SPSET 0,64,2,1,1,0 'this says that Sprite 0 has parameters, 64,2,1,1,0 'which generally do silly things like flip the sprite SPOFS 0,X,Y-128,0 'this says move Sprite 0 to X, Y, over 0 frames (1/60th second)

SPOFS 0,X,Y,120 'A little animation set up for fun

@LOOP IF BUTTON(2)==1 THEN Y=1-1 'BUTTON(2) accepts buttons as they are pressed IF BUTTON(2)==2 THEN Y=Y+1 '1,2,4,8 are the control numbers for the direction keys IF BUTTON(2)==4 THEN X=X-1 'a statement like X=X+1 will change X to = X+1 IF BUTTON(2)==8 THEN X=X+1 'normally people would include VSYNC 1 which waits for the frame to update once 'as a result of not including it, the loop will accept the same button press many times IF X<=0 THEN X=0 IF X>=256 THEN X=256 'this is how I decided to keep the sprite within the boundaries of the screen IF Y<=0 THEN Y=0 IF Y>=192 THEN Y=192 'somehow something is off about it- I clearly have much to learn GOTO@LOOP

By the way, if you're interested in typing like that ^ ^ ^ "Switch to Source Mode" at the bottom left of the post, with those little options, one of them looking like brackets, and type in there, but use the tags and around what you type - you'll know you got it right if you switch back to "Visual Mode" and it looks like a little puzzle peace.