Jump to content
IGNORED

Super Handball Deluxe


Animan

Recommended Posts

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

post-23192-0-32444300-1307750161_thumb.png

  • Like 2
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by Animan
Link to comment
Share on other sites

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 by Animan
Link to comment
Share on other sites

  • 1 month later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...