forked from tas/major_tom
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.
109 lines
5.2 KiB
Plaintext
109 lines
5.2 KiB
Plaintext
# Mars Base - Underground Corridors
|
|
# =================================
|
|
# Second Mars level: normal gravity, tall vertical layout.
|
|
# Narrow corridors with 90-degree turns, heavy enemy presence.
|
|
# Spacecraft intro from mars surface. Laser turrets, spawners,
|
|
# turrets, and chargers guard the base interior.
|
|
|
|
TILESET assets/tiles/mars_tileset.png
|
|
SIZE 40 46
|
|
SPAWN 3 7
|
|
GRAVITY 700
|
|
BG_COLOR 20 10 6
|
|
PARALLAX_STYLE 5
|
|
MUSIC assets/sounds/algardalgar.ogg
|
|
|
|
ENTITY spacecraft 1 3
|
|
|
|
# Upper zone - entry corridors (rows 0-17)
|
|
ENTITY turret 18 6
|
|
ENTITY laser_turret 30 6
|
|
ENTITY grunt 10 8
|
|
ENTITY grunt 25 8
|
|
ENTITY charger 14 16
|
|
ENTITY powerup_hp 20 14
|
|
|
|
# Mid zone - vertical shaft and crossover (rows 17-30)
|
|
ENTITY laser_turret_track 6 20
|
|
ENTITY spawner 34 20
|
|
ENTITY turret 22 24
|
|
ENTITY grunt 28 24
|
|
ENTITY charger 10 28
|
|
ENTITY powerup_jet 18 22
|
|
|
|
# Lower zone - base core (rows 30-43)
|
|
ENTITY laser_turret 15 32
|
|
ENTITY laser_turret_track 32 36
|
|
ENTITY spawner 8 38
|
|
ENTITY turret 28 38
|
|
ENTITY charger 20 42
|
|
ENTITY grunt 35 42
|
|
ENTITY powerup_hp 24 34
|
|
ENTITY powerup_gun 12 42
|
|
|
|
# Exit at bottom right — victory (end of Mars campaign)
|
|
EXIT 36 40 2 3
|
|
|
|
# Tile definitions (Mars tileset)
|
|
TILEDEF 1 0 0 1
|
|
TILEDEF 2 1 0 1
|
|
TILEDEF 3 2 0 1
|
|
TILEDEF 4 0 1 2
|
|
|
|
# Collision layer (40 wide x 46 tall)
|
|
# Layout: narrow corridors with vertical shafts connecting zones
|
|
# W = wall (1), P = platform (4), 0 = air
|
|
#
|
|
# Upper zone (rows 0-17): entry from top-left, horizontal corridor
|
|
# with a drop into the shaft system
|
|
# Mid zone (rows 17-30): vertical shaft on the left, rooms on right
|
|
# Lower zone (rows 30-43): base core, final gauntlet
|
|
# Bottom rows (44-45): solid floor
|
|
LAYER collision
|
|
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
|
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
|
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
|
|
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
|
|
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
|
|
1 0 0 0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