pinball icon indicating copy to clipboard operation
pinball copied to clipboard

fix: Add restitution to Ball

Open spydon opened this issue 3 years ago โ€ข 2 comments

Description

This adds some restitution to the ball (this means that it will bounce off things) which makes the physics simulation look a bit more realistic. Currently when it hits the pads for example the ball just stops, which looks a bit unnatural.

Preferably I would like to have changed the friction of the ball not to be 0 too, but since the rendering currently depends on the direction of the ball and the 0 friction is used to ensure that the ball doesn't rotate that is a much bigger change.

Type of Change

  • [ ] โœจ New feature (non-breaking change which adds functionality)
  • [x] ๐Ÿ› ๏ธ Bug fix (non-breaking change which fixes an issue)
  • [ ] โŒ Breaking change (fix or feature that would cause existing functionality to change)
  • [x] ๐Ÿงน Code refactor
  • [ ] โœ… Build configuration change
  • [ ] ๐Ÿ“ Documentation
  • [ ] ๐Ÿ—‘๏ธ Chore

spydon avatar May 20 '22 20:05 spydon

Thanks @spydon for the PR!

Physics changes require to be playtested to see if the game is still as fun. In addition we also need to check the ball can't get stuck or looped on a game spot. I will let you know once I give it a try!

alestiago avatar May 21 '22 14:05 alestiago

Changes LGTM, but as @alestiago we need to do a run of play test to check how this plays.

But also something to consider is that this will change how the game plays, which means that, in theory, to be fair with the new scores, that we should clear the scoreboard, as the game will plays different from when those scores were generated.

erickzanardo avatar Jul 28 '22 13:07 erickzanardo

Thanks for your contribution. We've actually decided to archive this repo since we don't have anyone working on it full time these days, since it was mostly a demo for an event, but please don't hesitate to fork the repo (it's open source!) if you want to keep it alive!

Hixie avatar Aug 18 '22 17:08 Hixie