Commit Graph

8 Commits

Author SHA1 Message Date
Thomas
635869f226 Update shell 2026-03-05 17:38:46 +00:00
Thomas
b5cdf1804f Add bouncer launch pad to design document 2026-03-02 21:02:07 +00:00
Thomas
1ef84cd3b4 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.
2026-03-02 20:27:29 +00:00
Thomas
302bcc592d Rebind Space to jump, gate editor behind localStorage flag
Space is now the alternate jump key (was shoot). Web shell shows
game controls by default and hides editor UI unless
localStorage.show_editor is set to 'true'. The E key and ?edit URL
are blocked when the editor is not enabled.

Also fix Makefile to track web/shell.html as a WASM link dependency
so shell changes trigger a rebuild.
2026-03-01 18:24:21 +00:00
Thomas
6c4b076c68 Add per-level wind atmosphere property
WIND directive in .lvl files sets a constant horizontal force (px/s^2)
that pushes entities, projectiles, and particles. Positive is rightward.

Wind is applied as acceleration in physics_update() (halved on ground),
directly to projectile and particle velocities, and as a gentle position
drift on flyers. Entities with gravity_scale=0 (drones, spacecraft) are
unaffected. Levels default to no wind when the directive is absent.
2026-03-01 17:13:01 +00:00
Thomas
cdba479ced Fix TileDef rendering at (0,0) and open editor with current level
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.
2026-03-01 17:01:54 +00:00
Thomas
fac7085056 Add moon surface intro level with asteroid hazards and unarmed mechanics
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
2026-03-01 09:20:49 +00:00
Thomas
c66c12ae68 Initial commit 2026-02-28 18:03:47 +00:00