Retro Lord #1 Posted January 14, 2015 I haven't done too much work with multiple animations and I'm a bit in over my head. I'm doing a Punch Out clone and I'm having trouble with dodging left and right. I can get the character to do the animation but not end them and return to the stance animation. Any experts around that could lend a hand and explain a bit on multiple animation handling? Source so far: rem CODE INSPIRED BY Atarius Maximus at http://www.atariage.com/forums/index.php?showtopic=109288 set kernel_options player1colors playercolors pfcolors dim _Bit1_FireB_Restrainer = d player0x = 60 player0y = 80 main NUSIZ0=$07 f=f+1 rem POSSIBLY INEFFICIENT CODE, SEPARATE COLOR INFO FOR EACH FRAME... if f = 10 && g=0 then player0: %00100100 %00100100 %00100100 %00111100 %00111100 %00000000 %00111100 %00111100 %01011010 %01011010 %01111110 %00100100 %00011000 %00011000 %00011000 %00000000 end if f = 10 then player0color: $3E; $3E; $42; $42; $42; $3E; $3E; $3E; $3E; $3E; $3E; $02; $02; $02; $02; $0E; end if f = 40 && g=0 then player0: %00100100 %00100100 %00111100 %00111100 %00000000 %00111100 %00111100 %01011010 %01011010 %01111110 %00100100 %00011000 %00011000 %00011000 %00000000 %00000000 end if f = 40 then player0color: $3E; $3E; $42; $42; $42; $3E; $3E; $3E; $3E; $3E; $3E; $02; $02; $02; $02; $0E; end if g = 10 then player0: %01001000 %01001000 %01111000 %01111000 %00000000 %01110000 %01110000 %11101000 %11111100 %11111100 %01110100 %00001100 %00110000 %00110000 %00110000 %00000000 end if g = 20 then player0: %01001000 %01001000 %01111000 %01111000 %00000000 %01110000 %01110000 %11101000 %11111100 %11111100 %01110100 %00001100 %00110000 %00110000 %00110000 %00000000 end if f=40 then f=0 drawscreen if !joy0left then _Bit1_FireB_Restrainer{1} = 0 : goto __Skip_Fire if _Bit1_FireB_Restrainer{1} then goto __Skip_Fire _Bit1_FireB_Restrainer{1} = 1 g=10 __Skip_Fire goto main Quote Share this post Link to post Share on other sites
+Random Terrain #2 Posted January 14, 2015 You might get some ideas from this program: atariage.com/forums/topic/179473-fake-gravity-platformer-test/ Quote Share this post Link to post Share on other sites
Retro Lord #3 Posted January 14, 2015 (edited) Thanks, it seems very complicated, but I'm sure I can learn something from it in time =) I managed too do an emergency solution for now, so I atleast can get the rest of the game working too. rem CODE INSPIRED BY Atarius Maximus at http://www.atariage.com/forums/index.php?showtopic=109288 dim _Bit1_FireB_Restrainer = d player0x = 60 player0y = 80 g=0 k=0 main NUSIZ0=$07 COLUP0=$DA COLUPF=$88 rem STANCE f=f+1 rem POSSIBLY INEFFICIENT CODE, SEPARATE COLOR INFO FOR EACH FRAME... if f = 10 && g=0 && k=0 && l=0 then player0: %00100100 %00100100 %00100100 %00111100 %00111100 %00000000 %00111100 %00111100 %01011010 %01011010 %01111110 %00100100 %00011000 %00011000 %00011000 %00000000 end if f = 40 && g=0 && k=0 && l=0 then player0: %00100100 %00100100 %00111100 %00111100 %00000000 %00111100 %00111100 %01011010 %01011010 %01111110 %00100100 %00011000 %00011000 %00011000 %00000000 %00000000 end if f=40 then f=0 rem Dodge left if g = 10 then player0: %01001000 %01001000 %01111000 %01111000 %00000000 %01110000 %01110000 %10101000 %10111100 %11111100 %01110100 %00001100 %00110000 %00110000 %00110000 %00000000 end if g = 20 then player0: %01001000 %01001000 %01111000 %01111000 %00000000 %01110000 %01110000 %10101000 %10111100 %11111100 %01110100 %00001100 %00110000 %00110000 %00110000 %00000000 end if g=20 then g=0 rem Dodge left if k = 10 then player0: %00010010 %00010010 %00011110 %00011110 %00000000 %00001110 %00001110 %00010101 %00111101 %00111111 %00101110 %00110000 %00001100 %00001100 %00001100 %00000000 end if k = 20 then player0: %00010010 %00010010 %00011110 %00011110 %00000000 %00001110 %00001110 %00010101 %00111101 %00111111 %00101110 %00110000 %00001100 %00001100 %00001100 %00000000 end if k=20 then k=0 rem Punch if l = 10 then player0: %00100100 %00100100 %00100100 %00111100 %00111100 %00000000 %00111100 %00111100 %01011000 %01011110 %01111110 %01100010 %00011010 %00011010 %00011010 %00000110 end if l = 20 then player0: %00100100 %00100100 %00100100 %00111100 %00111100 %00000000 %00111100 %00111100 %01011000 %01011110 %01111110 %01100010 %00011010 %00011010 %00011010 %00000110 end if l=20 then l=0 playfield: ....X......................X.... ...XXXXXXXXXXXXXXXXXXXXXXXXXX... ..X.X......................X.X.. .X.XXXXXXXXXXXXXXXXXXXXXXXXXX.X. X.X.X......................X.X.X .X.XXXXXXXXXXXXXXXXXXXXXXXXXX.X. X.XXXXXXXXXXXXXXXXXXXXXXXXXXXX.X .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX end rem USED COUNTERS : d, h, g, k, i drawscreen if joy0left then h=1 : player0x=55 if h=1 then g=g+1 if g=20 then h=0 if g=0 && k=0 then player0x=60 if joy0right then i=1 : player0x=70 if i=1 then k=k+1 if k=20 then i=0 if joy0fire then m=1 : player0y=60 if m=1 then l=l+1 if l=20 then m=0 : player0y=80 goto main Edited January 14, 2015 by Retro Lord Quote Share this post Link to post Share on other sites