Jump to content

Captain Spazer

Members
  • Content Count

    163
  • Joined

  • Last visited

Everything posted by Captain Spazer

  1. 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?
  2. Hows this collision detection? Snowball Fight - Better collision.bin
  3. 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
  4. while on the topic of pfpixel collision, how do I calculate for larger missiles? x = (missile0x-18)/4 : y = (missile0y)/8
  5. Im having a bit of trouble with my code for a map maker, I can make the player place blocks, but not remove them, any ideas on how to do that? x = (missile0x-18)/4 : y = (missile0y)/8 x = (missile0x-18)/4 : y = (missile0y)/8 if joy0fire && collision(playfield,missile0) then pfpixel x y off if joy0fire then pfpixel x y on I figured it out... I just had to swap places with these 2 lines: if joy0fire then pfpixel x y on if joy0fire && collision(playfield,missile0) then pfpixel x y off
  6. Thank you, very interesting. I managed to get it working better, you no longer slide all over the place. Your demo is very helpful. edits made: rem Generated 25-01-2019 13:47:00 by Visual bB Version 1.0.0.568 rem ********************************** rem *<filename> * rem *<description> * rem *<author> * rem *<contact info> * rem *<license> * rem ********************************** player0x = 50 : player0y = 50 playfield: ................................ ................................ ..........XXX................... ...........X.................... ................................ ......................XXXXXXX... .......................XX.XX.... ......XXXXXXX...........X....... .......X.XXX.................... ..........X..................... ................................ end main COLUP0 = $0E COLUPF = $0E if d = 10 then player0: %00011000 %00010000 %00010000 %01111000 %01110000 %00011000 %00100000 %00011000 end if d = 20 then player0: %01001100 %01111000 %00010000 %01111000 %01110000 %00011000 %00100000 %00011000 end if c = 10 then player0: %00011000 %00010000 %00010000 %01111000 %01110000 %00011000 %00100000 %00011000 end if c = 20 then player0: %00011000 %01010000 %00010000 %01111000 %01110000 %00011000 %00100000 %00011000 end drawscreen rem if a = 0 then fall rem if a = 1 then fly rem if a = 2 then land on floor rem if a = 3 player hits the roof if a = then pfscroll up if !joy0up then a = 0 if a = 0 && collision(player0,playfield) then a = 2 if a = 2 then pfscroll down : b = 0 : d = 0 rem fly animation if a = 1 then c = c + 1 if a = 0 then c = c + 1 if c > 20 then c = 0 rem walk animation if a = 1 then pfscroll down if joy0up then a = 1 if a = 1 && collision(player0,playfield) then a = 3 if a = 3 then pfscroll down if b = 1 && collision(player0,playfield) then pfscroll left if b = 2 && collision(player0,playfield) then pfscroll right if joy0left && a = 0 then pfscroll right : b = 1 : e = 1 if joy0right && a = 0 then pfscroll left : b = 2 : e = 0 if joy0left && a = 1 then pfscroll right : b = 1 : e = 1 if joy0right && a = 1 then pfscroll left : b = 2 : e = 0 rem flip player sprite if e = 1 then REFP0 = 8 if e = 0 then REFP0 = 0 goto main
  7. Im experimenting with a platformer with a 4 way scrolling level, i got collision detection working well left and right, and I can do collision for hitting a roof, but not floors, whatever I do, when touching the floor the player zips along the ground. Is there a simple solution I'm not seeing? the idea is you got a helicopter on your back, holding down the firebutton makes you fly, releasing it makes you fall down rem Generated 24-01-2019 14:19:54 by Visual bB Version 1.0.0.568 rem ********************************** rem *<filename> * rem *<description> * rem *<author> * rem *<contact info> * rem *<license> * rem ********************************** player0y = 79 player0x = 50 playfield: ................................ ................................ X...XXXXXXXXXXXXXXXXXXXXXXXXXXXX ................................ ................................ ................................ ................................ ................................ .....................X.......... ....................XX.......... XXXXXXXXXXXXXXXXXX..XXXXXXXXXXXX end main COLUPF = $0E COLUP0 = $0E player0: %00001100 %00001000 %00001000 %00111100 %00111000 %00100110 %00100110 %01110000 end drawscreen if b = 0 && collision(player0,playfield) then pfscroll left if b = 1 && collision(player0,playfield) then pfscroll right if joy0left then pfscroll right : b = 0 if joy0right then pfscroll left : b = 1 if joy0fire then pfscroll down if !joy0fire then pfscroll up if collision(player0,playfield) then pfscroll down goto main
  8. I have a question about using the pfhline, is it possible to have a hole in the line at a random location, and if so, how would I go about making it?
  9. Thanks guys, you where an enormous help, I got it working =)
  10. I'm not afraid to admit that sound is not my speciality, infact I find it hard to deal with adding sound elements to a game sometimes. Anyway, I'm having an issue I can't resolve on my own. The idea is that when the joy0fire button is pressed there would be short bleep sound, but it never ends, what did I do wrong? 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} && q=0 then player0x=player0x+1 : a=a+1 : player1x=player1x+1 : m=1 __Skip_Fire if !joy1fire then _Bit3_FireB1_Restrainer{1} = 0 : goto __Skip_Fire2 if _Bit3_FireB1_Restrainer{1} then goto __Skip_Fire2 _Bit3_FireB1_Restrainer{1} = 1 _Bit2_Player1_Sword{0} = 0 if joy1fire then _Bit2_Player1_Sword{0} = 1 if _Bit2_Player1_Sword{0} && z=0 then player0x=player0x-1 : b=b+1 : player1x=player1x-1 : n=1 __Skip_Fire2 if m>0 then o=o+1 if n>0 then o=o+1 if o>0 && o<30 then AUDV1 = 10 : AUDC1 = 12 : AUDF1 = 12 if o=0 then AUDV1=0 if o=30 then AUDV1=0 if o=30 then o=0 ; m=0
  11. Yeah, you'r right RandomTerrain, from now on I'll definetly be using bits more, it's really practical =)
  12. Good finding, Mountain King! Everything works perfectly now =)
  13. On a related note to pfscores. I have an issue with this piece of coding. Basically it checks the positions of the sumos, if one steps out of the ring, the other player wins that round and the next round starts, all fine and dandy. When player 2 wins and player1 has lost 3 rounds, as in pfscore1=0 the game jumps to a victory screen for player2, also works fine and dandy, I did the same so that player1 would have a victory screen too, but it never initializes when pfscore2=0, how come? q= whether the game is paused or not. If q=0 the game runs, if q>0 then the game pauses. a=player0's animation. b=player1's animation. k= timer for duration of a sound effect. Any insights? if player0x<=52 then q=1 : a=30 : pfscore1 = pfscore1/4 : q=2 : player0x=53 if player1x>=92 then q=1: b=30 : pfscore2 = pfscore2/4 : q=2 : player1x=91 if q>0 then k=k+1 if q>0 && k=60 && pfscore1>0 then goto begin if q>0 && k=60 && pfscore1=0 then goto P2WINS if q>0 && k=60 && pfscore2>0 then goto begin if q>0 && k=60 && pfscore2=0 then goto P1WINS Source: Sumosource.bas
  14. Haha, thanks. I honestly don't know anything about the portable, I'll have to check it out =)
  15. How silly of me, I got it working, I did a slight misscalculation on my code. Thanks guys =)
  16. You'r welcome =) I realised overcomplicated games may be cool, but for me: Simplicity is king
  17. Hm, I must be doing something wrong, I can't really get the code to take effect. ;*************************************************************** ; ; Fire button check. ; ;``````````````````````````````````````````````````````````````` ; Turns off restrainer bit and skips this section if button is ; not pressed. ; if !joy0fire then _Bit0_FireB_Restrainer{1} = 0 : goto __Skip_Fire ;``````````````````````````````````````````````````````````````` ; Skips this section if button hasn't been released after ; being pressed. ; if _Bit0_FireB_Restrainer{1} then goto __Skip_Fire ;``````````````````````````````````````````````````````````````` ; Turns on restrainer bit for fire button and turns on ; missile movement bit. ; if q=0 && joy0fire then a=a+1 if a=20 then c=c+1 if c=1 then player0x=player0x+1 : player1x=player1x+1 if c=1 then c=0 __Skip_Fire Did I place my code wrong? a is for sprite animation q is for checking if the sumo is in or outside of the ring c is a limit so the sumo takes 1 step when at the last frame of the animation.
  18. Version without titlescreen: Crash Course No Title.bin Sourcecode : Crash Course.bas
  19. Having a small bit of trouble with my pfscores, I'm doing a silly sumo game where player 1 & 2 mash buttons and try to push each other out of the sumo ring and when a sumo is pushed outside the game pauses for 1 second, removes a pfscore block from the losing player and resets for the next round, but the pfscore just scrolls like mad when a sumo goes outside the ring, any thoughts on what I did wrong? This is the code that handles the sumo positions. When a sumo goes outside q goes from 0 to 1, locking the controls and reduces a pfscore, then goes to q=2 to stop it from the mad pfscore scrolling but it dosn't quite work. if player0x=54 then q=1 : pfscore1=pfscore1-1 : q=2 if player1x=91 then q=1: pfscore2=pfscore2-1 : q=2 if q>0 then k=k+1 if q>0 && k=60 then goto begin EDIT Silly me, I forgot it's pfscore1 = pfscore1/4....Works fine now. On a sidenote, I can't figure out how to limit the firebutton properly so the players can't hold them down?
  20. Just a small project I made in 24 hours, I think it's pretty fun and very challenging. You drive a car on a road and try to dodge cars as you drive past them. The goal is to reach the top of the screen which will raise the difficulty making the cars go even faster. You get 3 missiles to shoot down the other cars in your way, but you only get 3 missiles, they can be refilled by reaching the top of the screen. Controls are: left and right to jump lanes, firebutton to fire your missiles, switchreset to start the game from the titlescreen, restart in the game and at the gameover screen. Hope you'll have fun with this silly title. It's main inspiration is the old Donkey.bas. DOWNLOAD - Crash Course.bin
  21. Nevermind, the error was that I had forgotten to remove an unrelated piece of code.
  22. Okay, I've done some animations on the cars, I added sound for when you crash, and a 2-second lockout for when the game is over, and I'm fiddling with controlled randomness, but I can't really get the desired results, any pointers on what I might be doing wrong with this code that handles the cars random positions? if player2y>180 then c=1 if c=1 then player2x=255 : player2y=255 : c=2 if c=2 then player2x=rand : player2y=0 : c=0 if c=0 && player2x<30 then c=1 if c=0 && player2x>130 then c=1
  23. Right on, I'll make improvements in the areas you suggested, stay tuned for an upgraded version.
×
×
  • Create New...