I'm quite new to game development. I was pretty impressed with the elastic effect I saw in this flash game when the ball hits the trampolines and I'm wondering how to recreate it.

I've done some poking around and I've heard the term "vertlets" come up lots, but I think that's more for rope physics, not something with two anchor points.

How should I approach this?

  • 1
    \$\begingroup\$ One question : are you familiar with simple 2D physics concepts such as velocity, acceleration, friction etc ? For example would it be a problem for you to re-create a game like asteroids ? If yes you should maybe first take at look at that (with tutorials and such), and then only consider "trampoline", which is a specific problem. \$\endgroup\$ – tigrou Feb 15 '14 at 19:26
  • \$\begingroup\$ Remember that applied force in trampoline is = -k*dx, you should adjust k for your needs but dx is how much the trampoline is pushed. You shoud better learn more physics first... \$\endgroup\$ – Luis Masuelli May 10 '16 at 14:16

You don't need to search "verlets" or "verlet". For anyone else reading this: verlet is a mostly outdated type of integration in modern physical simulation. This sort of thing can be achieved in two dimensions whith custom (almost gameplay specific) code. The exact details of doing this sort of thing don't have to be very fancy (not that verlet is fancy at all).

I would imagine that rendering the rope would done separately from any physical simulation. Perhaps one way to fake the trampoline would be to apply a constant acceleration (or force) to the ball if the ball is "colliding" with the trampoline. The acceleration can be aimed towards the average of the two anchor points, or in other words the direction from the ball to the average of the two anchor points (a vector).

The collision detection and rendering of the trampoline should be harder than the manipulation of forces.


Not the answer you're looking for? Browse other questions tagged or ask your own question.