Animan Posted June 10, 2011 Share Posted June 10, 2011 A project I had an idea for. Super Handball Deluxe! A combination of Pinball and Handball to create a unique fun experience. The two paddles at the bottom are for two players (currently I have it set to where player 1 controls both paddles, but that will change later) Right now, I have some very basic physics. It only detects if you hit the bumpers on the top or bottom of them, and sometimes the ball will go right through the bumper. It's harder to program than it looks. That "thing" in the middle is where power-ups will come up. Whenever the ball hits a paddle, the ball will change to that paddles color. When one of the players has the ball changed to his/her paddle color, that player can "nudge" the ball left or right while holding down the Fire button. (again, both paddles are set to player 1 controls). Enjoy this very early build of the game! default.bas.bin 2 Quote Link to comment Share on other sites More sharing options...
donnerkuh Posted June 12, 2011 Share Posted June 12, 2011 It's harder to program than it looks. <--- That´s right, and you did it. Looking forward to see the next version. Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted June 12, 2011 Share Posted June 12, 2011 Right now, I have some very basic physics. It only detects if you hit the bumpers on the top or bottom of them, and sometimes the ball will go right through the bumper. It's harder to program than it looks. Did you use the code exactly as it is here, or did you change it around: http://www.atariage.com/forums/topic/183236-sprite-with-ball-missile-and-collision/ rem **************************************************************** rem **************************************************************** rem * rem * Ball/Playfield collision Check. rem * rem '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' rem ' rem ' If there is no collision, skip this section. rem ' rem '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' rem ' if !collision(playfield,ball) then goto Skip_Ball_Collision rem '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' rem ' rem ' Makes sure the ball is within the playfield area. rem ' rem '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' rem ' if ballx > 18 && ballx < 143 && bally > 3 && bally < 87 then goto Skip_to_PF_Pixel_Set_Up goto Skip_Ball_Collision Skip_to_PF_Pixel_Set_Up rem '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' rem ' rem ' Converts bally coordinates to playfield coordinates. rem ' rem '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' rem ' MyTemp02 = (bally-1)/8 rem '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' rem ' rem ' Ballx coordinate conversion depends on ballx direction. rem ' rem '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' rem ' if !BitOp5_B_Direction_X{5} then MyTemp01 = (ballx-17)/4 : goto Check_Up_Down MyTemp01 = (ballx-18)/4 Check_Up_Down rem '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' rem ' rem ' Up/Down Check: rem ' rem ' Check for playfield pixels above and below the ball. rem ' rem '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' rem ' temp5 = MyTemp02+1 : temp6 = MyTemp02-1 if pfread(MyTemp01,temp5) then goto Bounce_Up_Down if pfread(MyTemp01,temp6) then goto Bounce_Up_Down rem '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' rem ' rem ' Diagonal Check: rem ' rem ' Check for playfield pixels diagonally around the ball rem ' (right-down, left-down, right-up, and left-up). rem ' rem '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' rem ' temp3 = MyTemp01+1 : temp4 = MyTemp01-1 if pfread(temp3,temp5) then goto Bounce_Left_Right if pfread(temp4,temp5) then goto Bounce_Left_Right if pfread(temp3,temp6) then goto Bounce_Left_Right if pfread(temp4,temp6) then goto Bounce_Left_Right goto Check_Left_Right Bounce_Up_Down rem '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' rem ' rem ' Reverse bally direction. rem ' rem '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' rem ' BitOp6_B_Direction_Y = BitOp6_B_Direction_Y ^ %01000000 Check_Left_Right rem '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' rem ' rem ' Righ/Left Check: rem ' rem ' Check for playfield pixels to the right and left of the ball. rem ' rem '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' rem ' temp5 = MyTemp01+1 : temp6 = MyTemp01-1 if pfread(temp5,MyTemp02) then goto Bounce_Left_Right if pfread(temp6,MyTemp02) then goto Bounce_Left_Right goto Skip_Ball_Collision Bounce_Left_Right rem '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' rem ' rem ' Reverse ballx direction. rem ' rem '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' rem ' BitOp5_B_Direction_X = BitOp5_B_Direction_X ^ %00100000 Skip_Ball_Collision I tried moving the order of the code around, but it would only work right the way I have it above. Every other configuration I tried screwed up. That's why it took me about a week to get it working right. Quote Link to comment Share on other sites More sharing options...
Animan Posted June 12, 2011 Author Share Posted June 12, 2011 (edited) I decided to write the code from scratch. My code is really just "fake" collision detection. Basically, it takes the Y position of the ball when it hits one of the bumpers and based on the Y position it determines wether to change the direction of the ball or not. That's a rough description, but I guess it works. Does anyone happen to know how Video Pinball handles collision detection? Edited June 12, 2011 by Animan Quote Link to comment Share on other sites More sharing options...
Animan Posted June 14, 2011 Author Share Posted June 14, 2011 (edited) Small update. I have been busy with my Animan Answers! stuff and other things, so I haven't been working on Super Handball Deluxe as much, but now I have some free time to work on it. Right now, I am working on the powerups, which is going to appear where that face in the center is (debating wether I should keep that face or not). The powerups I am working on now are: Skull- Kills you. Shrink- Shrinks your opponent. Speed Up Arrow- Speeds your paddle up (I would add paddle support, making the power up useless, but adding paddle support requires no_blank_lines, which results in loss of missile0, which I need). Move Up- Moves your opponents paddle up a little bit. I may add more powerups, but that's what I have planned to add right now. Any other powerups ya'll think would be good? Edited June 14, 2011 by Animan Quote Link to comment Share on other sites More sharing options...
Animan Posted July 22, 2011 Author Share Posted July 22, 2011 OK, i've decided to resurrect this project, and start from scratch on it. Expect an update soon. Quote Link to comment Share on other sites More sharing options...
ScumSoft Posted July 22, 2011 Share Posted July 22, 2011 Seems like it would be an interesting game, look forward to the finished result! Quote Link to comment Share on other sites More sharing options...
Rex Dart Posted July 22, 2011 Share Posted July 22, 2011 I may add more powerups, but that's what I have planned to add right now. Any other powerups ya'll think would be good? Wiggly Ball! Quote Link to comment Share on other sites More sharing options...
Brian O Posted July 23, 2011 Share Posted July 23, 2011 How about having a powerup that, if hit, causes your paddle to go invisible for 5-7 seconds? It would be like having to use the Force to "feel" where your paddle is. -B Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.