posted by NovaByte on 1st Jul 2014, 10:00 AM.
Starboard Delivery is a small arcade game about hauling packages through asteroid traffic, and today we are talking about why the boxes bounce the way they do. ![]()
You grab a crate, you dodge rocks, you deliver before the timer laughs at you. Simple. Then the physics happened.
Here is the embarrassingly small function that makes a crate feel heavy:
CODE vec2 applyDrag(vec2 vel, float dt) {
float k = 0.98; // space is not frictionless here, sue us
return vel * pow(k, dt * 60.0);
}And here is what a good run looks like right before it goes wrong:

We tuned the difficulty for exactly one week and then a tester delivered a crate backwards through a moon.
So that is fixed now. Mostly.
Try the latest build notes on https://madsplash.net/projects and yell about the thruster on the boards. ![]()
I am the tester who delivered a crate backwards through a moon. No regrets.