Jump to content

Captain Spazer

Members
  • Content Count

    163
  • Joined

  • Last visited

Everything posted by Captain Spazer

  1. Neon Run is a racing game in the style of an endless runner. You drive past other cars, and try to blast them for points, the cars gets faster and after a while you begin to encounter giant oles, it's fiendeshly hard I think, but very fun. I'm no genius when it comes to sound so there's no master compositions, just the engine hummin and the sound of your neon lasers. Controls: Left/right to steer, fire button to fire the neon laser, press the reset switch at the titlescreen to start, and to restart either ingame or when you crash. NTSC: Neon Run NTSC.bin PAL: Neon Run PAL.bin Reviews & opinions are always good, aswell as feedback on what's good/bad, and if you encounter glitches. The only glitch I know of is that sometimes the cars fuse together.
  2. Here's my second game, it's a racing game that started out as a techdemo to see what I could do with DPC+ Multisprites and I found it to be quite fun so I wanted to share it. Danger Lexicon: Neon Racer: These guys come in many colors and your goal is to drive past them or blast them for points. Pothole: Watch out, if you hit these potholes you will surely die! Neon Railing: A collision with the Neon Railing is not recommended as your atoms will be spread across the galaxy! Controls: On the titlescreen press the reset switch to start the game. Move the joystick left and right to steer your car, press the fire button to shoot neon lasers and blast the other cars for points! When the game is over press the reset switch to start over. Known glitches: Sometimes the other racers stack on top of each other looking a bit funky. What's it about? The highscore of course, my high score is 175, can you beat it? Suggestions & Honest reviews are greatly appreciated! NTSC Version: Neon Run NTSC.bin PAL Version: Neon Run PAL.bin SPECIAL THANKS TO RANDOMTERRAIN FOR ALL ASSISTANCE ON THE DPC+
  3. Alright, project almost ready for release, I just need a name and fix some bugs =)

    1. Tickled_Pink

      Tickled_Pink

      Project no name.

    2. Captain Spazer

      Captain Spazer

      Clever, a bit too clever....This could end badly =D

  4. Phew, halfway done with my DPC+ Project

  5. Hm, I feared as much, Ah well, I can still work with color scrolling for pretty much the same effect. Thanks
  6. Sorry for asking on the subject of DPC+ scrolling again, I don't quite get it, I can get the playfield to scroll with pfscroll 255 which makes the playfield scroll down, but it shoots down and the playfield is empty for a while before coming around, I understand this is because I haven't set a starting and ending column, and from what I've gathered this is where DF0FRACINC Playfield Data comes in? Anyway, my question would be, how would I need to formulate a code for the playfield to scroll down, and designate a starting and ending column?
  7. I've experimented with collision detection on the DPC+ and for the most parts I can get it to do what I want, but now I managed to mess something up, any thoughts on this problem: The code below works perfectly, except for that player2-6x/y won't take effect, their y position won't go to 0 and their x position refuses to randomize, BUT, if I switch the order of things and put playerx=rand : playery=0 just after trick=x then it works but whatever is put last on the row of code won't work, is the code to long for the 2600 to calculate or did I miss something? ;``````````````````````````````````````````````````````````````` ; Width of sprites. ; dim enemyP2=j dim enemyP3=k dim enemyP4=l dim enemyP5=m dim enemyP6=n dim trick=o if !collision(ball,player1) then goto SKIP if (bally+4)>=player2y && bally<=(player2y+4) && ballx >=player2x && ballx <= (player2x+64) then trick=0 : score=score+5 : s=0 : player2x=rand : player2y=0 if (bally+4)>=player3y && bally<=(player3y+4) && ballx >=player3x && ballx <= (player3x+72) then trick=1 : score=score+5 : s=0 : player3x=rand : player3y=0 if (bally+4)>=player4y && bally<=(player4y+4) && ballx >=player4x && ballx <= (player4x+64) then trick=2 : score=score+5 : s=0 : player4x=rand : player4y=0 if (bally+4)>=player5y && bally<=(player5y+4) && ballx >=player5x && ballx <= (player5x+72) then trick=3 : score=score+5 : s=0 : player5x=rand : player5y=0 if (bally+4)>=player6y && bally<=(player6y+4) && ballx >=player6x && ballx <= (player6x+64) then trick=4 : score=score+5 : s=0 : player6x=rand : player6y=0 SKIP RacerTech0.5.bas EDIT: Nevermind, I found a solution, I just added in this and it works like a charm on this occasion too, sorry for being silly. if (bally+4)>=player1y && bally<=(player1y+4) && ballx >=player1x && ballx <= (player1x+64) then score=score+5 if (bally+4)>=player2y && bally<=(player2y+4) && ballx >=player2x && ballx <= (player2x+64) then score=score+5 if (bally+4)>=player3y && bally<=(player3y+4) && ballx >=player3x && ballx <= (player3x+72) then score=score+5 if (bally+4)>=player4y && bally<=(player4y+4) && ballx >=player4x && ballx <= (player4x+64) then score=score+5 if (bally+4)>=player5y && bally<=(player5y+4) && ballx >=player5x && ballx <= (player5x+72) then score=score+5 if (bally+4)>=player6y && bally<=(player6y+4) && ballx >=player6x && ballx <= (player6x+64) then score=score+5
  8. Thank you so much, mate. Yeah, I've mixed alot of old and new code, I haven't fully made the transition over to the new stuff, old habits die hard I guess =) I'll look at your recommendations tomorrow.
  9. Ah, sorry. Here's the .bas: Racertech.bas I double checked my variables and did some adjustments but it didn't help, seems variables being erased wasn't the issue.
  10. I have an issue with getting my project to save highscores, I'm using RandomTerrain's "Save Highscore" example and it's self explanatory yet I can't get it to work, hm. It goes into bank3 which I set aside for when the game is over, but it won't cycle through any scores, it just shows the resent score the player got, what did I do wrong? bank 2 temp1=temp1 __Bank_2 ;*************************************************************** ;*************************************************************** ; ; Program Start/Restart ; __Start_Restart ;*************************************************************** ; ; Displays the screen to avoid going over 262 when reset. ; drawscreen ;*************************************************************** ; ; Clears the playfield. ; pfclear ;*************************************************************** ; ; Mutes volume of both sound channels. ; AUDV0 = 0 : AUDV1 = 0 ;*************************************************************** ; ; Clears all normal variables and the extra 9 (fastest way). ; a = 0 : b = 0 : c = 0 : d = 0 : e = 0 : f = 0 : g = 0 : h = 0 : i = 0 j = 0 : k = 0 : l = 0 : m = 0 : n = 0 : o = 0 : p = 0 : q = 0 : r = 0 s = 0 : t = 0 : u = 0 : v = 0 : w = 0 : x = 0 : y = 0 : z = 0 var0 = 0 : var1 = 0 : var2 = 0 : var3 = 0 : var4 = 0 var5 = 0 : var6 = 0 : var7 = 0 : var8 = 0 rem **************************************************************** rem * rem * Create aliases for variables. rem * rem * You can have more than one alias for each variable. rem * If you use different aliases for bit operations, it is rem * easier to understand and remember what they do. rem * dim Master_Counter = j dim Swap_Scores = k dim Debounce_Reset = k dim Debounce_Fire = k dim High_Score01 = l dim High_Score02 = m dim High_Score03 = n dim Store_Temp_Score01 = o dim Store_Temp_Score02 = p dim Store_Temp_Score03 = q rem **************************************************************** rem * Makes better random numbers. rem * dim rand16 = z rem **************************************************************** rem * Converts 6 digit score to 3 sets of two digits. rem * dim sc1 = score dim sc2 = score+1 dim sc3 = score+2 Master_Counter = 0 : score = 0 : Swap_Scores{2}=0 bank 3 Game_Over_Setup rem **************************************************************** rem **************************************************************** rem **************************************************************** rem **************************************************************** rem * rem * Game Over rem * rem **************************************************************** rem **************************************************************** rem **************************************************************** rem **************************************************************** rem **************************************************************** rem * Checks for a new high score. rem * if sc1 > High_Score01 then New_High_Score if sc1 < High_Score01 then Skip_High_Score rem * First byte equal. Do the next test. if sc2 > High_Score02 then New_High_Score if sc2 < High_Score02 then Skip_High_Score rem * Second byte equal. Do the next test. if sc3 > High_Score03 then New_High_Score if sc3 < High_Score03 then Skip_High_Score rem * All bytes equal. goto Skip_High_Score New_High_Score High_Score01 = sc1 : High_Score02 = sc2 : High_Score03 = sc3 Skip_High_Score rem **************************************************************** rem * Setup for the restart loop. rem * Master_Counter=0 : Debounce_Reset{1}=1 : COLUBK=$62 Store_Temp_Score01 = sc1 : Store_Temp_Score02 = sc2 : Store_Temp_Score03 = sc3 Loop_Ready_to_Restart rem **************************************************************** rem * The score will flip between the current score and rem * the high score every 2 seconds. rem * Master_Counter=Master_Counter+1 if Master_Counter < 120 then Skip_Flip Master_Counter = 0 : Swap_Scores{2} = !Swap_Scores{2} if Swap_Scores{2} then scorecolor = $AE : sc1=High_Score01 : sc2=High_Score02 : sc3=High_Score03 : goto Skip_Flip scorecolor = $1C : sc1=Store_Temp_Score01 : sc2=Store_Temp_Score02 : sc3=Store_Temp_Score03 Skip_Flip rem **************************************************************** rem * The screen would be blank without drawscreen. rem * drawscreen rem **************************************************************** rem * rem * Restart the game if reset switch or fire button is pressed. rem * rem **************************************************************** rem * rem * If the fire button and reset are not pressed, skip this section. rem * if !switchreset && !joy0fire then Debounce_Reset{1} = 0 : goto Skip_Game_Over_Restart rem **************************************************************** rem * If the fire button and reset switch haven't been released rem * since starting, skip this section. rem * if Debounce_Reset{1} then Skip_Game_Over_Restart goto __Start_Restart Skip_Game_Over_Restart goto Loop_Ready_to_Restart Entire code: ;**************************************************************** ; ; This program uses the DPC+ kernel. ; set kernel DPC+ ;**************************************************************** ; ; Standard used in North America and most of South America. ; set tv ntsc set smartbranching on ;**************************************************************** ; ; Helps player1 sprites register a collision with the playfield. ; set kernel_options collision(player1,playfield) ;*************************************************************** ; ; Variable aliases go here (DIMs). ; ;*************************************************************** ; ; (You can have more than one alias for each variable.) ; ;``````````````````````````````````````````````````````````````` ; Scroll counter. ; dim _Scroll_Counter = a ;``````````````````````````````````````````````````````````````` ; Bits for various jobs. ; dim _Bit0_Reset_Restrainer = y dim _Bit7_Flip_Scroll = y goto __Bank_2 bank2 bank 2 temp1=temp1 __Bank_2 ;*************************************************************** ;*************************************************************** ; ; Program Start/Restart ; __Start_Restart ;*************************************************************** ; ; Displays the screen to avoid going over 262 when reset. ; drawscreen ;*************************************************************** ; ; Clears the playfield. ; pfclear ;*************************************************************** ; ; Mutes volume of both sound channels. ; AUDV0 = 0 : AUDV1 = 0 ;*************************************************************** ; ; Clears all normal variables and the extra 9 (fastest way). ; a = 0 : b = 0 : c = 0 : d = 0 : e = 0 : f = 0 : g = 0 : h = 0 : i = 0 j = 0 : k = 0 : l = 0 : m = 0 : n = 0 : o = 0 : p = 0 : q = 0 : r = 0 s = 0 : t = 0 : u = 0 : v = 0 : w = 0 : x = 0 : y = 0 : z = 0 var0 = 0 : var1 = 0 : var2 = 0 : var3 = 0 : var4 = 0 var5 = 0 : var6 = 0 : var7 = 0 : var8 = 0 rem **************************************************************** rem * rem * Create aliases for variables. rem * rem * You can have more than one alias for each variable. rem * If you use different aliases for bit operations, it is rem * easier to understand and remember what they do. rem * dim Master_Counter = j dim Swap_Scores = k dim Debounce_Reset = k dim Debounce_Fire = k dim High_Score01 = l dim High_Score02 = m dim High_Score03 = n dim Store_Temp_Score01 = o dim Store_Temp_Score02 = p dim Store_Temp_Score03 = q rem **************************************************************** rem * Makes better random numbers. rem * dim rand16 = z rem **************************************************************** rem * Converts 6 digit score to 3 sets of two digits. rem * dim sc1 = score dim sc2 = score+1 dim sc3 = score+2 Master_Counter = 0 : score = 0 : Swap_Scores{2}=0 ;*************************************************************** ; ; Playfield data. ; playfield: X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X end ;*************************************************************** ; ; Playfield colors. ; pfcolors: $0E $0C $0A $08 $06 $1E $1C $1A $18 $16 $2E $2C $2A $28 $26 $3E $3C $3A $38 $36 $4E $4C $4A $48 $46 $5E $5C $5A $58 $56 $6E $6C $6A $68 $66 $7E $7C $7A $78 $76 $9E $9C $9A $98 $96 $AE $AC $AA $A8 $A6 $BE $BC $BA $B8 $B6 $CE $CC $CA $C8 $C6 $DE $DC $DA $D8 $D6 $EE $EC $EA $E8 $E6 $3E $3C $3A $38 $36 $4E $4C $4A $48 $46 $5E $5C $5A $58 $56 $6E $6C $6A $68 $66 $7E $7C $7A $78 $76 $8E $8C $8A $88 $86 $9E $9C $9A $98 $96 $BE $BC $BA $B8 $B6 $CE $CC $CA $C8 $C6 $FE $FC $FA $F8 $F6 end ;*************************************************************** ; ; Score colors. ; scorecolors: $1E $1C $1A $1A $18 $18 $16 $16 end ;*************************************************************** ; ; Restrains the reset switch for the main loop. ; ; This bit fixes it so the reset switch becomes inactive if ; it hasn't been released after being pressed once. ; _Bit0_Reset_Restrainer{0} = 1 player0x=75 : player0y=150 player1x=40 : player1y=0 player2x=40 : player2y=20 player3x=40 : player3y=40 player4x=40 : player4y=60 player5x=40 : player5y=80 player6x=40 : player6y=100 ;*************************************************************** ;*************************************************************** ; ; Main Loop ; __Main_Loop player0: %00111000 %00111000 %11111110 %11111110 %00101000 %00101000 %00111000 %11111110 %11111110 %00111000 %01000100 %11111110 end player0color: $1E $1E $1E $1E $1E $1E $1E $1E $1E $1E $1E $1E end player1-6: %00111000 %00111000 %11111110 %11111110 %00101000 %00101000 %00111000 %11111110 %11111110 %00111000 %01000100 %11111110 end player1color: $1E $1E $1E $1E $1E $1E $1E $1E $1E $1E $1E $1E end player2color: $1E $1E $1E $1E $1E $1E $1E $1E $1E $1E $1E $1E end player3color: $1E $1E $1E $1E $1E $1E $1E $1E $1E $1E $1E $1E end player4color: $1E $1E $1E $1E $1E $1E $1E $1E $1E $1E $1E $1E end player5color: $1E $1E $1E $1E $1E $1E $1E $1E $1E $1E $1E $1E end player6color: $1E $1E $1E $1E $1E $1E $1E $1E $1E $1E $1E $1E end ;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ;``````````````````````````````````````````````````````````````` ; ; Gameplay logic goes here. ; ;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ;``````````````````````````````````````````````````````````````` if joy0left then player0x=player0x-1 if joy0right then player0x=player0x+1 if i<10 && b=0 then player1y=player1y+1 if i<10 && c=0 then player2y=player2y+1 if i<10 && d=0 then player3y=player3y+1 if i<10 && f=0 then player4y=player4y+1 if i<10 && g=0 then player5y=player5y+1 if i<10 && h=0 then player6y=player6y+1 if i>=10 && i<20 && b=0 then player1y=player1y+2 if i>=10 && i<20 && c=0 then player2y=player2y+2 if i>=10 && i<20 && d=0 then player3y=player3y+2 if i>=10 && i<20 && f=0 then player4y=player4y+2 if i>=10 && i<20 && g=0 then player5y=player5y+2 if i>=10 && i<20 && h=0 then player6y=player6y+2 if i>=20 && i<40 && b=0 then player1y=player1y+3 if i>=20 && i<40 && c=0 then player2y=player2y+3 if i>=20 && i<40 && d=0 then player3y=player3y+3 if i>=20 && i<40 && f=0 then player4y=player4y+3 if i>=20 && i<40 && g=0 then player5y=player5y+3 if i>=20 && i<40 && h=0 then player6y=player6y+3 if i>=40 && i<60 && b=0 then player1y=player1y+4 if i>=40 && i<60 && c=0 then player2y=player2y+4 if i>=40 && i<60 && d=0 then player3y=player3y+4 if i>=40 && i<60 && f=0 then player4y=player4y+4 if i>=40 && i<60 && g=0 then player5y=player5y+4 if i>=40 && i<60 && h=0 then player6y=player6y+4 if i>=60 && i<80 && b=0 then player1y=player1y+5 if i>=60 && i<80 && c=0 then player2y=player2y+5 if i>=60 && i<80 && d=0 then player3y=player3y+5 if i>=60 && i<80 && f=0 then player4y=player4y+5 if i>=60 && i<80 && g=0 then player5y=player5y+5 if i>=60 && i<80 && h=0 then player6y=player6y+5 if player1y>160 then b=1 if b=1 then player1x=255 : player1y=255 : b=2 if b=2 then player1x=rand : player1y=0 : b=0 if player2y>160 then c=1 if c=1 then player2x=255 : player2y=255 : c=2 if c=2 then player2x=rand : player2y=0 : c=0 if player3y>160 then d=1 if d=1 then player3x=255 : player3y=255 : d=2 if d=2 then player3x=rand : player3y=0 : d=0 if player4y>160 then f=1 if f=1 then player4x=255 : player4y=255 : f=2 if f=2 then player4x=rand : player4y=0 : f=0 if player5y>160 then g=1 if g=1 then player5x=255 : player5y=255 : g=2 if g=2 then player5x=rand : player5y=0 : g=0 if player6y>160 then h=1 if h=1 then player6x=255 : player6y=255 : h=2 if h=2 then player6x=rand : player6y=0 : h=0 if player1x<30 then b=1 if player1x>135 then b=1 if player2x<30 then c=1 if player2x>135 then c=1 if player3x<30 then d=1 if player3x>135 then d=1 if player4x<30 then f=1 if player4x>135 then f=1 if player5x<30 then g=1 if player5x>135 then g=1 if player6x<30 then h=1 if player6x>135 then h=1 e=e+1 if e=60 then score=score+1 : i=i+1 : e=0 if collision(player0,player1) then goto Game_Over_Setup bank3 ;*************************************************************** ; ; Scrolls the foreground color up and down. ; _Scroll_Counter = _Scroll_Counter + 1 if _Bit7_Flip_Scroll{7} then pfscroll 255 4 4 if !_Bit7_Flip_Scroll{7} then pfscroll 1 4 4 if _Scroll_Counter < 32 then goto __Skip_Scroll _Scroll_Counter = 0 _Bit7_Flip_Scroll{7} = !_Bit7_Flip_Scroll{7} __Skip_Scroll ;*************************************************************** ; ; 88 rows that are 2 scanlines high. ; DF6FRACINC = 255 ; Background colors. DF4FRACINC = 255 ; Playfield colors. DF0FRACINC = 128 ; Column 0. DF1FRACINC = 128 ; Column 1. DF2FRACINC = 128 ; Column 2. DF3FRACINC = 128 ; Column 3. ;*************************************************************** ; ; Displays the screen. ; drawscreen ;*************************************************************** ; ; Reset switch check and end of main loop. ; ; Any Atari 2600 program should restart when the reset ; switch is pressed. It is part of the usual standards ; and procedures. ; ;``````````````````````````````````````````````````````````````` ; Turns off reset restrainer bit and jumps to beginning of ; main loop if the reset switch is not pressed. ; if !switchreset then _Bit0_Reset_Restrainer{0} = 0 : goto __Main_Loop ;``````````````````````````````````````````````````````````````` ; Jumps to beginning of main loop if the reset switch hasn't ; been released after being pressed. ; if _Bit0_Reset_Restrainer{0} then goto __Main_Loop ;``````````````````````````````````````````````````````````````` ; Restarts the program. ; goto __Start_Restart bank 3 Game_Over_Setup rem **************************************************************** rem **************************************************************** rem **************************************************************** rem **************************************************************** rem * rem * Game Over rem * rem **************************************************************** rem **************************************************************** rem **************************************************************** rem **************************************************************** rem **************************************************************** rem * Checks for a new high score. rem * if sc1 > High_Score01 then New_High_Score if sc1 < High_Score01 then Skip_High_Score rem * First byte equal. Do the next test. if sc2 > High_Score02 then New_High_Score if sc2 < High_Score02 then Skip_High_Score rem * Second byte equal. Do the next test. if sc3 > High_Score03 then New_High_Score if sc3 < High_Score03 then Skip_High_Score rem * All bytes equal. goto Skip_High_Score New_High_Score High_Score01 = sc1 : High_Score02 = sc2 : High_Score03 = sc3 Skip_High_Score rem **************************************************************** rem * Setup for the restart loop. rem * Master_Counter=0 : Debounce_Reset{1}=1 : COLUBK=$62 Store_Temp_Score01 = sc1 : Store_Temp_Score02 = sc2 : Store_Temp_Score03 = sc3 Loop_Ready_to_Restart rem **************************************************************** rem * The score will flip between the current score and rem * the high score every 2 seconds. rem * Master_Counter=Master_Counter+1 if Master_Counter < 120 then Skip_Flip Master_Counter = 0 : Swap_Scores{2} = !Swap_Scores{2} if Swap_Scores{2} then scorecolor = $AE : sc1=High_Score01 : sc2=High_Score02 : sc3=High_Score03 : goto Skip_Flip scorecolor = $1C : sc1=Store_Temp_Score01 : sc2=Store_Temp_Score02 : sc3=Store_Temp_Score03 Skip_Flip rem **************************************************************** rem * The screen would be blank without drawscreen. rem * drawscreen rem **************************************************************** rem * rem * Restart the game if reset switch or fire button is pressed. rem * rem **************************************************************** rem * rem * If the fire button and reset are not pressed, skip this section. rem * if !switchreset && !joy0fire then Debounce_Reset{1} = 0 : goto Skip_Game_Over_Restart rem **************************************************************** rem * If the fire button and reset switch haven't been released rem * since starting, skip this section. rem * if Debounce_Reset{1} then Skip_Game_Over_Restart goto __Start_Restart Skip_Game_Over_Restart goto Loop_Ready_to_Restart bank 4 temp1=temp1 bank 5 temp1=temp1 bank 6 temp1=temp1
  11. Robotron is indeed possible on the Atari 2600, I'm working on a version with at the moment 6 enemies on screen, I'm going to bump it up to 9 when I'm done with the alpha stage.
  12. DPC+ is so awesome, and I think you'll like what I got cooking =)

  13. Ahh, I'll look into that too! It's always good to look at separate things and compare for a greater understanding =)
  14. Thanks, dude. I missed that part. I'll do some experimenting with the code tonight and see if I can get things going =)
  15. I've figured out many things of the mysteries of DPC+ but this one I can't quite figure out. I'm having 6 enemies on screen and player0 is controlled by the player, and sprites 1-6 are the enemies. Player0 can shoot the ball as a projectice and I'm trying to figure out a good way to do collision detection between player1-6 and the ball. My question is: Do I need to put player2-6's x and y values into variables to detect a collision as with the old multisprite kernel? I atempted this code but it only works with player1, all other gives a compilation error. if collision (ball,player1) then score=score+5 : ballx=255 : bally=255 : player1x=255 : player1y=255 rem THIS GIVES COMPILATION ERROR: if collision (ball,player2) then score=score+5 : ballx=255 : bally=255 : player2x=255 : player2y=255
  16. Thanks, works like a charm! It's hard to keep track of so many things, I'm glad you where available to help me out =)
  17. I'm so daft sometimes...

    1. GoldLeader

      GoldLeader

      You're a Daft Punk LOL

    2. atari2600land

      atari2600land

      I'm daft all the time.

    3. Captain Spazer

      Captain Spazer

      Haha, yeah I'm a Daft Punk...Harder, better, faster, stronger! Glad I'm not the only one =)

  18. Alright. Thanks, man! I Managed to get rid of the syntax error, but I get a blackscreen now >_> rotor boy 2.0.zip
  19. Okay, I don't get a compilation error anymore, but the titlescreen is all black now, hm...
  20. I still get a compilation error. I followed the steps on the link you posted and I added the code you wrote up, don't work. I must be daft >_> ;**************************************************************** ; ; This program uses the DPC+ kernel. ; set kernel DPC+ ;**************************************************************** ; ; Standard used in North America and most of South America. ; set tv ntsc ;**************************************************************** ; ; Helps player1 sprites register a collision with the playfield. ; set kernel_options collision(player1,playfield) ;*************************************************************** ; ; Variable aliases go here (DIMs). ; ;*************************************************************** ; ; (You can have more than one alias for each variable.) ; ;``````````````````````````````````````````````````````````````` ; Scroll counter. ; dim _Scroll_Counter = a ;``````````````````````````````````````````````````````````````` ; Bits for various jobs. ; dim _Bit0_Reset_Restrainer = y dim _Bit7_Flip_Scroll = y goto __Bank_2 bank2 bank 2 temp1=temp1 __Bank_2 ;*************************************************************** ;*************************************************************** ; ; Program Start/Restart ; __Start_Restart ;*************************************************************** ; ; Displays the screen to avoid going over 262 when reset. ; drawscreen ;*************************************************************** ; ; Clears the playfield. ; pfclear ;*************************************************************** ; ; Mutes volume of both sound channels. ; AUDV0 = 0 : AUDV1 = 0 ;*************************************************************** ; ; Clears all normal variables and the extra 9 (fastest way). ; a = 0 : b = 0 : c = 0 : d = 0 : e = 0 : f = 0 : g = 0 : h = 0 : i = 0 j = 0 : k = 0 : l = 0 : m = 0 : n = 0 : o = 0 : p = 0 : q = 0 : r = 0 s = 0 : t = 0 : u = 0 : v = 0 : w = 0 : x = 0 : y = 0 : z = 0 var0 = 0 : var1 = 0 : var2 = 0 : var3 = 0 : var4 = 0 var5 = 0 : var6 = 0 : var7 = 0 : var8 = 0 set smartbranching titlepage gosub titledrawscreen bank4 if joy0fire || switchreset then goto gamestart if !switchselect then swdebounce=0 if swdebounce>0 then swdebounce=swdebounce-1: goto titlepage if switchselect then swdebounce=30: gamenumber=gamenumber+1 if gamenumber=21 then gamenumber=1 goto titlepage dim M0_X = missile0x.d dim M0_Y = missile0y.e dim M1_X = missile1x.g dim M1_Y = missile1y.h dim P1_X = player1x.i dim P1_Y = player1y.j dim P2_X = player2x.o dim P2_Y = player2y.p ;*************************************************************** ; ; Playfield data. ; playfield: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ..XX.XXX....XXXXXXX.XXXXXXXXXXXX ......X......XXX.....XXXX..XX... ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ................................ ........XXX..............XXX.... ....XXXXXXXXX..XXXXXXXXXXXXXXX.. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX end ;*************************************************************** ; ; Playfield colors. ; pfcolors: $0E $0C $0A $08 $06 $1E $1C $1A $18 $16 $2E $2C $2A $28 $26 $3E $3C $3A $38 $36 $4E $4C $4A $48 $46 $5E $5C $5A $58 $56 $6E $6C $6A $68 $66 $7E $7C $7A $78 $76 $9E $9C $9A $98 $96 $AE $AC $AA $A8 $A6 $BE $BC $BA $B8 $B6 $CE $CC $CA $C8 $C6 $DE $DC $DA $D8 $D6 $EE $EC $EA $E8 $E6 $3E $3C $3A $38 $36 $4E $4C $4A $48 $46 $5E $5C $5A $58 $56 $6E $6C $6A $68 $66 $7E $7C $7A $78 $76 $8E $8C $8A $88 $86 $9E $9C $9A $98 $96 $BE $BC $BA $B8 $B6 $CE $CC $CA $C8 $C6 $FE $FC $FA $F8 $F6 end ;*************************************************************** ; ; Score colors. ; scorecolors: $1E $1C $1A $1A $18 $18 $16 $16 end ;*************************************************************** ; ; Restrains the reset switch for the main loop. ; ; This bit fixes it so the reset switch becomes inactive if ; it hasn't been released after being pressed once. ; _Bit0_Reset_Restrainer{0} = 1 ;*************************************************************** ;*************************************************************** ; ; Main Loop ; gamestart player0x=25 : player0y=50 missile0x=70 : missile0y=50 missile1x=135 : missile1y=50 __Main_Loop ;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ;``````````````````````````````````````````````````````````````` ; ; Gameplay logic goes here. ; ;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ;``````````````````````````````````````````````````````````````` rem moves rotorboy up when pressing the firebutton if c=0 then player0y=player0y+1 if c=1 then player0y=player0y-1 if c=0 then AUDV0=5 : AUDF0=17 : AUDC0=14 if c=1 then AUDV0=5 : AUDF0=10 : AUDC0=14 if c=0 then b=b+1 if c=1 then b=b+2 if joy0fire then c=1 else c=0 missile0height=50 missile1height=50 rem WALL1 LOGIC if e=0 then M0_X = M0_X - 0.50 if missile0x<25 then e=1 if e=1 then missile0x=255 : missile0y=255 if missile0x=255 && missile0y=255 then missile0x=140 : missile0y=rand : e=0 if missile0y>77 then e=1 if missile0y<30 then e=1 rem WALL2 LOGIC if f=0 then M1_X = M1_X - 0.50 if missile1x<25 then f=1 if f=1 then missile1x=255 : missile1y=255 if missile1x=255 && missile1y=255 then missile1x=140 : missile1y=rand : f=0 if missile1y>77 then f=1 if missile1y<30 then f=1 rem APPLE LOGIC if k=0 then P1_X = P1_X - 0.50 if player1x<25 then k=1 if k=1 then player1x=255 : player1y=255 if player1x=255 && player1y=255 then player1x=140 : player1y=rand : k=0 if player1y>77 then k=1 if player1y<30 then k=1 rem ENEMY1 LOGIC if n=0 then P2_X = P2_X - 0.50 if player2x<25 then n=1 if n=1 then player2x=255 : player2y=255 if player2x=255 && player2y=255 then player2x=140 : player2y=rand : n=0 if player2y>77 then n=1 if player2y<30 then n=1 rem get 5 points when collecting the apple if collision(player0,player1) then score=score+5 : player1x=255 : player1y=255 if collision(player0,player2) then reboot if collision(player0,missile0) then reboot if collision(player0,missile1) then reboot if collision(player1, missile0) then k=1 if collision(player1, missile1) then k=1 if collision(player1,player2) then player1x=135 : player1y=rand : player2x=135 : player2y=rand rem get 1 point every second q=q+1 if q=60 then score=score+1 : q=0 ;*************************************************************** ; ; 88 rows that are 2 scanlines high. ; DF6FRACINC = 255 ; Background colors. DF4FRACINC = 255 ; Playfield colors. DF0FRACINC = 128 ; Column 0. DF1FRACINC = 128 ; Column 1. DF2FRACINC = 128 ; Column 2. DF3FRACINC = 128 ; Column 3. ;*************************************************************** ; ; Displays the screen. ; drawscreen if b= 10 then player0: %11111110 %00010000 %01111100 %10111010 %10010010 %01111100 %00111000 %00111000 %00101000 %01010000 end if b=20 then player0: %01111100 %00010000 %01111100 %10111010 %10010010 %01111100 %00111000 %00111000 %00101000 %01010000 end if b=30 then player0: %00111000 %00010000 %01111100 %10111010 %10010010 %01111100 %00111000 %00111000 %00101000 %01010000 end if b=40 then player0: %00010000 %00010000 %01111100 %10111010 %10010010 %01111100 %00111000 %00111000 %00101000 %01010000 end if b>40 then b=0 rem apple player1: %00001100 %00011000 %01100110 %11111111 %11111111 %11111101 %11111011 %01111110 %01111110 %00100100 end rem enemy1 player2: %10000001 %01111110 %01100110 %01011010 %01011010 %01100110 %01111110 %10000001 end player1color: $DA $DA $44 $44 $44 $44 $44 $44 $44 $44 end player0color: $0C $0C $44 $2E $2E $CC $CC $CC $A8 $A8 end COLUM0 = $FE : COLUM1 = $AC ;*************************************************************** ; ; Reset switch check and end of main loop. ; ; Any Atari 2600 program should restart when the reset ; switch is pressed. It is part of the usual standards ; and procedures. ; ;``````````````````````````````````````````````````````````````` ; Turns off reset restrainer bit and jumps to beginning of ; main loop if the reset switch is not pressed. ; if !switchreset then _Bit0_Reset_Restrainer{0} = 0 : goto __Main_Loop ;``````````````````````````````````````````````````````````````` ; Jumps to beginning of main loop if the reset switch hasn't ; been released after being pressed. ; if _Bit0_Reset_Restrainer{0} then goto __Main_Loop ;``````````````````````````````````````````````````````````````` ; Restarts the program. ; goto __Start_Restart bank 3 temp1=temp1 bank 4 titledrawscreen asm include "titlescreen/asm/titlescreen.asm" end bank 5 temp1=temp1 bank 6 temp1=temp1
  21. I'm getting a syntax error on my titlescreen, what did I miss? TITLESCREEN ; *** if you want to modify the bitmap color on the fly, just dim a ; *** variable in bB called 'bmp_48x1_1_color' , and use it to set the ; *** color. ;*** The height of the displayed data... bmp_48x1_1_window = 48 ;*** The height of the bitmap data. This can be larger than ;*** the displayed data height, if you are scrolling or animating ;*** the data... bmp_48x1_1_height = 48 ifnconst bmp_48x1_1_color bmp_48x1_1_color endif ; *** this is the bitmap color. If you want to change it in a ; *** variable instead, dim one in bB called bmp_48x1_1_color .byte $0c if >. != >[.+bmp_48x1_1_height] align 256 endif bmp_48x1_1_00 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000110 BYTE %00000011 BYTE %00000001 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %01001001 BYTE %01001010 BYTE %01110010 BYTE %01001010 BYTE %01001010 BYTE %01111001 BYTE %00000000 if >. != >[.+(bmp_48x1_1_height)] align 256 endif bmp_48x1_1_01 BYTE %11000000 BYTE %00110000 BYTE %00011000 BYTE %00001110 BYTE %00000011 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000001 BYTE %00000001 BYTE %00000001 BYTE %00000001 BYTE %00000000 BYTE %00000111 BYTE %00001100 BYTE %00001000 BYTE %00011000 BYTE %00010000 BYTE %00010000 BYTE %00011000 BYTE %00001000 BYTE %00000110 BYTE %00001101 BYTE %00001000 BYTE %00011000 BYTE %00010000 BYTE %00010000 BYTE %00011000 BYTE %00001100 BYTE %10111110 BYTE %11100011 BYTE %01000000 BYTE %01100000 BYTE %00110000 BYTE %00011000 BYTE %00000000 BYTE %00000000 BYTE %11000010 BYTE %00100010 BYTE %00100010 BYTE %00100010 BYTE %00100010 BYTE %11001111 BYTE %00000000 if >. != >[.+(bmp_48x1_1_height)] align 256 endif bmp_48x1_1_02 BYTE %00000111 BYTE %00011100 BYTE %00110000 BYTE %01000000 BYTE %11000000 BYTE %11100001 BYTE %00100000 BYTE %00100000 BYTE %00110000 BYTE %00010000 BYTE %01111000 BYTE %11001100 BYTE %10110100 BYTE %00100000 BYTE %00000000 BYTE %11100110 BYTE %10001110 BYTE %10111010 BYTE %11100010 BYTE %01000110 BYTE %00000100 BYTE %00000100 BYTE %00000111 BYTE %00000001 BYTE %00000000 BYTE %00000000 BYTE %10000000 BYTE %11000000 BYTE %01100000 BYTE %00010000 BYTE %00011100 BYTE %00001111 BYTE %00000101 BYTE %00011100 BYTE %11110000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00011100 BYTE %00100010 BYTE %00100010 BYTE %00100010 BYTE %00100010 BYTE %10011100 BYTE %00000000 if >. != >[.+(bmp_48x1_1_height)] align 256 endif bmp_48x1_1_03 BYTE %10000001 BYTE %10000111 BYTE %10111000 BYTE %11100000 BYTE %10111111 BYTE %11000000 BYTE %00000000 BYTE %00000000 BYTE %00111110 BYTE %01100010 BYTE %01011110 BYTE %01100000 BYTE %01000000 BYTE %00000011 BYTE %00000100 BYTE %00000000 BYTE %00000000 BYTE %00011100 BYTE %00100011 BYTE %00100110 BYTE %00100010 BYTE %00011101 BYTE %00000000 BYTE %11111111 BYTE %00000000 BYTE %00000000 BYTE %00000001 BYTE %11111111 BYTE %11110000 BYTE %00011111 BYTE %00000000 BYTE %00000000 BYTE %11111111 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %10010001 BYTE %10010001 BYTE %11100101 BYTE %10010001 BYTE %10010001 BYTE %11110001 BYTE %00000000 if >. != >[.+(bmp_48x1_1_height)] align 256 endif bmp_48x1_1_04 BYTE %11000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %10000000 BYTE %11100000 BYTE %00110000 BYTE %00110000 BYTE %01100000 BYTE %01000000 BYTE %11000000 BYTE %10000000 BYTE %10000000 BYTE %11111000 BYTE %00001000 BYTE %00000100 BYTE %00001100 BYTE %00011000 BYTE %11110000 BYTE %11000000 BYTE %01000000 BYTE %10000000 BYTE %01110000 BYTE %11010000 BYTE %00110000 BYTE %01100000 BYTE %11000000 BYTE %00000000 BYTE %00000000 BYTE %11111000 BYTE %00110000 BYTE %11000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %11100111 BYTE %00101000 BYTE %11001000 BYTE %00101000 BYTE %00101000 BYTE %11100111 BYTE %00000000 if >. != >[.+(bmp_48x1_1_height)] align 256 endif bmp_48x1_1_05 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00000000 BYTE %00001000 BYTE %10001000 BYTE %10001000 BYTE %10001000 BYTE %10010100 BYTE %00100010 BYTE %00000000 drawscreen goto TITLESCREEN
  22. Talk about night and day difference here. I'm doing a Chopper style game where you are a boy with a propeller hat flying around avoiding walls and enemies while collecting apples, works great except the pfscrolling part but that's just a matter of time =) Man, my old version I was about to release, it was ugly as a brick and I'm glad you guys talked me into this. This kernel is just a thousand times easier to use then the old way of doing things with the multisprite kernel. <3
×
×
  • Create New...