Physics Playground 3D
A 3D sandbox with hand-written physics and no engine anywhere. Stack a tower of crates, then shoot balls at it along the exact ray under your cursor and watch it come apart. Sphere-sphere, sphere-box and box-box collision are about forty lines each, and an iterated solver means the wreckage actually settles instead of shivering. Switch to first person and walk through it using the same collision code the crates use.
Controls
Mouse: Drag to orbit the camera, scroll to zoom, click in the view to shoot a ball at whatever is under the cursor. Keyboard: WASD to walk in first-person mode. Buttons switch between orbit and first-person cameras, rebuild the tower, shoot a ball, drop a crate, and fit the camera to the whole scene.
This game is built in Lesson 9.6. View the curriculum