Pyxel Studio

Ball Physics
Original code by Pezzza's Works (, it uses Verlet integration to perform the physics.
Adapted to pyxel and modified by Sychamis.
Left click to place a random ball at the pointer's location, right click to remove any ball the pointer hovers.

You can change parameters such as gravity, the number of substeps and deltatime in the code.
  • screenshot.png