Commit Graph

10 Commits

Author SHA1 Message Date
Thomas
d0853fb38d Add pause menu, laser turret, charger/spawner enemies, and Mars campaign
Implement four feature phases:

Phase 1 - Pause menu: extract bitmap font into shared engine/font
module, add MODE_PAUSED with Resume/Restart/Quit overlay.

Phase 2 - Laser turret hazard: ENT_LASER_TURRET with charge/fire/
cooldown state machine, per-pixel beam raycast, two variants (fixed
and tracking). Registered in entity registry with editor icons.

Phase 3 - Charger and Spawner enemies: charger ground patrol with
detect/telegraph/charge/stun cycle (2s charge timeout), spawner that
periodically creates grunts up to a global cap of 3.

Phase 4 - Mars campaign: two handcrafted levels (mars01 surface,
mars02 base), mars_tileset.png, PARALLAX_STYLE_MARS with salmon sky
and red mesas, THEME_MARS_SURFACE/THEME_MARS_BASE for the procedural
generator with per-theme gravity/tileset/parallax. Moon campaign now
chains moon03 -> mars01 -> mars02 -> victory.

Also fix review findings: deterministic seed on generated level
restart, NULL checks on calloc in spawn functions, charge timeout
to prevent infinite charge on flat terrain, and stop suppressing
stderr in Makefile web-serve target so real errors are visible.
2026-03-02 19:34:12 +00:00
Thomas
df3bc29fb7 Support large maps up to 8192x8192 tiles
Raise hard map size cap from 4096 to 8192 via MAX_MAP_SIZE constant.
Replace fixed 16 KB fgets buffer with dynamic line reader that handles
arbitrarily long tile rows. Check calloc returns for tile layer
allocation.

Add entity distance culling: skip updates for entities beyond 2x screen
width from camera, skip rendering beyond 64 px margin. Dead entities
bypass culling so cleanup callbacks always run. Player, spacecraft,
drone, and moving platforms set ENTITY_ALWAYS_UPDATE to opt out.

Replace naive 4-neighbor flood fill with scanline algorithm (O(height)
stack instead of O(area)) for safe use on large maps.

Raise MAX_ENTITY_SPAWNS from 128 to 512 and MAX_EXIT_ZONES from 8 to
16 to support populated large levels.
2026-03-01 15:17:58 +00:00
Thomas
ad2d68a8b4 Add height zones, jetpack boost particles, and TigerStyle guidelines
Level generator: add vertical variety with tall levels (46 tiles).
Segment generators accept ground_row parameter, SEG_CLIMB connects
height zones, transitions inherit predecessor ground row to prevent
walkability gaps. Climb segments respect traversal direction.

Jetpack boost: add blue flame particles during dash (burst + trail)
and continuous idle glow from player back while boost timer is active.

Camera: add 30px vertical look-ahead when player velocity exceeds
50 px/s.

Fix flame vent pedestal in gen_pit to use ground-relative position
instead of map bottom (broken in tall HIGH-zone levels).

Add TigerStyle coding guidelines to AGENTS.md adapted for C11.
Add tall_test.lvl (40x46) for height zone validation.
2026-03-01 14:57:53 +00:00
Thomas
9d828c47b1 Add moon campaign: 3 levels with spacecraft transitions 2026-03-01 14:27:15 +00:00
Thomas
ded662b42a Add spacecraft exit sequence at level exit zones
Spawn an exit ship when the player approaches an exit zone. The ship
flies in, lands near the exit, and waits for the player to board.
On boarding the player is deactivated, the ship takes off, and the
level transition fires after departure.
2026-03-01 12:38:41 +00:00
Thomas
98d2e87bb3 Add TODO: moon campaign with 3 levels and spacecraft transitions 2026-03-01 12:22:14 +00:00
Thomas
628fa52c52 Extend moon level to 1000 tiles with wide platform gaps
Expand moon01.lvl from 200 to 1000 tiles using a Python generator
script. The level features 27 gap sections with floating one-way
platforms at varying heights, progressing from easy (8-tile gaps) to
challenging (22-tile gaps with tiny platforms). 20 asteroids spread
across the level. Increase tilemap line buffer from 1024 to 16384
bytes to support wide levels.
2026-03-01 12:17:13 +00:00
Thomas
94dbe83cfe Refine asteroids: faster, sparser, with horizontal drift
Increase base fall speed (120→200), acceleration (200→350), and respawn
delay (3→6s). Add random horizontal drift (±60 px/s) so asteroids fall
at angles. Widen initial stagger (0-3→0-8s). Reduce moon level from 24
asteroids to 8, spread evenly across the level.
2026-03-01 11:04:00 +00:00
Thomas
49ed2d6f7b Add spatial audio, spacecraft entity, and level intro sequence
Distance-based sound effects with stereo panning for explosions, impacts,
and pickups. Spacecraft entity with full state machine (fly-in, land, take
off, fly-out), engine/synth sound loops, thruster particles, and PNG
spritesheet. Moon level intro defers player spawn until ship lands.

Also untrack build/ objects that were committed by mistake.
2026-03-01 11:00:51 +00:00
Thomas
9af9f65aaf Add TODO with roadmap for audio, large maps, spacecraft art, and asteroid polish 2026-03-01 09:50:22 +00:00