forked from tas/major_tom
Add Mars Base generator, mars03 boss arena, and Mars campaign polish
Dedicated Mars Base generator with 6 segment types (entry, shaft, corridor, turret hall, hive, arena), depth-scaled difficulty, and exit to boss arena after 2 generated levels. Mars themes integrated into all 7 generic segment generators. Full level chain: moon03 → mars01 → mars02 → mars_base (×2) → mars03 → station. Also: jetpack fuel pickup preserves recharge progress, depth counters reset on game loop, NULL checks on entity spawns, charger charge timeout, bg decoration in Mars Base generator.
This commit is contained in:
45
TODO.md
45
TODO.md
@@ -94,14 +94,47 @@ Implemented in `enemy.h`/`enemy.c`:
|
||||
color scheme. Both registered in entity registry with editor icons.
|
||||
|
||||
## ~~Mars campaign~~ ✓
|
||||
Implemented: two handcrafted levels plus procedural generator support.
|
||||
Implemented: three handcrafted levels, a dedicated Mars Base generator, and
|
||||
Mars themes in all generic segment generators.
|
||||
|
||||
### Handcrafted levels
|
||||
- **mars01.lvl** (250×23, Mars Surface): low gravity (370), wind, wide-open
|
||||
red terrain, charger + grunt enemies, spacecraft intro. New
|
||||
`mars_tileset.png` and `PARALLAX_STYLE_MARS` (salmon sky, red mesas, dust).
|
||||
- **mars02.lvl** (40×46, Mars Base): normal gravity (700), tall vertical
|
||||
corridors with narrow passages, turrets, laser turrets (fixed + tracking),
|
||||
spawners, chargers, grunts. Victory exit at bottom.
|
||||
- Generator: `THEME_MARS_SURFACE` / `THEME_MARS_BASE` with per-theme gravity,
|
||||
bg color, parallax style, tileset path, segment probabilities, and height
|
||||
zone assignment. Mars themes added to procedural progression (6 options).
|
||||
- Moon campaign now chains to Mars: moon03 → mars01 → mars02 → victory.
|
||||
spawners, chargers, grunts. Exits to `generate:mars_base`.
|
||||
- **mars03.lvl** (30×23, Boss Arena): heavy enemies (spawners, chargers,
|
||||
laser turrets), exits to `generate:station`.
|
||||
|
||||
### Mars Base dedicated generator
|
||||
- `levelgen_generate_mars_base()` with 6 custom segment types: Entry (safe
|
||||
start), Shaft (vertical with alternating platforms + laser turrets),
|
||||
Corridor (narrow horizontal passage), Turret Hall (three-level laser
|
||||
gauntlet), Hive (spawner room), Arena (tall multi-level combat).
|
||||
- 46-tile tall levels, Mars tileset, interior parallax, 700 gravity.
|
||||
- Depth scaling: 6→7→8 segments, difficulty 0.5→0.7→0.9.
|
||||
- After 2 generated levels, exit points to mars03.lvl (boss arena).
|
||||
- `generate:mars_base` exit target handling in main.c with `s_mars_depth`.
|
||||
|
||||
### Mars themes in generic generators
|
||||
- All 7 generic segment generators (`gen_flat`, `gen_pit`, `gen_platforms`,
|
||||
`gen_corridor`, `gen_arena`, `gen_shaft`, `gen_transition`) place
|
||||
Mars-specific enemies (chargers, laser turrets, spawners) when the active
|
||||
theme is `THEME_MARS_SURFACE` or `THEME_MARS_BASE`.
|
||||
|
||||
### Music
|
||||
- `kaffe_og_kage.ogg` used for all Mars levels (handcrafted + both generators).
|
||||
|
||||
### Level chain
|
||||
- moon03 → mars01 → mars02 → generate:mars_base (×2) → mars03 → generate:station.
|
||||
|
||||
### Bug fixes (this batch)
|
||||
- Deterministic seed on generated level restart (`s_gen_seed` snapshot).
|
||||
- NULL checks on calloc in `charger_spawn`, `spawner_spawn`, `laser_spawn_internal`.
|
||||
- Charger charge timeout (2 s max) prevents infinite charge on flat terrain.
|
||||
- Removed no-op `flags |= 0` in spawner_spawn.
|
||||
- Jetpack fuel pickup preserves recharge progress instead of resetting timer.
|
||||
- Makefile web-serve: removed `2>/dev/null` so real errors are visible.
|
||||
- `s_mars_depth` and `s_station_depth` reset when game loops back to beginning.
|
||||
- Added `gen_bg_decoration()` call to Mars Base generator.
|
||||
|
||||
Reference in New Issue
Block a user