5 minutes
Catching up?
Dropping in at this lesson? One command reinstalls the library components the build uses so far and writes the scene as it stood at the end of the previous lesson to public/scenes/SpaceshooterFlight2/scene.json:

Copy that scene.json over your src/scenes/spaceshooter.json and you are caught up to the start of this lesson.
Every pool you've built shares one behavior. The Bullets pool has 256 slots; hold the trigger and they fill. With nothing to retire a round on its own, the pool can only make room by force — it reuses its oldest slots, even rounds still in flight, so a tracer blinks out not because its time ran out but because the pool needed the slot back. Debris and missiles churn the same way. The fix is a clock on every pooled slot: a Lifetime that counts a round down and hands it back to the pool on time. And there's a second countdown this lesson — the one destroyShip starts when a critical hit finally kills you, freezing the ship dead until a respawn that lands in Course 3.
Continue reading
Unlock the Full Course
Every lesson, the runnable examples, and the finished build — yours to keep.