Overview
Load Limit is a browser-based structural engineering simulator that models 2D truss bridge behavior under dynamic vehicular loading. The simulation uses Position-Based Dynamics (PBD) with Verlet integration to compute joint displacements, and an iterative constraint relaxation solver to maintain structural connectivity.
The goal is to provide an interactive environment where users explore fundamental structural engineering concepts — load paths, material selection, truss geometry, resonance, and failure modes — without requiring engineering prerequisites.
Simulation Method
Position-Based Dynamics (Verlet integration) with 8 constraint relaxation passes per frame at 60 fps.
Failure Detection
Sag-based: joint vertical displacement from settled baseline exceeds material-specific threshold.
Load Model
Vehicle weight distributed to nearby structural nodes via linear proximity weighting.
Physics Scale
1 pixel = 0.05 meters. Bridge spans range from 16m (Narrow Gorge) to 28m (Grand Canyon).
Physics Model
Verlet Integration
Each free joint in the structure is simulated as a point mass. Position is updated using Verlet integration, which implicitly encodes velocity as the difference between current and previous position:
where:
x(t) = current position
x(t−Δt) = previous position (velocity is implicit)
d = damping coefficient (0.96 per frame)
F = net external force (gravity + vehicle load + wind)
Δt = 1/60 s (one frame at 60fps)
This approach is numerically stable for constraint-heavy systems and naturally conserves energy without explicit momentum tracking.
Constraint Relaxation
Structural beams are modeled as distance constraints between pairs of joints. Each frame, the solver runs 8 iterations of constraint projection — moving joint pairs toward their rest-length distance:
p_A += correction · (p_B − p_A) [if A is free]
p_B -= correction · (p_B − p_A) [if B is free]
where L₀ = rest length of the beam segment
Fixed anchor joints are immovable (infinite mass approximation). Free joints receive equal correction from both ends unless one is fixed, in which case the free joint absorbs the full correction.
Beam Subdivision
Each user-drawn beam is subdivided into segments of approximately 38px (≈1.9m) with free intermediate joints. This allows beams to exhibit realistic bending and sag under distributed load, rather than behaving as perfectly rigid rods.
Resonance Model
A resonance accumulator increases as vehicles remain on the bridge span. Above a threshold, a sinusoidal horizontal forcing function is applied to all free joints, simulating the self-excited oscillation mechanism that caused the 1940 Tacoma Narrows Bridge collapse:
where R = resonance level (0–1), A = 0.25px, ω = 0.12 rad/frame
Failure stress is amplified by factor (1 + R · 0.6)
Materials
Five structural materials are available, each with distinct mechanical properties. Cost-per-meter values are loosely based on real-world construction cost ratios, scaled for gameplay.
| Material | Cost/m | Sag Limit | Thickness | Behavior |
|---|---|---|---|---|
| Wood | $14 | 2.5 px | 8 px | Compression & tension; brittle failure |
| Concrete | $68 | 9 px | 11 px | High mass, moderate strength |
| Steel | $135 | 22 px | 7 px | High strength-to-weight; standard for trusses |
| Cable | $45 | 35 px | 3 px | Tension only — compression constraint disabled |
| Carbon Fiber | $400 | 32 px | 5 px | Very high strength, very low mass |
Cable material: when a constraint is in compression (current length < rest length), the correction step is skipped. This correctly models tension-only members that go slack under compressive load — the physical behavior of real suspension cables.
Failure Criteria
A beam segment fails when the maximum vertical sag of its endpoint joints (measured from the post-settlement baseline) exceeds the material's sag limit:
sag_B = max(0, y_B(t) − y_B(settled))
failure if: max(sag_A, sag_B) · resonanceFactor > sagLimit_material
where resonanceFactor = 1 + R · 0.6
Sag from the settlement baseline (rather than from zero) is used so that the natural deflection of the structure under its own weight does not trigger false failures — only load-induced deflection beyond the resting state is penalized.
Rain reduces effective sag limits by 15% (modeling reduced material strength under wet conditions). Foundation cracking is tracked separately as accumulated anchor load exceeding a threshold.
Tension vs Compression
Beam mode is tracked each frame: if the current inter-joint distance exceeds rest length, the member is in tension (being pulled apart). If shorter, it is in compression (being squeezed). The Force Diagram overlay renders these states with directional arrows. Identifying which members carry which load type is fundamental to efficient truss design — tension members can be cables, compression members require stiffer materials.
Load Model
Vehicle weight is applied as downward impulse to nearby structural joints each frame. The force is distributed proportionally by horizontal proximity:
F_i = F_vehicle · (proximity_i / Σ proximity_j)
where the sum is over all free joints within the vehicle's footprint
This approximates a distributed load model — heavier, wider vehicles (train, tank) spread load over more joints than narrow vehicles (bicycle, sedan). Vehicle Y-position follows the bridge surface, detected by finding the nearest non-cable beam segment above the vehicle's horizontal position.
| Vehicle | Mass | Force/frame | Width | Speed |
|---|---|---|---|---|
| 🚲 Bicycle | 15 kg | 0.02 | 22 px | 4.5 px/frame |
| 🚗 Sedan | 1,400 kg | 0.8 | 46 px | 2.8 px/frame |
| 🚐 Van | 2,800 kg | 1.6 | 56 px | 2.5 px/frame |
| 🚚 Box Truck | 9,000 kg | 4.5 | 76 px | 2.1 px/frame |
| 🚌 City Bus | 12,000 kg | 6.0 | 90 px | 1.9 px/frame |
| 🚛 Semi | 18,000 kg | 9.0 | 104 px | 1.7 px/frame |
| 🪖 Tank | 60,000 kg | 28.0 | 120 px | 1.2 px/frame |
| 🚂 Train | 200,000 kg | 85.0 | 200 px | 1.0 px/frame |
Known Limitations
References & Further Reading
Structural Engineering Concepts
• Hibbeler, R.C. (2018). Structural Analysis (10th ed.). Pearson.
• Gere, J.M. & Goodno, B.J. (2018). Mechanics of Materials (9th ed.). Cengage.
• Irvine, T. (2004). An Introduction to the Vibration Response of Structures. Vibrationdata.
Simulation Methodology
• Müller, M. et al. (2007). Position Based Dynamics. Journal of Visual Communication and Image Representation.
• Verlet, L. (1967). Computer 'Experiments' on Classical Fluids. Physical Review, 159(1).
• Jakobsen, T. (2001). Advanced Character Physics. Game Developers Conference Proceedings.
Historic Bridge Failures
• Scott, R. (2001). In the Wake of Tacoma: Suspension Bridges and the Quest for Aerodynamic Stability. ASCE Press.
• The Tacoma Narrows Bridge collapse (1940) demonstrated the danger of aerodynamic resonance — the phenomenon this simulation models in simplified form.