mars02.lvl (Mars Base interior) incorrectly used PARALLAX_STYLE 5
(Mars surface), causing atmosphere dust particles to spawn indoors.
Changed to PARALLAX_STYLE 2 (Interior) to match the level's setting.
Closes#4
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
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.
Jetpack charges now take 30s to passively recharge (up from 3s),
making fuel management a core gameplay loop. A new fuel canister
powerup (POWERUP_FUEL) restores exactly one charge on pickup.
The existing jetpack powerup remains as the rare full-refill + 15s
boost. Fuel pickups replace most procedural jetpack spawns at higher
spawn rates to compensate for the weaker per-pickup value. Fuel
canisters also appear in corridors and arenas.
Adds orange canister pixel art, editor icon, entity registry entry,
and places fuel pickups throughout moon01.
Remove the (tex_x || tex_y) guard in tilemap_render_layer() that
silently ignored TileDefs pointing to tileset position (0,0). The
tile_def_count check alone is sufficient to distinguish defined from
undefined tiles.
Sync the editor palette to use TileDef tex coords when available,
fixing the mismatch where the palette showed tiles by sequential grid
position while the canvas used TileDef coordinates.
Save all TileDef entries unconditionally to prevent round-trip data
loss for tiles at position (0,0) with no flags.
Track the active level file path so pressing E during gameplay opens
the editor with that level loaded instead of a blank canvas.
Preserve tileset path and parallax style on save instead of
hardcoding tileset.png. Add tileset cycling (T key), tile flag
editing (F key for solid/platform/hazard/none), and 8x8 pixel
mini-icons for all entity types in the palette and canvas.
Fix entity palette not appearing when editor starts without a
prior level load by splitting entity_registry_init into populate
and init phases. Fix bitmap font rendering dropping the top row
by correcting FONT_H from 6 to 7. Widen toolbar button spacing.
Fix invisible collision from placed tiles lacking TileDefs by
calling ensure_tile_def on pencil and fill placement. Fix editor
hotkeys not working in the web build by latching key presses from
SDL_KEYDOWN events instead of comparing keyboard state snapshots.
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.
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.
Replace warm brown asteroid sprites with cold grey cratered moonrock
using irregular silhouettes and crater detail. No burning/fire trail
since there is no atmosphere on the moon — trail is now grey dust
debris. Ground impact uses a 4-layer explosion: rock shrapnel, dust
plume, ground-level dust spread, and a brief white flash. Player-hit
also gets shrapnel + dust cloud instead of the old small puff.
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.
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.
Introduce moon01.lvl as the starting level — a pure jump-and-run intro
with no gun and no enemies, just platforming over gaps and dodging falling
asteroids. The player picks up their gun upon transitioning to level01.
New features:
- Moon tileset and PARALLAX_STYLE_MOON with crater terrain backgrounds
- Asteroid entity (ENT_ASTEROID): falls from sky, damages on contact,
explodes on ground with particles, respawns after delay
- PLAYER_UNARMED directive disables gun for the level
- Pit rescue mechanic: falling costs 1 HP and auto-dashes upward
- Gun powerup entity type for future armed-pickup levels
- Segment-based procedural level generator with themed rooms
- Extended editor with entity palette and improved tile cycling
- Web shell improvements for Emscripten builds
Implements a full level editor that runs inside the game engine as an
alternative mode, accessible via --edit flag or E key during gameplay.
The editor auto-discovers available tiles from the tileset texture and
entities from a new central registry, so adding new game content
automatically appears in the editor without any editor-specific changes.
Editor features: tile painting (pencil/eraser/flood fill) across 3
layers, entity placement with drag-to-move, player spawn point tool,
camera pan/zoom, grid overlay, .lvl save/load, map resize, and test
play (P to play, ESC to return to editor).
Supporting changes:
- Entity registry centralizes spawn functions (replaces strcmp chain)
- Mouse input + raw keyboard access added to input system
- Camera zoom support for editor overview
- Zoom-aware rendering in tilemap, renderer, and sprite systems
- Powerup and drone sprites/animations wired up (were defined but unused)
- Bitmap font renderer for editor UI (4x6 pixel glyphs, no dependencies)