Commit graph

2 commits

Author SHA1 Message Date
7d1066a5d5 Fix demo game fog layer accumulation and web IDBFS mkdir race
- Add stairs position to occupied set to prevent enemy/item overlap
- Remove old fog layer before creating new one on level transitions
- Reset fog_layer reference on new game to avoid stale grid reference
- Wrap FS.mkdir('/save') in try/catch for page reload resilience

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 02:19:19 -04:00
d73a207535 Add web-playable WASM demo with BSP dungeon crawler
- Create self-contained demo game script (src/scripts_demo/game.py) showcasing:
  BSP dungeon generation, Wang tile autotiling, FOV with fog of war,
  turn-based bump combat, enemy AI, items/treasure, title screen
- Add MCRF_DEMO CMake option for building with demo scripts
- Add web/index.html landing page with dark theme, controls reference,
  feature list, and links to GitHub/Gitea
- Build with: emcmake cmake -DMCRF_SDL2=ON -DMCRF_DEMO=ON -DMCRF_GAME_SHELL=ON

Note: Makefile wasm-demo/serve-demo targets also added locally but Makefile
is gitignored. Use CMake directly or force-add the Makefile to track it.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-10 00:41:57 -04:00