0 Members and 4 Guests are viewing this topic.
real(7,0 // Turns off run indicatorreal(0 // Clears screen0→A:Ans→B // Sets your position in the map. The minimum is (0,0), not (1,1) like in the TIOSdim([A]→L6 // Stores the map size into L6{0,0,L6(2)-12,L6(1)-8→L6 // Creates map boundariesRepeat real(8)=15 // Repeats until CLEAR is pressed.real(2,0,A,B,0,0,0,12,0,8,0,0,8,0 // Draws map without updating screenreal(1,40,32,1,8,0,0,8,0,0,1 // Draws character and updates screenRepeat real(8 // Waits for keypressEndA+(real(8)=3 and 0=[A](B+5,A+7))-(real(8)=2 and not([A](B+5,A+5→A // Handles horizontal movementIf A≥L6(4 // Handles horizontal map boundingL6(4→AIf A≤L6(1L6(1→AB+(real(8)=1 and 0=[A](B+6,A+6))-(real(8)=4 and not([A](B+4,A+6→B // Handles vertical movementIf B≥L6(4 // Handles vertical map boundingL6(4→BIf B≤L6(2L6(2→BEnd // End of Repeat real(8)=15 loop
real(7,0real(0 0→A:Ans→Bdim([A]→L6{0,0,L6(2)-12,L6(1)-8→L6Repeat real(8)=15 real(2,0,A,B,0,0,0,12,0,8,0,0,8,0real(1,40,32,1,8,0,0,8,0,0,1Repeat real(8EndA+(real(8)=3 and [A](B+5,A+7)<26)-(real(8)=2 and [A](B+5,A+5)<26→AIf A≥L6(4L6(4→AIf A≤L6(1L6(1→AB+(real(8)=1 and [A](B+6,A+6)<26)-(real(8)=4 and [A](B+4,A+6)<26→BIf B≥L6(4L6(4→BIf B≤L6(2L6(2→BEnd
The one i was programming was about char moving to edge of the screen once the char reach the certain point of the map..and turned out to be epic fail.(xLib created the strange glitch of not displaying that one row)
Quote from: yeongJIN_COOL on January 02, 2011, 07:15:45 pmThe one i was programming was about char moving to edge of the screen once the char reach the certain point of the map..and turned out to be epic fail.(xLib created the strange glitch of not displaying that one row)If you do this, have it so the char remains centered or close when the map needs to scroll, because I saw some games having the character be at the very edge of the screen when scrolling and it gets hard to see where you're going. I prefer to see where I am going.