Trixel Rocket 2 - Devlog 07 - Created a Single and Multi Missile system as well as a Missile Powerup
#TrixelRocket2 Devlog 07 - I have created a single and a multi missile system and the ability to switch back and froth between those two systems. I've also created a missile power up that allows you to collect 5 missiles when you hit it. I also created a health powerup that increase your health.
Devlog 07 for Trixel Rocket 2 is a progress report rather than a step-by-step build, but it walks through real systems worth stealing: a single homing missile, a five-shot multi-missile mode, the toggle that switches between them, and two pickup power-ups. Here's what shipped and how each piece works under the hood.
What's new this update
The missile system now has two fire modes — a single missile that seeks enemy targets, and a multi mode that launches five at once. The game tracks which mode you're in, shows it in the UI, and refuses to fire the five-shot if you don't have five missiles, playing a bonk sound as feedback. New audio landed too: a shield sound plus a distinct hit sound when enemy missiles strike the shield. A level generation system is started but not finished.
Inside the fire control FSMs
The single-fire FSM waits for input, checks whether any missiles remain, subtracts one, converts the count to a string to update the on-screen number, fires, then waits one second before accepting another shot — a deliberate rate limit so you can't spam missiles. The multi-fire FSM is nearly identical but gates on having at least five missiles; too few sends it to the bonk-sound state and straight back to listening, while enough missiles subtracts five, updates the UI, and fires. Jerry notes the multi version probably deserves a longer cooldown since it launches five at once — a good example of tuning waits per weapon.
Switching modes with a bool
The right bumper toggles modes through a simple bool check. On press, the FSM reads the bool: if off, it turns it on, swaps the UI sprite to the multi-missile icon, enables the multi-fire FSM, and disables the single-fire FSM. Next press, the bool reads on, so everything flips back — single sprite, single FSM enabled, multi disabled. Enabling and disabling whole FSMs is the clean way to guarantee only one weapon system listens for the fire button at a time.
Power-up anatomy
Both power-ups follow the same recipe: a readable sprite (the missile icon with a plus sign; a heart with a plus for health), a particle effect orbiting the sprite for visibility, and a spawn sound so you know one is on screen even if it's outside your view. Shooting the missile power-up with a laser adds five missiles to the pool; the health version restores the fast-draining health bar. Next on the list is finishing level generation, which already handles parts of spawning plus toggling UIs and controls between levels.





