Simple Pinball or Minigolf

BlitzMax Forums/BlitzMax Beginners Area/Simple Pinball or Minigolf

Shortwind(Posted 2011) [#1]
Anyone have any code they would like to share on a simple version of a pinball game, or mini-golf? Blitzmax simple 2D preferred.

Issues associated with this project, Pinball oriented:

1. How to make the ball (round of course) follow around a curved surface.

2. Realistic kickback off Round bumpers, straight bumbers.

3. How to simulate the rubber on a kicker/flipper so the ball doesn't "bounce" too much when rolling onto a flipper. How did you handle the "sticky" feel of a flipper for better ball control?

4. I assume instead of reinventing some of the wheels there is a good blitzmax physics library that handles weight, gravity, hardness of the object, shape of the object, etc?

5. This project is just too hard and I should let the professionals figure it out. :)

Of course in this day and age, using a 3d engine would make for much better graphics. But alas, I don't do 3d. :(

It would be awesome if someone would re-create all the pinball machines from the classics. There was a project to do this, but last I knew it died. There are some really awesome pinball machines out there. And some of the funnest ones were not even complicated.

Well, didn't know if anyone had created a pinball game for max, so thought i'd ask if there is any code that people would like to share.

:)

Last edited 2011


YellBellzDotCom(Posted 2011) [#2]
Depending on how much time your willing to spend on such a project, I would look at using a pong style structured game. Get the basics in, get the ball moving around and bouncing off objects, get user input in for starting the ball, flicking the flappers, etc.

Once you get that you can always add stuff. Including a rewrite using an existing 2d physics library.

Just a thought!


TomToad(Posted 2011) [#3]
Using something like Box2d might help. It's one of Brucey's mods. The bounciness can be adjusted on various objects to simulate everything from cement to glue. You can even have an object add to yhe velocity such as a bumper would do.


therevills(Posted 2011) [#4]
Maybe look for Gfk's Hole In One - I believe there is source code was available with Blitz at on time...


EOF(Posted 2011) [#5]
Here is something to play around with. The example lets you fire a ball around, which will bounce off walls (vector lines)
There is an edit mode so that you can add/clear lines

Small bug: Occasionally, the ball will 'jitter' and escape through a line. I don't know how to stop this though



Example #1


vec2d.bmx (Import code)