# Starfall Squadron

Starfall Squadron is a complete 1280x720 mouse-driven vertical shooter for LunarBasic. It uses the supplied pixel-art ships, boss, projectiles, bonuses, barriers, asteroids, exhaust, explosions, layered space backgrounds, sound effects, and music.

## Run

Open `Shooter.lb` in the LunarBasic IDE and choose Run. Keep the `assets` and `src` folders beside the main source file.

You can also compile it from the LunarBasic repository root:

```text
dotnet run --project LunarBasic.Compiler/LunarBasic.Compiler.csproj -- /full/path/to/Shooter.lb
```

## Controls

- Move the mouse to steer the ship.
- Hold the left mouse button to fire.
- Right-click to spend a Nova, clear enemy shots, and damage every hostile.
- Click the four cards in the bottom dock to buy upgrades with combat credits.
- Click menu and results buttons to start, replay, or return.
- Press **M** to mute/unmute all audio.
- Press **Escape** to return to the menu; from the menu, quit.

## Mission

Fight through three complete stages: Outer Ring, Nebula Pass, and Core Fortress. Each stage has three increasingly busy enemy waves followed by a boss fight. The three commanders have rising durability and distinct three-shot, five-shot, and aimed-fan attack patterns. Upgrades carry across every stage.

Defeated ships and hazards award combat credits for stronger shots, faster firing, more hull capacity, and extra Novas. Enemy drops can also award an extra life, a one-hit barrier, wider shot patterns, 500 points, or timed rapid fire. New waves grant another Nova, and clearing a stage grants a credit bonus.

## Project structure

- `Shooter.lb` — constants, entity types, typed pools, global state, and main loop
- `src/gameplay.lb` — mouse input, upgrades, spawning, collisions, three stages, and boss logic
- `src/rendering.lb` — layered backgrounds, atlas rendering, HUD, menus, and results
- `src/assets.lb` — asset loading, music switching, sound wrappers, and cleanup
- `assets/` — supplied artwork/audio plus the Silkscreen font and its SIL Open Font License

The fixed entity pools use `TPlayer`, `TProjectile`, `TEnemy`, `TAsteroid`, `TPickup`, and `TExplosion` records. This keeps related attributes together and avoids per-frame allocation during play.

## Asset notes

The supplied artwork license is preserved at `assets/music/public-license.txt`. Silkscreen is included under the SIL Open Font License in `assets/fonts/OFL.txt`.
