Pinball Flipper

I want to make a pinball type thing and long story short I need to make a flipper that will make the pinball realistically bounce off of it. I also would assume the flipper should be static geometry since I don’t want gravity affecting it. The problem is that the end of the flipper is moving faster should make it bounce more than the part that is moving slower. I’m not really quite sure how to do this or if it’s even possible. Any help is appreciated,
Thanks.

Oh btw, what file formats should I use to create the model of the flipper? I have made an .obj file that was converted to .jme format, but the .jme doesn’t seem to work. Maybe I’m doing something wrong…

A friend and I have always had the idea in the back of our heads that we would like to port Visual Pinball to Java and use ODE to handle the physics on the playfield. So I’m interested in whatever you come up with.

I cannot answer your question, but to make a realistic flipper, you MUST have gravity, else the ball could stop in the middle of the board, which whould be a bit annoying, isn’t it ?

You could make a search at the “Math & Physic” forum on gamedev.net, there are plainty of interesting topic on this subject :slight_smile:

Chman

Doing pinball simulations is actually pretty difficult. A year ago I would have said that it isn’t that difficult, but now I can look at it from a different angle.

You have to understand vectors, planes, how to detect collison against various shapes(*), how to devide the space in spatial areas (for reducing the amount of collision checks), how to resolve a collision (eg projection), how to respond to collision, what an integrator is, and how to use em.

(* since it’s about a ball colliding with something you can actually just check for point collisions against “fattened” shapes - however calculating this “fatting” isn’t that easy, if you don’t already know the math)

And that’s just a short overview of the logical problems, which you’ll have to solve; things you’ll need to learn. And there are most likely other things which you would also need to learn for actually finishing that project.

So, as a first (somewhat bigger) game it’s a pretty bad choice. If you can spend a lot of time on that project, you would still need at least 6 months for creating a usable/robust simulation (without anything else like graphics/sound/media).

Really. I mean it :slight_smile:

Megabytes of articles to be read, dozens of little try-out-testing programms to be written… so many things you’ve to understand before you have all pieces for that puzzle. Sounds scary? Well, it is… but you can learn all those things in little steps, by reading an article about physics, programming a little simple game, testing things, writing a different little game (with another focus) and so on.

Well, I guess it’s worth to keep making a pinball game as a long term-ish goal.

A rather ugly but informative page:
http://personal.myvine.com/~pinball/html/physics/pinballphysics.html

I’d played several pinball machines, but I hadn’t noticed (back then) that they use “knockers” for producing a allmighty “THWACK!” sound. It’s also pretty interesting to read how bumpers etc work :wink:

the bumpers would be a dynamic joint. Or a static PhysicsObject (if you are using my jME-ODE binding) that has no mass. And you would simply update the PhysicsSystem to the whereabouts (i.e. location and rotation) of that static object and collisions should be solved good.

DP

Since I’m using ODE, the collision is pretty good although I’m moving a static object (the flipper) to collide with the sphere which causes a few bugs here and there where the flipper moves over top of the position of the sphere. I’m approximating the shape of the flipper with a rectangle, possibly adding a sphere on the end of it for more realism, but that’s at a later date.

I only have roughly two months left to get this done and I don’t want to waste my time on a project that can’t be done in that time frame, but if I can find a way to set individual bounce properties for each object, then that will make the job quite a bit faster (providing I can fix my flipper bug). I’m probably not using the best method to animate the flipper, but it’s the best I can come up with right now (just rotating the flipper about 10 degrees per update).

I’m not looking to make a really good simulation of a pinball machine, just probably the simplest pinball machine you’ve ever seen :stuck_out_tongue: Nothing fancy.

Thanks for the replies,
Valohtar

Since I’m using ODE

Ah… ok… well you could have said that earlier :stuck_out_tongue:

Sorry, should’ve mentioned that earlier. :-/