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
This commit is contained in:
Thomas
2026-03-01 09:20:49 +00:00
parent ea6e16358f
commit fac7085056
30 changed files with 2139 additions and 83 deletions

View File

@@ -46,6 +46,13 @@ typedef struct LevelGenConfig {
/* Default config for quick generation */
LevelGenConfig levelgen_default_config(void);
/* Config preset for a space station level:
* very long horizontally, narrow playable area,
* near-zero gravity, all THEME_SPACE_STATION.
* depth (0-based) escalates difficulty and length
* with each subsequent station level. */
LevelGenConfig levelgen_station_config(uint32_t seed, int depth);
/* Generate a level directly into a Tilemap struct.
* The Tilemap will have layers allocated, tile defs set,
* entity spawns populated, and metadata configured.
@@ -53,6 +60,12 @@ LevelGenConfig levelgen_default_config(void);
* Returns true on success. */
bool levelgen_generate(Tilemap *map, const LevelGenConfig *config);
/* Generate a space-station level: very long, narrow,
* near-zero gravity. Uses its own segment pool tuned
* for horizontal layouts in tight corridors.
* Returns true on success. */
bool levelgen_generate_station(Tilemap *map, const LevelGenConfig *config);
/* Dump a generated (or any) Tilemap to a .lvl file.
* Useful for inspecting/editing procedural output.
* Returns true on success. */