🧪 Marble Machine — Motorized Elevator & Gravity Track (2D)
A 2D marble machine: a motorized elevator lifts steel marbles to the top of a winding gravity track, where real tangential-gravity dynamics and rolling friction set their speed the whole way back down.
A motorized elevator lifts each marble at a fixed speed to the top of a winding gravity track. From there, real physics takes over: a tangential-gravity term speeds marbles up on descents and slows them on climbs, while a friction term steadily damps their speed, before the loop returns them to the elevator to go again.
About this simulation
This is a 2D companion to the 3D Marble Machine Simulator. Where the 3D original animates marbles along the track at a fixed rate regardless of slope, this version integrates the marble's actual velocity each frame from the local track angle and gravity, plus a rolling-friction term, so the same track produces genuinely different speeds on its climbs and descents.
Frequently asked questions
How is this different from the original 3D Marble Machine simulator?
The mechanics are related but not identical: the 3D version animates marbles moving along the track at a fixed rate regardless of slope. This 2D version instead integrates real tangential-gravity dynamics — marbles speed up on descents and slow down on climbs, exactly like a real ball on a track — plus a motorized elevator segment and adjustable rolling friction.
What keeps the marbles moving instead of stalling on an uphill section?
The track is built so total height dropped on the gravity section exceeds any local climb, so a marble entering with the elevator's exit speed has enough momentum to crest every bump under normal friction settings; a small speed floor also represents the vibration real ball bearings get from a running machine, so they never freeze in place.
Is the elevator physically simulated or just an animation?
The elevator moves marbles at a constant motor-driven speed — that part is a mechanical drive, not gravity — exactly like a real paddle-belt or bucket elevator lifting balls against gravity. Once a marble reaches the top it is released onto the free gravity track, where its motion is entirely determined by the physics loop each frame.
What do the friction and gravity sliders change?
Gravity sets how strongly the track's downhill sections accelerate a marble and uphill sections decelerate it. Friction is a rolling-drag coefficient that continuously removes speed proportional to the marble's current velocity, so higher friction produces a slower, more damped lap.
Why do laps and average speed fluctuate as marbles are added?
Every marble runs its own independent physics loop, so the displayed average track speed is the mean instantaneous speed of all marbles currently on the gravity section — adding a marble that just left the elevator, or one crossing a climb, shifts that average until they redistribute around the loop.
A 2D marble machine with a motor-driven elevator and a gravity track whose speed comes from real tangential-gravity dynamics plus rolling friction, integrated every frame.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install