` ``:getKey→I :X-(Ans=24)+(Ans=26→X :Y-(I=25)+(I=34→Y`

Much smaller and faster. As for the collision detection, you can implement it for every border via:

` ``:getKey→I :X-(Ans=24)(X≠left border)+(Ans=26)(X≠right border→X :Y-(I=25)(Y≠top border)+(I=34)(Y≠bottom border)→Y`

Now, I'm going to be completely honest with you…it seems you have a bit of a ways to go when it comes to techniques. But hey, that's what practice is for! If you want to read up on how to improve your skills in movements and other game features, check out Movement in Maps and Movement on the Homescreen and Graphscreen. The routine shown in the latter page is a bit different than the one I've provided (and a few bytes shorter), but this is the one I've always used. Come to think of it I'm not sure why I haven't switched over to the other version…

]]>Small Piece of the game:

` ``If M=0002 Then ClrHome Output(1,1,"TEST MAP 2" Pause ClrHome 200->G 5->X 6->Y 1->S While 1 Repeat I getKey->I Output(Y,X,"X" If I=24 Then ClrHome X-1->X End If I=25 Then ClrHome Y-1->Y End If I=26 Then ClrHome X+1->X End If I=34 Then ClrHome Y+1->Y End If S=1 Then Output(1,1,"TTTTTTTTTTTTTTTT" Output(8,1,"TTTTTTTTTTTTTTTT" End If S=2 Then Output(3,4,"III" End If Y=1 and S=1 //Collision Detection Then If X=1 Then 2->Y End If X=2 Then 2->Y End If X=3 Then 2->Y End If X=4 Then 2->Y End If X=5 Then 2->Y End If X=6 Then 2->Y End If X=7 Then 2->Y End If X=8 Then 2->Y End If X=9 Then 2->Y End If X=10 Then 2->Y End If X=11 Then 2->Y End If X=12 Then 2->Y End If X=13 Then 2->Y End If X=14 Then 2->Y End If X=15 Then 2->Y End If X=16 Then 2->Y End End End End End`