Space Golf
Bend a stream of rocks with black holes to hit the target
Concept
Rocks fly out of a mining chute. You steer the stream into the mineral plant by dragging black holes around and pumping up their mass with the wheel. You work in a top view and a side view at once. There are twenty levels, with asteroid walls, patrolling ships, white holes that push and wormholes that carry rocks across the field. Each level has a stored answer behind a SOLVE button.
Physics
Every rock is pulled by every mass. Physics steps at a fixed 1/120 of a second, so a shot ends the same at any frame rate. An aim line flies a ghost rock with that same step and shows how it will end. Around each hole, the sky bends. A test proves all twenty levels clear with their stored answers at 30, 60 and 120 fps.
Courses
Space Golf is the end of a course series on Babylon.js Market, Newton to Space Golf. It starts with Newton's cannon around a small planet, with the exact orbit drawn from the equations next to the simulated one. Then the planet becomes a black hole and the cannon becomes a chute. The third course builds the twenty levels, all as pure data.