This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

Builderboy2005 presents ...


Pinball Physics

This is a complicated physics engine designed for Pinball games and the like.
It is still not finished, but it is in a workable state.
Press the mouse to add balls to the simulation

-Made a major change, everything is a lot smoother, and adding balls is faster
-Rolling physics works better

12871 views / 1369 in the last 7 days

20 votes | 0 in the last 7 days

Tags: simulation physics demo with-source pinball

This scenario is a member of: Scenario showcase

open in greenfoot
Your browser does not support the canvas tag.


Looks much nicer!
A new version of this scenario was uploaded on Wed Mar 18 14:56:57 UTC 2009


Seems to run much better now with lots of balls in the world - nicely done.
Yeah, cause now I'm not giving a copy of the background to each ball ;)


Very nice physics! Seems a little too bouncy against the bottom edges sometimes, when the balls seem to be traveling quite slowly beforehand. You could extend it to have some surfaces that are very bouncy (like the obstacles in the middle of a pinball game) and some which are less so (solid objects, as some areas of the boundary might be) - but that really depends on the nature of the game (I'm not a big pinballer myself...)
Its true that sometimes in the rolling physics, the ball can be kicked up unexpectedly, but its a problem i'm trying to fix.


I never would have though it to be that difficult to make objects bounce at the correct angle but I guess it would be quite difficult...


The szenario looks real great but I don't realy get how the balls bounce. I'd like to use something like this in my worms szenario but I can't understand the code. Isn't there an easyer way to make objects bounce off?


Gevater, have a look at


Hi, nice "game" I'm using this code for my Pinball game but I got one major problem, I can't figure out how to let the ball bounce back from my "Paddle.class" do you got any idea? Thanks in advance!

See all comments

Want to leave a comment? You must first log in.

Who likes this?

nachocab askgriff BradM313 Reflection TKPROG Gevater_Tod4711 nooby123 Bytelord smackpotato Itamar.S MathManiac ElJayel pingun spaceblue dang qnanqing tombud999 programmer mjrb4 Ninto