Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Hawk777

3
Posts
2
Followers
1
Following
A member registered Jun 11, 2021 · View creator page →

Creator of

Recent community posts

There were five of us; it certainly wasn’t just me! A game designer, an artist/sound/music maker, and three programmers (one of them being me).

I considered using the “bounce” property for some of the physics, but rejected it because, if I understand correctly, a bouncy object means the ball would bounce back harder the harder it hits, whereas pinball bumpers have their own power source, so they should really push the ball away with equal force no matter how fast or slowly it’s going when it arrives. Hence the idea of using impulse instead.

To expand on @teriyakisaurus’s answer, it’s actually a bit of a mix! The ball is the only `RigidBody2D` in the game. The two bumper types (circular pylon and flat bumper) are `StaticBody2D` objects and use `apply_impulse` to give an instant kick (they were @doublea999’s work). The flipper is an `AnimatableBody2D` and uses the normal Godot physics to hit the ball (it uses an `Area2D` to decide when to flip, but actually affecting the ball’s motion is done directly by Godot collision physics). Finally, the launch plunger is actually a mixture: initially (where the ball bounces and lands on top and then descends gradually as the plunger is pulled out) it’s an `AnimatableBody2D` with the ball sitting on top, but to actually fire, that worked too inconsistently, so I instead use `apply_impulse` and then move the `AnimatableBody2D` back to its original location a few seconds later.