@himanshu_thumu on KesslerEdge
KesslerEdge is an interactive, full-scale, scratch-made 3D orbital debris tracking and collision-avoidance simulator that I made for the Hack Club Stardance Challenge to visualize the exponential threat of Kessler Syndrome in Low Earth Orbit. I programmed the whole thing from the ground-up in Three.js – eschewing crude linear screensaver physics in favor of a truly deterministic orbital mechanics core which allows for 3,500 autonomous objects of space junk to orbit along separate 2D orbital trajectories which constantly map into 3D Cartesian space. One of the key technical challenges was scale, to transform the simulation from mere static debris into a dynamic Kessler Cascade where the collision of space debris creates many new and faster moving fragments, I architected an Object Pooling system capable of pre-allocating for over 12,000 particles in memory upon startup and setting draw ranges that only allow for currently-visible particles to be rendered, preventing the browser from ever entering into garbage collection, maintaining a perfect WebGL framerate.
To realize the project I programmatically generated a Space Shuttle-like player vehicle with procedurally placed cylinders, cones, and boxes, a low-poly space shuttle composed entirely of math and logic; mapped the Earth with a high resolution texture map; and even composed a post-processing pipeline with a UEBloom Pass that singles out high-energy light sources for visual pop.
The most difficult challenge, though, was coordinating the game loop with user interactions, discarding a particularly sickening camera shake in favor of a clean and responsive tactical HUD override; it pulsates an ominous red CSS vignette over the user’s screen and “snaps” a high-sensitivity 3D sensor cone to the point of interest when it gets too close. The simulation has hard fail-states for when fuel runs out and when the hull is breached, and even features a three second startup-period in order to avoid the common phenomenon of statistical spawn kills. You can test the live demo here by pressing the Up/Down arrow keys on your keyboard to try and compensate for increasing debris count while keeping your shuttle operational.
- 2 devlogs
- 4h
- 18.65x multiplier
- 69 Stardust