Jump to content

Rabbit 2600

Members
  • Posts

    745
  • Joined

  • Last visited

Everything posted by Rabbit 2600

  1. bogax is awesome, yeah =) Okay, I made the changes and I got the game running. But now, player1 dosn't move anymore. What's going on? (In the world of Polly Pocket) =) rem CODE INSPIRED BY Atarius Maximus at http://www.atariage.com/forums/index.php?showtopic=109288 set kernel_options no_blank_lines set smartbranching on dim _P1_L_R = player1x.a dim _Bit0_Player0_Sword = c dim _Bit1_Player1_Sword = c dim _Bit2_Player0_LR = c dim _Bit1_FireB_Restrainer = e dim _Swing_Counter = r const pfscore=1 AUDV0=0 AUDV1=0 player0x = 78 player0y = 80 player1x = 255 player1y = 80 missile1x = 84 missile1y = 75 _Bit2_Player0_LR{2} = 1 pfscore1 = 21 __Main_Loop COLUPF = $42 COLUP0 = $00 COLUP1 = $00 scorecolor = $0E pfscorecolor = $0E playfield: ................................ ................................ ................................ ................................ ................................ ................................ ................................ .............XXXXXX............. ...........XXXXXXXXXX........... ..........XXXXXXXXXXXX.......... .........XXXXXXXXXXXXXX......... end rem POSSIBLY INEFFICIENT CODE, SEPARATE COLOR INFO FOR EACH FRAME... player0: %01101100 %01101100 %01101000 %00110000 %00110000 %00111000 %00100000 %00110000 %10110000 %11000000 end f=f+1 rem POSSIBLY INEFFICIENT CODE, SEPARATE COLOR INFO FOR EACH FRAME... if f = 30 then player1: %00011100 %00011100 %00011100 %00001100 %00001100 %00011100 %00100100 %00101100 %00101101 %00000011 end if f = 60 then player1: %00110110 %00110110 %00011110 %00001100 %00001100 %11111100 %00000100 %00001100 %00001101 %00000011 end if f=60 then f=0 if !joy0fire then _Bit1_FireB_Restrainer{1} = 0 : goto __Skip_Fire if _Bit1_FireB_Restrainer{1} then goto __Skip_Fire _Bit1_FireB_Restrainer{1} = 1 _Bit0_Player0_Sword{0} = 1 __Skip_Fire if !_Bit0_Player0_Sword{0} then missile1height = 4 : _Swing_Counter = 0 : goto __Skip_Sword_Swing NUSIZ1 = $20 : missile1height = 0 _Swing_Counter = _Swing_Counter + 1 if _Swing_Counter > 30 then _Swing_Counter = 0 : _Bit0_Player0_Sword{0} = 0 __Skip_Sword_Swing if _Swing_Counter > 0 then goto __Stop if joy0left then _Bit2_Player0_LR{2} = 0 if joy0right then _Bit2_Player0_LR{2} = 1 __Stop if _Bit2_Player0_LR{2} then goto __Skip_Left REFP0 = 8 if !_Bit0_Player0_Sword{0} then missile1x = player0x + 3 : missile1y = player0y - 5 if _Bit0_Player0_Sword{0} then missile1x = player0x : missile1y = player0y - 5 __Skip_Left if _Bit2_Player0_LR{2} then REFP0 = 0 : missile1x = player0x + 6 : missile1y = player0y - 5 drawscreen if collision(player0,player1) then pfscore1 = pfscore1/4 : player1x = 255 if collision(missile1,player1) && missile1height = 0 then n = 11 : player1x = 255 : score = score + 10 dim tmp1 = temp1.temp2 if player1x = 255 then d = rand&1 player1y = 80 q = q + 1 temp1 = 0 rem temp2 = q * .1015625, 1/128 + 1/32 + 1/16, approximately 1/10 wont work if q > 158 temp2 = ((q / 4 + q) / 2 + q) / 16 temp2 = table[temp2] if !d then player1x = 140 : REFP1 = 0 : _P1_L_R = _P1_L_R - tmp1 else player1x = 10 : REFP1 = 8 : REFP1 = 8 : _P1_L_R = _P1_L_R - tmp1 d = d + 2 goto __Main_Loop data table 94, 120, 146 end
  2. Hm, I can't get it working. What am I doing wrong? rem CODE INSPIRED BY Atarius Maximus at http://www.atariage.com/forums/index.php?showtopic=109288 set kernel_options no_blank_lines set smartbranching on dim _P1_L_R = player1x.a dim _Bit0_Player0_Sword = c dim _Bit1_Player1_Sword = c dim _Bit2_Player0_LR = c dim _Bit1_FireB_Restrainer = e dim _Swing_Counter = r const pfscore=1 AUDV0=0 AUDV1=0 player0x = 78 player0y = 80 player1x = 255 player1y = 80 missile1x = 84 missile1y = 75 _Bit2_Player0_LR{2} = 1 pfscore1 = 21 __Main_Loop COLUPF = $42 COLUP0 = $00 COLUP1 = $00 scorecolor = $0E pfscorecolor = $0E playfield: ................................ ................................ ................................ ................................ ................................ ................................ ................................ .............XXXXXX............. ...........XXXXXXXXXX........... ..........XXXXXXXXXXXX.......... .........XXXXXXXXXXXXXX......... end rem POSSIBLY INEFFICIENT CODE, SEPARATE COLOR INFO FOR EACH FRAME... player0: %01101100 %01101100 %01101000 %00110000 %00110000 %00111000 %00100000 %00110000 %10110000 %11000000 end f=f+1 rem POSSIBLY INEFFICIENT CODE, SEPARATE COLOR INFO FOR EACH FRAME... if f = 30 then player1: %00011100 %00011100 %00011100 %00001100 %00001100 %00011100 %00100100 %00101100 %00101101 %00000011 end if f = 60 then player1: %00110110 %00110110 %00011110 %00001100 %00001100 %11111100 %00000100 %00001100 %00001101 %00000011 end if f=60 then f=0 if !joy0fire then _Bit1_FireB_Restrainer{1} = 0 : goto __Skip_Fire if _Bit1_FireB_Restrainer{1} then goto __Skip_Fire _Bit1_FireB_Restrainer{1} = 1 _Bit0_Player0_Sword{0} = 1 __Skip_Fire if !_Bit0_Player0_Sword{0} then missile1height = 4 : _Swing_Counter = 0 : goto __Skip_Sword_Swing NUSIZ1 = $20 : missile1height = 0 _Swing_Counter = _Swing_Counter + 1 if _Swing_Counter > 30 then _Swing_Counter = 0 : _Bit0_Player0_Sword{0} = 0 __Skip_Sword_Swing if _Swing_Counter > 0 then goto __Stop if joy0left then _Bit2_Player0_LR{2} = 0 if joy0right then _Bit2_Player0_LR{2} = 1 __Stop if _Bit2_Player0_LR{2} then goto __Skip_Left REFP0 = 8 if !_Bit0_Player0_Sword{0} then missile1x = player0x + 3 : missile1y = player0y - 5 if _Bit0_Player0_Sword{0} then missile1x = player0x : missile1y = player0y - 5 __Skip_Left if _Bit2_Player0_LR{2} then REFP0 = 0 : missile1x = player0x + 6 : missile1y = player0y - 5 drawscreen if collision(player0,player1) then pfscore1 = pfscore1/4 : player1x = 255 if collision(missile1,player1) && missile1height = 0 then n = 11 : player1x = 255 : score = score + 10 if player1x = 255 then d = rand&1 player1y = 80 q = q + 1 temp1 = 0 rem temp2 = q * .1015625, 1/128 + 1/32 + 1/16, approximately 1/10 wont work if q > 158 temp2 = (((q / 4} + q) / 2 + q) / 16 temp2 = table[temp2] if !d then player1x = 140 : REFP1 = 0 : _P1_L_R = _P1_L_R - tmp1 else player1x = 10 : REFP1 = 8 : REFP1 = 8 : _P1_L_R = _P1_L_R - tmp1 d = d + 2 goto __Main_Loop data table 94, 120, 146 end
  3. Hm, I get a syntax error at "_P1_L_R = _P1_L_R - 0.37"
  4. I can't seem to get the difficulty to increase properly. The idea is that after defeating 10 enemies they get faster, after 10 more they get even faster and so on. This is my code for player1's movement if player1x = 255 then d = (rand&1) if d = 0 then player1y = 80 : player1x = 140 : d = d + 2 if d = 1 then player1y = 80 : player1x = 10 : d = d + 2 if d = 2 then _P1_L_R = _P1_L_R - 0.37 : REFP1 = 0 if d = 3 then _P1_L_R = _P1_L_R + 0.37 : REFP1 = 8 I tried doing something like this, but it didn't work, but I feel that I'm on the right track atleast? if player1x = 255 then d = (rand&1) if d = 0 then player1y = 80 : player1x = 140 : d = d + 2 : q = q + 1 if d = 1 then player1y = 80 : player1x = 10 : d = d + 2 : q = q + 1 if q = 10 then goto SPEED2 if q = 20 then goto SPEED3 SPEED1 if d = 2 then _P1_L_R = _P1_L_R - 0.37 : REFP1 = 0 if d = 3 then _P1_L_R = _P1_L_R + 0.37 : REFP1 = 8 goto MAIN SPEED2 if d = 2 then _P1_L_R = _P1_L_R - 0.47 : REFP1 = 0 if d = 3 then _P1_L_R = _P1_L_R + 0.47 : REFP1 = 8 goto MAIN SPEED3 if d = 2 then _P1_L_R = _P1_L_R - 0.57 : REFP1 = 0 if d = 3 then _P1_L_R = _P1_L_R + 0.57 : REFP1 = 8 goto MAIN
  5. Ahh, so that's how it was supposed to be! Cheers! That is great =)
  6. Hm, sorry to be a bother again, but I just can't get the repetition restrainer to work so you can't hold down the fire button. SOURCE : Swordtest2.bas Code: rem CODE INSPIRED BY Atarius Maximus at http://www.atariage.com/forums/index.php?showtopic=109288 set smartbranching on dim _Bit0_Player0_Sword = c dim _Bit1_Player1_Sword = c dim _Bit2_Player0_LR = c dim _P1_L_R = player1x.a dim _Bit1_FireB_Restrainer = e const pfscore=1 AUDV0=0 AUDV1=0 player0x = 78 player0y = 80 player1x = 255 player1y = 80 missile0x = 84 missile0y = 75 _Bit2_Player0_LR{2} = 1 pfscore1 = 21 __Main_Loop COLUPF = $42 COLUP0 = $00 COLUP1 = $00 scorecolor = $0E pfscorecolor = $0E playfield: ................................ ................................ ................................ ................................ ................................ ................................ ................................ .............XXXXXX............. ...........XXXXXXXXXX........... ..........XXXXXXXXXXXX.......... .........XXXXXXXXXXXXXX......... end rem POSSIBLY INEFFICIENT CODE, SEPARATE COLOR INFO FOR EACH FRAME... player0: %01101100 %01101100 %01101000 %00110000 %00110000 %00111000 %00100000 %00110000 %10110000 %11000000 end f=f+1 rem POSSIBLY INEFFICIENT CODE, SEPARATE COLOR INFO FOR EACH FRAME... if f = 30 then player1: %00011100 %00011100 %00011100 %00001100 %00001100 %00011100 %00100100 %00101100 %00101101 %00000011 end if f = 60 then player1: %00110110 %00110110 %00011110 %00001100 %00001100 %11111100 %00000100 %00001100 %00001101 %00000011 end if f=60 then f=0 if !joy0fire then _Bit1_FireB_Restrainer{1} = 0 : goto __Skip_Fire if _Bit1_FireB_Restrainer{1} then goto __Skip_Fire _Bit1_FireB_Restrainer{1} = 1 _Bit0_Player0_Sword{0} = 0 if joy0fire then _Bit0_Player0_Sword{0} = 1 if !_Bit0_Player0_Sword{0} then missile0height = 4 if _Bit0_Player0_Sword{0} then NUSIZ0 = $20 : missile0height = 0 if joy0left then _Bit2_Player0_LR{2} = 0 if joy0right then _Bit2_Player0_LR{2} = 1 if _Bit2_Player0_LR{2} then goto __Skip_Left REFP0 = 8 if !_Bit0_Player0_Sword{0} then missile0x = player0x + 3 : missile0y = player0y - 5 if _Bit0_Player0_Sword{0} then missile0x = player0x : missile0y = player0y - 5 __Skip_Left if _Bit2_Player0_LR{2} then REFP0 = 0 : missile0x = player0x + 6 : missile0y = player0y - 5 __Skip_Fire drawscreen if collision(player0,player1) then pfscore1 = pfscore1/4 : player1x = 255 if collision(missile0,player1) && missile0height = 0 then n = 11 : player1x = 255 : score = score + 10 if player1x = 255 then d = (rand&1) if d = 0 then player1y = 80 : player1x = 140 : d = d + 2 if d = 1 then player1y = 80 : player1x = 10 : d = d + 2 if d = 2 then _P1_L_R = _P1_L_R - 0.37 : REFP1 = 0 if d = 3 then _P1_L_R = _P1_L_R + 0.37 : REFP1 = 8 if n > 0 then AUDV0 = 15 : AUDC0 = 7 : AUDF0 = 20 : n = n - 1: if n = 0 then AUDV0 = 0 goto __Main_Loop
  7. Thank you, Random Terrain. That was exactly how I wanted the missile0 to behave. I really must learn to use dim's someday =)
  8. Trying to learn some neat tricks with missiles I figured they would make good swords so I managed to get something rudimentary going where you can swing your sword by pressing the fire button. But I can't make it reset again once it's been swung. Any ideas? SOURCE: Swordtest.bas CODE: rem CODE INSPIRED BY Atarius Maximus at http://www.atariage.com/forums/index.php?showtopic=109288 player0x = 78 player0y = 80 player1x = 90 player1y = 80 missile0x = 84 missile0y = 75 a = 0 main COLUPF = $42 playfield: ................................ ................................ ................................ ................................ ................................ ................................ ................................ .............XXXXXX............. ...........XXXXXXXXXX........... ..........XXXXXXXXXXXX.......... .........XXXXXXXXXXXXXX......... end rem POSSIBLY INEFFICIENT CODE, SEPARATE COLOR INFO FOR EACH FRAME... player0: %01101100 %01101100 %01101000 %00110000 %00110000 %00111000 %00100000 %00110000 %10110000 %11000000 end f=f+1 rem POSSIBLY INEFFICIENT CODE, SEPARATE COLOR INFO FOR EACH FRAME... if f = 30 then player1: %00011100 %00011100 %00011100 %00001100 %00001100 %00011100 %00100100 %00101100 %00101101 %00000011 end if f = 60 then player1: %00110110 %00110110 %00011110 %00001100 %00001100 %11111100 %00000100 %00001100 %00001101 %00000011 end if f=60 then f=0 drawscreen if a = 0 then missile0height = 4 if a = 1 then NUSIZ0 = $20 : missile0height = 0 if joy0fire then a = 1 dim playerfacing = b if joy0right then playerfacing = 0 if joy0left then playerfacing = 8 REFP0 = playerfacing goto main Swordtest.bas
  9. Good advice. I didn't think of using the playfield as the rope. Thank you!
  10. Just a quick question. What would be the best route to go to make a jumprope in a minigame where you simply - play jumprope? I made 2 clones of player1. So far so good. But when it comes to the rope. I went with missile1 but it's way to short when stretched to 8 pixels wide. How would you solve this? =)
  11. Ah! That explains it, it was the y direction I had problem with. Fixed it and now it works. A thousand thanks =)
  12. Interesting, that seems a bit more efficient. Thank you =) Hm, I'm making small progress towards player1 moving towards player0. I managed to get it moving once. Then it stopped working, strange, but I think I'll find the solution soon.
  13. Mm'kay. How would I work with tables? I have no experience with such things =) And I've tried just using if player1x < player0x then player1x = player1x by itself. Which is what you mean if I understood you correctly? But it didn't do anything either.
  14. But I can't seem to make player1 move towards player0. I tried if a = 0 then player1x=1:player1y=50 : player1x = player1x + 1 but it dosn't do anything.
  15. Nevermind, it was a = 0 that messed things up =)
  16. Yeah, the trouble was the missile not moving, I got it working now, haha. =) Hm, I have yet another problem I've forgotten how to do properly. When the missile hits player1 I want it to get 1 of 4 positions chosen at random. And I've gotten that to work but, it instantly goes back to it's original position instead of staying in that position. Any ideas? Source: Blast Zone.bas The code in question: drawscreen if player1x < player0x then player1x = player1x + 1 if player1x > player0x then player1x = player1x - 1 if collision(missile0,player1) then player1x=255 : player1y=255 : missile0x = 255 : missile0y = 255 : a = (rand&3) if a = 0 then player1x=1:player1y=50 if a = 1 then player1x=90:player1y=50 if a = 2 then player1x=80:player1y=1 if a = 3 then player1x=80:player1y=90 The entire code: rem Generated 2013-09-20 23:26:46 by Visual bB Version 1.0.0.554 rem ********************************** rem *<filename> * rem *<description> * rem *<author> * rem *<contact info> * rem *<license> * rem ********************************** rem **************************************************************** rem * rem * Sprite with Missile rem * rem * Example program by Duane Alan Hahn (Random Terrain) using rem * hints, tips, code snippets, and more from AtariAge members rem * such as batari, SeaGtGruff, RevEng, Robert M, Nukey Shay, rem * Atarius Maximus, jrok, supercat, GroovyBee, and bogax. rem * rem **************************************************************** rem * rem * Instructions: rem * rem * Use the joystick to move the sprite. Press the fire button rem * to shoot the missile. rem * rem **************************************************************** rem **************************************************************** rem * rem * Create aliases for variables. rem * rem **************************************************************** rem ` rem ` (You can have more than one alias for each variable.) rem ` rem ```````````````````````````````````````````````````````````````` rem ```````````````````````````````````````````````````````````````` rem ` All-purpose bits for various jobs. rem ` dim _BitOp_All_Purpose_01 = t dim _Bit0_Debounce_Reset = t dim _Bit7_Missile0_Moving = t rem ```````````````````````````````````````````````````````````````` rem ` Player0/Missile0 direction bits. rem ` dim _BitOp_P0_M0_Direction = u dim _Bit0_Player0_Direction_Up = u dim _Bit1_Player0_Direction_Down = u dim _Bit2_Player0_Direction_Left = u dim _Bit3_Player0_Direction_Right = u dim _Bit4_Missile0_Direction_Up = u dim _Bit5_Missile0_Direction_Down = u dim _Bit6_Missile0_Direction_Left = u dim _Bit7_Missile0_Direction_Right = u rem **************************************************************** rem * rem * Defines the edges of the playfield for an 8 x 8 sprite. rem * If your sprite is a different size, you`ll need to adjust rem * the numbers. rem ` def _P_Edge_Left=1 def _P_Edge_Right=153 def _P_Edge_Top=9 def _P_Edge_Bottom=88 rem **************************************************************** rem * rem * Defines the edges of the playfield for the missile. rem * If the missile is a different size, you`ll need to adjust rem * the numbers. rem ` def _M_Edge_Left=2 def _M_Edge_Right=158 def _M_Edge_Top=2 def _M_Edge_Bottom=87 rem **************************************************************** rem **************************************************************** rem * rem * Program Start/Restart rem * rem ` __Start_Restart rem **************************************************************** rem * rem * Mute volume of both sound channels. rem ` AUDV0 = 0 : AUDV1 = 0 rem **************************************************************** rem * rem * Clears all normal variables. rem ` for temp5 = 0 to 25 : a[temp5] = 0 : next rem **************************************************************** rem * rem * Starting position of Player0. rem ` player0x = 77 : player0y = 53 rem **************************************************************** rem * rem * Makes sure Missile0 is off the screen. rem ` missile0x = 200 : missile0y = 200 rem **************************************************************** rem * rem * Defines Missile0 size. rem ` NUSIZ0 = $10 : missile0height = 1 rem **************************************************************** rem * rem * Sets beginning direction that Missile0 will shoot if the rem * player doesn`t move. rem ` _Bit3_Player0_Direction_Right{3} = 1 rem **************************************************************** rem * rem * Debounce the reset switch. (Holding it down won`t make it rem * keep resetting.) rem ` _Bit0_Debounce_Reset{0} = 1 player0x = 70 player0y = 50 player1x = 1 player1y = 50 MAIN_LOOP a = 0 COLUP0 = $2A COLUP1 = $2A if joy0down then player0: %01100110 %11000011 %10011001 %10100101 %10100101 %10011001 %11000011 %01111110 end if joy0up then player0: %01111110 %11000011 %10011001 %10100101 %10100101 %10011001 %11000011 %01100110 end if joy0left then player0: %01111110 %11000011 %10011001 %00100101 %00100101 %10011001 %11000011 %01111110 end if joy0right then player0: %01111110 %11000011 %10011001 %10100100 %10100100 %10011001 %11000011 %01111110 end f=f+1 rem POSSIBLY INEFFICIENT CODE, SEPARATE COLOR INFO FOR EACH FRAME... if f = 10 then player1: %01111110 %11000011 %10000001 %01100000 %01100000 %10000001 %11000011 %01111110 end if f = 20 then player1: %01111110 %11000011 %10000001 %00110000 %00110000 %10000001 %11000011 %01111110 end if f = 30 then player1: %01111110 %11000011 %10000001 %00011000 %00011000 %10000001 %11000011 %01111110 end if f = 40 then player1: %01111110 %11000011 %10000001 %00001100 %00001100 %10000001 %11000011 %01111110 end if f = 50 then player1: %01111110 %11000011 %10000001 %00000110 %00000110 %10000001 %11000011 %01111110 end if f = 60 then player1: %01111110 %11000011 %10000001 %01000010 %01000010 %10000001 %11000011 %01111110 end if f=60 then f=0 rem **************************************************************** rem * rem * Joystick movement precheck. rem * rem ```````````````````````````````````````````````````````````````` rem ` If joystick isn`t moved in any direction, skip this section. rem ` if !joy0up && !joy0down && !joy0left && !joy0right then goto __Skip_Joystick_Precheck rem ```````````````````````````````````````````````````````````````` rem ` Joy0 has been moved. Clear Player0 direction bits. rem ` _BitOp_P0_M0_Direction = _BitOp_P0_M0_Direction & %11110000 __Skip_Joystick_Precheck rem **************************************************************** rem * rem * Joy0 Up rem * rem ```````````````````````````````````````````````````````````````` rem ` If joystick isn`t moved up, skip this section. rem ` if !joy0up then goto __Skip_Joy0_Up rem ```````````````````````````````````````````````````````````````` rem ` Turn on the up direction bit. rem ` _Bit0_Player0_Direction_Up{0} = 1 rem ```````````````````````````````````````````````````````````````` rem ` If hitting the edge, skip this section. rem ` if player0y <= _P_Edge_Top then goto __Skip_Joy0_Up rem ```````````````````````````````````````````````````````````````` rem ` Move Player0 up. rem ` __Skip_Joy0_Up rem **************************************************************** rem * rem * Joy0 Down rem * rem ```````````````````````````````````````````````````````````````` rem ` If joystick isn`t moved down, skip this section. rem ` if !joy0down then goto __Skip_Joy0_Down rem ```````````````````````````````````````````````````````````````` rem ` Turn on the down direction bit. rem ` _Bit1_Player0_Direction_Down{1} = 1 rem ```````````````````````````````````````````````````````````````` rem ` If hitting the edge, skip this section. rem ` if player0y >= _P_Edge_Bottom then goto __Skip_Joy0_Down rem ```````````````````````````````````````````````````````````````` rem ` Move Player0 down. rem ` __Skip_Joy0_Down rem **************************************************************** rem * rem * Joy0 Left rem * rem ```````````````````````````````````````````````````````````````` rem ` If joystick isn`t moved to the left, skip this section. rem ` if !joy0left then goto __Skip_Joy0_Left rem ```````````````````````````````````````````````````````````````` rem ` Turn on the left direction bit. rem ` _Bit2_Player0_Direction_Left{2} = 1 rem ```````````````````````````````````````````````````````````````` rem ` If hitting the edge, skip this section. rem ` if player0x <= _P_Edge_Left then goto __Skip_Joy0_Left rem ```````````````````````````````````````````````````````````````` rem ` Move Player0 to the left. rem ` __Skip_Joy0_Left rem **************************************************************** rem * rem * Joy0 Right rem * rem ```````````````````````````````````````````````````````````````` rem ` If joystick isn`t moved to the right, skip this section. rem ` if !joy0right then goto __Skip_Joy0_Right rem ```````````````````````````````````````````````````````````````` rem ` Turn on the right direction bit. rem ` _Bit3_Player0_Direction_Right{3} = 1 rem ```````````````````````````````````````````````````````````````` rem ` If hitting the edge, skip this section. rem ` if player0x >= _P_Edge_Right then goto __Skip_Joy0_Right rem ```````````````````````````````````````````````````````````````` rem ` Move Player0 to the right. rem ` __Skip_Joy0_Right rem **************************************************************** rem * rem * Fire Button: rem * rem * If fire button is pressed and Missile0 is not moving, turn rem * on Missile0 movement. rem * rem ```````````````````````````````````````````````````````````````` rem ` If the fire button is not pressed, skip this section. rem ` if !joy0fire then goto __Skip_Fire rem ```````````````````````````````````````````````````````````````` rem ` If Missile0 is moving, skip this section. rem ` if _Bit7_Missile0_Moving{7} then goto __Skip_Fire rem ```````````````````````````````````````````````````````````````` rem ` Turn on Missile0 movement. rem ` _Bit7_Missile0_Moving{7} = 1 rem ```````````````````````````````````````````````````````````````` rem ` Set up starting position of Missile0. rem ` missile0y = player0y - 4 : missile0x = player0x + 4 rem ```````````````````````````````````````````````````````````````` rem ` Take a `snapshot` of Player0 direction so Missile0 will rem ` stay on track until it hits something. rem ` _Bit4_Missile0_Direction_Up{4} = _Bit0_Player0_Direction_Up{0} _Bit5_Missile0_Direction_Down{5} = _Bit1_Player0_Direction_Down{1} _Bit6_Missile0_Direction_Left{6} = _Bit2_Player0_Direction_Left{2} _Bit7_Missile0_Direction_Right{7} = _Bit3_Player0_Direction_Right{3} __Skip_Fire rem **************************************************************** rem * rem * Move Missile0. rem * rem ```````````````````````````````````````````````````````````````` rem ` If Missile0 isn`t moving, skip this section. rem ` if !_Bit7_Missile0_Moving{7} then goto __Skip_Missile rem ```````````````````````````````````````````````````````````````` rem ` Move Missile0 in the appropriate direction. rem ` if _Bit4_Missile0_Direction_Up{4} then missile0y = missile0y - 2 if _Bit5_Missile0_Direction_Down{5} then missile0y = missile0y + 2 if _Bit6_Missile0_Direction_Left{6} then missile0x = missile0x - 2 if _Bit7_Missile0_Direction_Right{7} then missile0x = missile0x + 2 rem ```````````````````````````````````````````````````````````````` rem ` Clear Missile0 if it hits the edge of the screen. rem ` if missile0x < _M_Edge_Left then goto __Skip_to_Clear_Missile if missile0x > _M_Edge_Right then goto __Skip_to_Clear_Missile if missile0y < _M_Edge_Top then goto __Skip_to_Clear_Missile if missile0y > _M_Edge_Bottom then goto __Skip_to_Clear_Missile rem ```````````````````````````````````````````````````````````````` rem ` Clear Missile0 if it hits a playfield pixel. rem ` if collision(playfield,missile0) then goto __Skip_to_Clear_Missile goto __Skip_Missile __Skip_to_Clear_Missile rem ```````````````````````````````````````````````````````````````` rem ` Clear Missile0 moving bit and move Missile0 off the screen. rem ` _Bit7_Missile0_Moving{7} = 0 missile0x = 200 : missile0y = 200 __Skip_Missile drawscreen if player1x < player0x then player1x = player1x + 1 if player1x > player0x then player1x = player1x - 1 if collision(missile0,player1) then player1x=255 : player1y=255 : missile0x = 255 : missile0y = 255 : a = (rand&3) if a = 0 then player1x=1:player1y=50 if a = 1 then player1x=90:player1y=50 if a = 2 then player1x=80:player1y=1 if a = 3 then player1x=80:player1y=90 rem **************************************************************** rem * rem * Reset Program: rem * rem * Any Atari 2600 program should restart when the reset switch rem * is pressed. It is part of the usual standards and procedures. rem * rem ```````````````````````````````````````````````````````````````` rem ` If the reset switch is not pressed, turn off debounce and rem ` skip this section. rem ` if !switchreset then _Bit0_Debounce_Reset{0} = 0 : goto __Skip_Main_Reset rem ```````````````````````````````````````````````````````````````` rem ` If the reset switch hasn`t been released, skip this section. rem ` if _Bit0_Debounce_Reset{0} then goto __Skip_Main_Reset rem ```````````````````````````````````````````````````````````````` rem ` Restart the program. rem ` goto __Start_Restart __Skip_Main_Reset goto MAIN_LOOP
  17. I've been away from programming for a long time due to moving. And I just got back to it, I remember a lot but not how to do missiles properly. What's wrong with this code? if joy0right && joy0fire then missile0x = player0x - 1
  18. Thanks for all the feedback. Sorry I haven't been online for so long. I've been very busy moving into a new apartment. But I'll be continuing working now. I'm gonna see if I can come up with a new stage =)
  19. Hm, I agree with your ideas SeaGTGruff. And I think I have a solution that might work. When you start your character is very weak and can only slay the weak monsters, after you slain enough you gain a level and thusly can take on the more dangerous enemies. That's a start atleast. Now I'm gonna see if I can make a better fight system.
  20. Dungeon is awesome. But I doubt I could make something like that. Similar perhaps. I'm thinking of changing the graphics around, having the player at the lower part of the screen. And the playfield as a 3D view of the dungeon. You see 1, 2 or 3 doors and you pick one of them and go through. Might be nicer then empty overhead rooms. Gonna see if I can do a difficulty switch function later. A rudimentary class system I can do.
  21. YASD = Yet another stupid death. The center part of any roguelike. You die due to things you can't control and generally is pretty unfair. But they are winnable with great luck and skill. The game Nethack is a good example. I've been playing it for 5 years and never even come close to beating it. You just do a little better each time =) Yeah, this is just a test to see if a roguelike is doable on atari 2600. That's why I made a thread about it, I wanted too see what could be done to make it more "accessable" to a casual none hardcore roguelike crowd. To see what you people would want in such a game. I'll take out the poisoned potion and mimic. How do you suggest to improve the dungeon? Sometimes going through a corridor that may have a dead end so that you have to go back?
×
×
  • Create New...