Trampoline-Demo.ino-arduboy.hex (29.0 KB)
This is a little trampoline demo I put together in a few days to get me back into the Arduboy workspace and get me used to physics. It’s semi-accurate (minus a few forces and whatnot) to what you would see if you dropped a ball on the trampoline (a ball is the simplest because of the lack of edges and vertices).
Controls
B: Change the mode from preview to simulation and vice versa
Up/Down: Change the value of gravity
Right/Left: Change the value of restitution (don’t know if it should be labeled as negative restitution, but it works)
A + Up/Down: Change the height of the ball
Modes
Preview: A mode with no physics, for changing values
Simulation: A mode with physics, for simulation, cannot change values (although that might change in the future)
Notes:
If you see an asterisk beside a value, it means the “default value” (or what I think is a good default value). I also don’t know if the emulator is completely accurate to what it is on hardware, but looks good to me.
- Changed
cutOffPoint
(formerlycutOffAmmount
) to 0.5 for more natural “micro-bounces.”
It also just occurred to me that the values can go negative, so that opens up more wacky fun.
Source code as well as a compiled hex can be found below: