Live Load
What it is
A bridge-building game. You get a gap, some anchors and a budget, and you build with road, wood, steel and cable. Then you press Go and a car, a van, a truck or a goods train drives over it. There are ten levels, and the last few have a riverbed to build down to and a hill to climb.
Why I built it
There was an old bridge-building game I remembered fondly, and the best part of it was always the collapse. Live Load is the engineering term for the weight moving across a bridge, which is the bit that breaks things.
How it works
The physics is written from scratch. Joints are points, and each member is a stiff spring with the real stiffness of its material, solved thirty times a frame. Stress is the force in a member divided by what that material can take. I checked it against working a truss out by hand, and it came out at 80% where the sums said about 84%.
Past 100% a member snaps in the middle and the two halves swing off their joints, which is where the fun is. Vehicles sit on sprung wheels. Without suspension a 2.6 tonne van hitting a kink in the road put over 100 kN into a single member, and bridges that should have held were failing.
Every run is exactly the same for the same bridge, so after a failure “Watch it break slowly” just reruns it from just before the first break at quarter speed. Every level’s budget came from a design I built and ran through the same simulation, with about 10% to spare.
None of the sound is recorded. The creaks, the snaps (wood cracks, steel rings, cable twangs) and the splashes are all made in the browser.
What I’d change
Members don’t collide with each other or with the vehicle, and nothing buckles, so a beam is as strong squashed as it is pulled. Real bridges care a lot about buckling.
How to use it
Drag from a joint to place a member. The yellow squares are fixed anchors. On a phone, tap a joint and then tap where the member should end. Pick road, wood, steel or cable first, and only road can be driven on. Move (G) drags a joint, and right-click or Erase removes a member. Stress shows how the bridge copes with its own weight before anything drives over it. Press Go or Space to test. Share puts your whole design in a link.
JavaScriptCanvas 2DWeb Audio API