Project genesis, stations, orbits and pathfinding
project genesis v0.1
Today I kicked off the Asteroid Logistics project. Started with the basic scaffolding - got the initial project structure in place, added a viewport system for handling the game canvas, and integrated Tweakpane for debugging controls.
The main focus was getting asteroids rendering properly. I implemented the core asteroid entity with configurable radius and rotation. Added interactivity so you can click on them, and then expanded to support multiple asteroids in the world. Feels good to have something tangible on screen already!
zoom fix v0.2
Quick fix today - the zoom functionality was broken and needed some attention. Not glamorous work but necessary.
stations and orbits v0.3
Big day! I added landing stations on asteroids and implemented an orbit system so objects can circle around asteroids. This is the foundation for how ships will approach and dock.
Also set up the verify script for code quality checks and added the first ship entity. Left things in a work-in-progress state with some rough edges to polish later.
pathfinding deep dive v0.4
Massive session today. Fixed a blank screen bug that was preventing asteroids from generating on init, then dove deep into the pathfinding system.
Added debug visualization for paths which was essential for debugging. The path finding went through several iterations - fixed external tangent line calculations, corrected arc directions, improved the algorithm with proper tangent points. I extracted a dedicated tangentPathFinder module to keep things clean.
Also added persistence for debug pane values (finally!), set up a commit message validation script, and created slash commands for the dev workflow. Added test cases for the pathfinding edge cases I discovered.
Ships can now transition between asteroids which is a huge milestone!
arc tangent pathfinding v0.5
Continued the pathfinding work. Implemented arcTangentPathFinder for smoother curved paths. Added persistence for path debug points and save/restore functionality for debug pairs.
The big improvements were internal tangents support, precomputing the tangent graph for performance, and making pathfinding async so it doesn’t block the main thread.
Simplified the orbit system by replacing elliptical orbits with circular ones - less realistic but much easier to reason about for pathfinding. Removed the Dubins path approach in favor of the arc tangent system.
Added ship transitions between asteroids with GSAP easing for smooth animations. The transition now has a pre-tween to the path start, smooth orbit-to-path transitions, and ships can be interrupted mid-flight. Also added a station visibility toggle for debugging.