Jump to content



1

Pinball-like Physics


4 replies to this topic

#1 Animan OFFLINE  

Animan

    River Patroller

  • 2,124 posts
  • I'm a guy... I just happen to like Sailor Moon.

Posted Thu Jun 9, 2011 3:10 PM

How would one go about trying to recreate pinball physics in bB? Something similar to Video Pinball.

#2 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • 20,922 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Thu Jun 9, 2011 4:43 PM

I've been working on an example program for over a week that has a ball bouncing off playfield pixels. I'm sure someone could improve on my code, but what I have so far seems to be working. There are no pinball features, it's just simply a ball bouncing off playfield pixels.

I'm almost done with it. I'll post it here when it's ready. I'll see if I can finish it by tomorrow.

#3 Animan OFFLINE  

Animan

    River Patroller

  • 2,124 posts
  • I'm a guy... I just happen to like Sailor Moon.

Posted Thu Jun 9, 2011 5:00 PM

View PostRandom Terrain, on Thu Jun 9, 2011 4:43 PM, said:

I've been working on an example program for over a week that has a ball bouncing off playfield pixels. I'm sure someone could improve on my code, but what I have so far seems to be working. There are no pinball features, it's just simply a ball bouncing off playfield pixels.

I'm almost done with it. I'll post it here when it's ready. I'll see if I can finish it by tomorrow.

Sounds good!

This game I want to make is unlike any pinball game you have ever played.

#4 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • 20,922 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Fri Jun 10, 2011 7:05 AM

Here's that example program:

www.atariage.com/forums/topic/183236-sprite-with-ball-missile-and-collision/

#5 iesposta OFFLINE  

iesposta

    Chopper Commander

  • 177 posts
  • Retro-gaming w/my Lava Lamp
  • Location:Pennsylvania

Posted Mon Jun 13, 2011 6:01 PM

My first demo was going to be a bouncing ball, but my simple atari 800 physics code would have to be changed to fixed point math.
VEL=70: ELASTIC=0.8: BOTTOM=120: TIME=0.5: HORIZ=0.75
YPOS=BOTTOM-(VEL*TIME-16*TIME*TIME)
There is more to it, but I don't know enough about fixed point, and I can't simplify the math to what batariBasic can do.

If it helps anyone, here's a fixed point demo of a bouncing ball that someone more proficient then me may be able to convert:
http://ekid.nintende...cy/supplies.php
The tutorial explains fixed point math, but again, it's beyond my level, and batari basic only has 4.4 and 8.8 and this demo uses more.

I think proper "bouncing" physics with variables like velocity, resistance, and gravity (no matter how simple a pinball table graphic is) is what would
make an awesome pinball game.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users