0 Members and 1 Guest are viewing this topic.
.DINO#Icon(007E00FF00DF00FF00F000FE81F883F8C7FEFFFAFFF83FF00FE0066004400660)41→Q→ZPic1DINO1→N.ANIM 1Goto MENUprgmTILESPRTLbl TXXTText(20→B*256+3Text r₁Text(6659Text r₂Text(8195Text r₃ReturnLbl PAUSEFor(35565)EndReturn[0000000000004143→Pic1DINO1[7EFFDFFFFFF0FCE0[677F7F3F1F0C080C[E0F8E8C080C00000.ANIM 2[0000000000004143→Pic1DINO2[7EFFDFFFFFF0FCE0[677F7F3F1F080C00[E0F8E8C0C0C080C0.CACTUS[001858D8D8DADBDB→Pic1CACT1[DB7E3C1818181818Lbl OPTNClrDrawPAUSE()TXXT("Min Dist","Min Offset","Back"Text(40*256)Text "Ducking coming soon!IRect(3,20,32,6Text(20*256+33Text Z►DecText(26*256+35Text Q►DecDispGraphWhile 1If B=26 and getKey(2)Text(26*256+35Text max(Q-1,1)→Q►DecPAUSE()EndIf B=26 and getKey(3)Text(26*256+35Text min(Q+1,65534)→Q►DecPAUSE()EndIf B=20 and getKey(2)Text(20*256+33Text max(Z-1,1)→Z►DecPAUSE()EndIf B=20 and getKey(3)Text(20*256+33Text min(Z+1,65534)→Z►DecPAUSE()EndIf getKey(15) or (B=32 and getKey(54))Pause 400Goto MENUEndIf getKey(4)3Asm(E5IRect(,B,30,6Asm(E1IRect(,max(B-6,20)→B,30,6PAUSE()EndIf getKey(1)3Asm(E5IRect(,B,30,6Asm(E1IRect(,min(B+6,32)→B,30,6PAUSE()EndDispGraphEndLbl MENUClrDrawFix 5RectI(0,16,*2+1,26RectI(1→D,17,31,24TXXT("PLAY!","OPTIONS","QUIT")IRect(3,20,27,7While 1If getKey(4)3Asm(E5IRect(,B,27,7Asm(E1IRect(,max(B-6,20)→B,27,7D++PAUSE()EndIf getKey(1)3Asm(E5IRect(,B,27,7Asm(E1IRect(,min(B+6,32)→B,27,7D--PAUSE()EndDispGraphIf getKey(15)Fix 4ReturnEndEndIf getKey(54)!If B-32Fix 4ReturnEnd!If B-26Goto OPTNEndLbl MLOOPClrDraw196→I47*256→C→B→A15→F→D→J-2→E→H#ExprOnWhile 1RectI(0,63,95,1RectI(31,23,65,1RectI(31,0,+1,22!If H--Rect(90,0,+2,23rand^Q+Z→HEndIf I++ and {22*12+L₆+3}ʳ[e]7TS(,+1,88,47,Pic1CACT1⁻3→IEndLbl JUMPIf C-47 or (D<<0)D+E→D+B→BEndIf C>47-1→D12→E12032→BElse!If C-4712→EEndIf C≥47 and getKey(4)⁻350→DEndIf getKey(1)50→EEndDS<(F,20)If Pic1DINO1=NPic1DINO2→NElsePic1DINO1→NEndEnd2Asm(E5TS(,,-2,C,N)DispGraphAsm(E1TS(,,-2,C,N)RectI(0,63,95,1)RectI(31,23,65,1)WRect(31,0,+1,21)Horizontal-B/256→CEndIf pxl-Test(15,C+4) or pxl-Test(8,*2+C) or pxl-Test(4,C+16) or getKey(15)Goto MENU
.DINO...B=(In menus)Cursor location (In game)Dino location (/256)Q=Random space between cacti (Offset from Z)Z=Minimum space between cacti...#Icon(007E00FF00DF00FF00F000FE81F883F8C7FEFFFAFFF83FF00FE0066004400660)40→Q→ZPic1DINO1→NGoto MENU...8x8 sprite stacking routine I madeTakes 5 arguments: Width, height, X, Y, Pointer to start of sprite data....prgmTILESPRTLbl TXXTText(20→B*256+3)Text r₁Text(6659)Text r₂Text(8195)Text r₃ReturnLbl PAUSEFor(35565)EndReturn.First animation of the running dino[0000000000004143]→Pic1DINO1[7EFFDFFFFFF0FCE0][677F7F3F1F0C080C][E0F8E8C080C00000].Second animation of the running dino[0000000000004143]→Pic1DINO2[7EFFDFFFFFF0FCE0][677F7F3F1F080C00][E0F8E8C0C0C080C0].Cactus sprites[001858D8D8DADBDB]→Pic1CACT1[DB7E3C1818181818]Lbl OPTNClrDrawPAUSE()TXXT("Min Dist","Min Offset","Back")Text(40*256)Text "Ducking coming soon!IRect(3,20,32)Text(20*256+33)Text Z►DecText(26*256+35)Text Q►DecDispGraphWhile 1.If the cursor is at the right place and the left arrow key is pressedIf B=26 and getKey(2)Text(26*256+35.If the random distance is greater than 1, if so, decrease the random distanceText max(Q-1,1)→Q►DecPAUSE()EndIf B=26 and getKey(3)Text(26*256+35Text min(Q+1,65534)→Q►DecPAUSE()End.If the minimum distance is greater than 1, if so, decrease the minimum distanceIf B=20 and getKey(2)Text(20*256+33)Text max(Z-1,1)→Z►DecPAUSE()EndIf B=20 and getKey(3)Text(20*256+33)Text min(Z+1,65534)→Z►DecPAUSE()End.Go to the menu if [clear] or back is pressedIf getKey(15) or (B=32 and getKey(54))Pause 400Goto MENUEndIf getKey(4)3Asm(E5)IRect(,B,30,6)Asm(E1)IRect(,max(B-6,20)→B,30,6)PAUSE()EndIf getKey(1)3Asm(E5)IRect(,B,30,6)Asm(E1)IRect(,min(B+6,32)→B,30,6)PAUSE()EndDispGraphEndLbl MENUClrDrawFix 5RectI(0,16,*2+1,26)RectI(1→D,17,31,24)TXXT("PLAY!","OPTIONS","QUIT")IRect(3,20,27,7)While 1If getKey(4)3Asm(E5)IRect(,B,27,7)Asm(E1)IRect(,max(B-6,20)→B,27,7)D++PAUSE()EndIf getKey(1)3Asm(E5)IRect(,B,27,7)Asm(E1)IRect(,min(B+6,32)→B,27,7)D--PAUSE()EndDispGraph.Quit if [clear] is pressedIf getKey(15)Goto QQEndEndIf getKey(54).Checks cursor location for where to go!If B-32Lbl QQFix 4ReturnEnd!If B-26Goto OPTNEndLbl MLOOPClrDraw.I is a counter so I don't get bold cacti1→I.Dino location47*256→B.btw C=B/256...D=VelocityE=Gravity strengthF=Dino animation counterH=Cactus distance (rand^randomDistance+minimumDistance→H...15→F→D-2→E→H.The screen scrolling seems to be smoother with this#ExprOnWhile 1RectI(0,63,95,1)RectI(31,23,65,1)RectI(31,0,+1,22)!If H--.Create cactus on the cut top screenRect(90,0,+2,23).New cactus distancerand^Q+Z→HEnd.Tests if the top screen's cactus has hit a certain part, if so, make a cactus. (btw pxl-Test(31,22))If I++ and {22*12+L₆+3}ʳ[e]7.Makes a cactus 1 tile wide and 2 tiles highTS(,+1,88,47,Pic1CACT1).Makes it so that the cactus won't be bold⁻3→IEndLbl JUMP.If the dino isn't on the ground or the dino is jumping, apply accelerationIf C-47 or (D<<0)D+E→D+B→BEnd.If the dino is under ground, take away all velocity, put the gravity back to normal, and put the dino on the groundIf C>47-1→D12→E12032→B.If the dino is on the ground, put the gravity back to normalElse!If C-4712→EEnd.If the dino is on the ground, and up is pressed, add an upwards force to the dino's positionIf C≥47 and getKey(4)⁻350→DEnd.If down is pressed, increase the gravityIf getKey(1)50→EEnd.Animation changerDS<(F,20).I realized this later and fixed it, I just forgot to update the codeIf Pic1DINO1-NPic1DINO1→NElsePic1DINO2→NEndEnd.Draw dino2Asm(E5)TS(,,-2,C,N)DispGraphAsm(E1).Undraw everythingTS(,,-2,C,N)RectI(0,63,95,1)RectI(31,23,65,1)WRect(31,0,+1,21)Horizontal-B/256→CEndIf pxl-Test(15,C+4) or pxl-Test(8,*2+C) or pxl-Test(4,C+16) or getKey(15)Goto MENU