Jump to content

Captain Spazer

Members
  • Content Count

    110
  • Joined

  • Last visited

Everything posted by Captain Spazer

  1. Ahh, thank you. Note to self, write things down!
  2. I managed to compose a small victory tune, but I can't seem to trigger it correctly, I only get a buzzing noise, any thoughts? techdemo.bin rem Generated 04-02-2019 16:06:57 by Visual bB Version 1.0.0.568 rem ********************************** rem *<filename> * rem *<description> * rem *<author> * rem *<contact info> * rem *<license> * rem ********************************** set smartbranching on dim duration=y dim rand16=z player1x = 100 : player1y = 80 missile1x = 134 : missile1y = 80 player0x = 10 : player0y = 80 ballx = 109 : bally = 79 ballheight = 2 dim _P0_Left_Right = player0x.c dim _P0_Up_Down = player0y.d const pfscore = 1 pfscore1 = 21 rem * Volume off AUDV0=0 AUDV1=0 rem * Initialize duration and set up music duration = 1 goto MusicSetup dragonlevel pfscorecolor = $0E COLUPF = $DC COLUP0 = $1C scorecolor = $0E if g = 0 then playfield: ................................ ................................ ................................ ........................X.X.X... .......................X.X.X.X.. ......................X.......X. ................................ ................................ XX.............................. X............................... XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX end rem little caveman walk animation if b = 5 then player0: %01000000 %00100000 %00011110 %00011000 %00111110 %01000000 %00011000 %00011000 end if b = 10 then player0: %00000100 %00001000 %01111000 %00011110 %00011000 %01100000 %00011000 %00011000 end rem dino idle if a = 0 then player1: %00011111 %00001010 %00001010 %00001010 %00001010 %00001010 %00001010 %00001100 %00001000 %00001100 %00111110 %00111010 %00001110 %00000000 %00000000 %00000000 end rem dino eat if a = 1 then player1: %00011111 %00001010 %00001010 %00001010 %00001010 %10101010 %10101010 %10101100 %11111000 %10110000 %11100000 %00000000 %00000000 %00000000 %00000000 %00000000 end rem dino looks away if a = 2 then player1: %00011111 %00001010 %00001010 %00001010 %00001010 %00001010 %00001010 %00001100 %00001000 %00011000 %00111110 %00101110 %00111000 %00000000 %00000000 %00000000 end rem dizzy dino if h = 1 then player1: %00011111 %00001010 %00001010 %00001010 %00001010 %00001010 %00001010 %00001100 %00001000 %00011000 %00111110 %00101110 %00111000 %00000000 %00101000 %00010000 end f = f+ 1 if f = 60 then a = (rand&3) if f > 60 then f = 0 NUSIZ1 = $37 if b > 10 then b = 0 drawscreen rem little caveman move if e = 0 && k = 0 && j < 2 && joy0right then _P0_Left_Right = _P0_Left_Right + 0.50 : b = b + 1 : d = 0 if e = 0 && k = 0 && j < 2 && joy0left then _P0_Left_Right = _P0_Left_Right - 0.50 : b = b + 1 : d = 1 if d = 0 then REFP0 = 0 if d = 1 then REFP0 = 8 rem throw axe if d = 0 && e = 0 && i = 0 && k = 0 && pfscore1 > 0 && joy0fire then e = 1 : pfscore1 = pfscore1/4 if e = 1 then missile0x = player0x : missile0y = player0y : e = 2 if e = 2 then missile0x = missile0x + 2 : missile0y = missile0y - 2 if missile0y < 20 then missile0x = 200 : missile0y = 200 : e = 0 : d = 0 if missile0x > 140 then missile0x = 200 : missile0y = 200 : e = 0 : d = 0 rem dino is stunned if hit if collision(missile0,player1) then h = 1 : missile0x = 200 : missile0y = 200 : score = score + 30 if h = 1 then i = i + 1 if i = 60 then h = 0 : i = 0 if h = 1 then COLUP1 = rand if h = 0 then COLUP1 = $C2 rem steal the egg if collision(player0,ball) then j = 1 if j = 1 then ballx = player0x : bally = player0y - 4 if j = 1 && collision(ball,playfield) then j = 2 if j = 2 then goto GetMusic GotMusic rem dino eats player if a = 1 && collision(player0,player1) then k = 1 if k = 1 then player0x = 119 goto dragonlevel rem ***************************************************** rem * Music rem ***************************************************** GetMusic rem * Check for end of current note duration = duration - 1 if duration>0 then GotMusic rem * Retrieve channel 0 data temp4 = sread(musicData) temp5 = sread(musicData) temp6 = sread(musicData) rem * Check for end of data if temp4=255 then duration = 1 : goto MusicSetup rem * Play channel 0 AUDV0 = temp4 AUDC0 = temp5 AUDF0 = temp6 rem * Retrieve channel 1 data temp4 = sread(musicData) temp5 = sread(musicData) temp6 = sread(musicData) rem * Play channel 1 AUDV1 = temp4 AUDC1 = temp5 AUDF1 = temp6 rem * Set duration duration = sread(musicData) goto GotMusic rem ***************************************************** rem * Music Data Block rem ***************************************************** rem * Format: rem * v,c,f (channel 0) rem * v,c,f (channel 1) rem * d rem * rem * Explanation: rem * v - volume (0 to 15) rem * c - control [a.k.a. tone, voice, and distortion] (0 to 15) rem * f - frequency (0 to 31) rem * d - duration MusicSetup sdata musicData = x 8,4,27 0,0,0 15 2,4,27 0,0,0 8 8,4,24 0,0,0 9 2,4,24 0,0,0 8 8,4,20 0,0,0 9 2,4,20 0,0,0 8 8,4,18 0,0,0 9 2,4,18 0,0,0 8 8,4,20 0,0,0 11 8,4,18 0,0,0 38 2,4,18 0,0,0 8 255 end goto GotMusic
  3. So far so good, that made things work out!
  4. Collision in DPC+ is something I don't understand quite yet, but if I'm on the right track, I need to see if for example player1y is = to player0y + - height and player1x = player0 + - width?
  5. Thank you for providing the code, it answers a lot of my questions
  6. Making progress, I think I'm starting to get the hang of things with dpc+ now, it's still a little tricky but I adore the features, don't know how I managed without them. I have an issue with a piece of code, I'm not sure if it has something to do with how dpc+ works or if it's me that written the code badly, to me it looks fine. The idea is that there is a random chance that a car appears on screen, then travels down, then repeats the cycle of randomly deciding whether to put it back top or not, problem is the code never starts, it's placed in the main loop. Any thoughts? rem player1 is car if d = 0 then (e = rand&3) if d = 0 && e = 2 then d = 1 if d = 1 then player1x = 70 : player1y = 78 : d = 2 if d = 2 then player1y = player1y + 1 : player1x = player1x - 1 if collision(player1,playfield) then player1x = player1x + 1 if player1y > 150 then d = 0 if d = 0 then player1x = 200 : player1y = 200
  7. Ahh, I missed that, thank you.
  8. Yes, I corrected that mistake. Another question, I know pfscroll 1 4 4 scrolls the pfcolors up, how do I scroll the pfcolors down?
  9. I just started fiddling with DPC+, it is awesome, but some things are different so it takes some getting used too. My first question on how to do stuff in DPC+ is: If I want a wider player0 sprite, how do I do that? The usual NUSIZ0= $07 doesn't do anything it seems? EDIT: I found the problem, I placed it in the wrong spot
  10. I get an error with this combination of kernel options, what am I doing wrong? set kernel_options no_blank_lines pfcolors playercolors
  11. If I can, I'll put in AI, I doubt I'll make it, though, I don't think I can make an AI capable of building it's own forts.
  12. Updates: ricochet on the upper and lower edge of the screen bugfixes, absolutely no chance of breaking walls by walking in to them now. Something I would like to add is that the wind blows you back a little, but I'm running out of variables Snowball Fight.bin
  13. It's a bug, thank you for the report, I'dd add it to the list of things to fix. I will also change the colors a bit to make the snowstorm pop more, and move the players behind the snow. I've been thinking of using DPC, but it seems daunting. I don't know how hard it is to stick a none dpc project into it and continue to work, I'll look more into it. I don't know if I'll add AI for singleplayer, maybe, I'll save that for last
  14. Thanks to Karl G I got the starfield in, so now I can make snowstorms. Here is the latest version that works almost perfectly, only glitch is a small red line in the top part of the screen, everything else should be flawless, the snowstorm is totally random at the moment but I will make adjustments in the next version: Snowball Fight - Primitive snowstorm.bin
  15. Hm, I did as you said, and I put it in bank 2, all I get is a red line in the top of the screen following player0, what did I do wrong? dim frame=m dim effect=n main gosub __Snowbank bank2 drawscreen goto main bank 2 __Snowbank frame=frame+1 if frame=0 then effect=effect+1 if effect>6 then effect=0 ENAM0=2 : rem ** set ENAM0=0 when you want the stars to be gone rem ** no adjustment leaves the stars in place if effect=0 then score=0 rem ** Adjusting missile0x by +1 or -1 moves the stars right or left if effect=1 then ballx=ballx-1:score=1 rem ** +8 or -8 moves the stars diagonally, and displays them closer together if effect=2 then ballx=ballx-8:score=8 rem ** +16 or -16 moves them diagonally, and displays them farther apart if effect=3 then ballx=ballx+16:score=16 rem ** +12 or -12 is quick and nearly vertical if effect=4 then ballx=ballx-12:score=12 rem ** +48 or -48 is a slow diagonal effect if effect=5 then ballx=ballx-48:score=48 rem ** +48 or -48 is a slow diagonal effect if effect=6 then ballx=ballx+32:score=32 rem ** You need to ensure the missile0x position ranges from 0-159. rem ** If missile0x is 0 and decreases, then set it to 159. rem ** If missile0x is 159 and increases, set it to 0. if ballx>200 then ballx=ballx+160 if ballx>159 then ballx=ballx-160 vblank rem ** Enable the TIA bug that causes missile0 to be repeated asm sta HMCLR sta WSYNC lda #$ff sta HMBL lda #$c0 sta WSYNC sta HMOVE sleep 5 sta HMBL end return drawscreen return
  16. How do I change missile to ball?
  17. I hammered out all the bugs now. But I ran out of space, so I added in 8k, I need to learn how to add bank2 so I can begin putting in the "starfield" Bugfree version release comes when I've prettied it up a bit I put the starfield in my map2, and changed it to be the ball instead of missile0, but it doesnt work right, all I get is the ball staying in the top part of the screen, following player0, any idea what I did wrong? dim frame=m dim effect=n main gosub __Snowbank bank2 drawscreen goto main bank 2 __Snowbank frame=frame+1 if frame=0 then effect=effect+1 if effect>6 then effect=0 ENAM0=2 : rem ** set ENAM0=0 when you want the stars to be gone rem ** no adjustment leaves the stars in place if effect=0 then score=0 rem ** Adjusting missile0x by +1 or -1 moves the stars right or left if effect=1 then ballx=ballx-1:score=1 rem ** +8 or -8 moves the stars diagonally, and displays them closer together if effect=2 then ballx=ballx-8:score=8 rem ** +16 or -16 moves them diagonally, and displays them farther apart if effect=3 then ballx=ballx+16:score=16 rem ** +12 or -12 is quick and nearly vertical if effect=4 then ballx=ballx-12:score=12 rem ** +48 or -48 is a slow diagonal effect if effect=5 then ballx=ballx-48:score=48 rem ** +48 or -48 is a slow diagonal effect if effect=6 then ballx=ballx+32:score=32 rem ** You need to ensure the missile0x position ranges from 0-159. rem ** If missile0x is 0 and decreases, then set it to 159. rem ** If missile0x is 159 and increases, set it to 0. if ballx>200 then ballx=ballx+160 if ballx>159 then ballx=ballx-160 vblank rem ** Enable the TIA bug that causes missile0 to be repeated asm sta HMCLR sta WSYNC lda #$ff sta HMBL lda #$c0 sta WSYNC sta HMOVE sleep 5 sta HMBL end return drawscreen return
  18. UPDATE Player 1 and 2 can shoot diagonal. Map editor is now much easier to build on, and the players are limited to their sides of the map, no more ruining the other persons forts! Fixed glitch with player 2 animation error. Added random respawn location when hit. Added victory screen for player 1 and 2 Sound effect when getting hit by snowball Press reset switch to end the victory screen Missing features Collision detection with walls, I haven't figured out smooth collision yet, if you walk over walls, they are destroyed. Melody on winning screen Better transition to winning screen Snowball fight - better then ever.bin
  19. Added to the list of things to fix. As of now its a feature, yes, wasn't sure whether to have the players locked to their sides of the screen or not. I can change it if it's better.
  20. That is a sloppy bug that allows you to knock walls down as you move over them. I will fix it in the next update. I also noticed a bug with player2 getting stuck in the throwing animation and being unable to move, that will be fixed in the next version too. I will see what I can do about the shots. Any bugs in the map editor?
  21. Hows this collision detection? Snowball Fight - Better collision.bin
  22. WIP of my project, it's nearing completion and it might have some glitches, would appreciate feedback. FEATURES: 4 premade levels, press right on the joystick to scroll, after those 4 the level editor comes, here you can make your own level together with player 2, both of you build together until the timer runs out, shown by a bar in the lower left corner. After the level editor comes the level randomizer, this creates a random level for you, I have not decided whether to keep it. Press the fire button to throw a snowball, if the snowball hits a snow wall the snow wall is destroyed. Bouncy collision detection when running into the snow walls, I haven't mastered smooth collision detection yet If you are hit by a snowball you lose 1 life --------------------------------------------------- MISSING FEATURES: Ending the game after a player looses all lives. Sound Bigger snowballs, I haven't figured out how to calculate for bigger missiles collision detection with the playfield yet DOWNLOAD - Snowball Fight.bin
×
×
  • Create New...