[7DRL Prep] Crypt of Sokoban Remaster #248

Open
opened 2026-02-09 02:44:29 +00:00 by john · 2 comments
Owner

Goal

Remaster the 7DRL 2025 "Crypt of Sokoban" to showcase the engine's current capabilities and deploy to itch.io.

Remaster Targets

  1. BSP: Replace custom Python BSP with mcrfpy.BSP (libtcod)
  2. Wang Tiles: Replace ad-hoc tile rules with proper Wang tile implementation (optional)
  3. Pathfinding: Replace random enemy movement with aggro/neutral states + Dijkstra pathfinding
  4. FOV: Add field of view - reveal entire rooms when entered
  5. Visibility: Enemies remain visible once their room has been seen
  6. Layout: 2-10 rooms, no scrolling, whole dungeon visible as a puzzle
  7. Puzzles: Make the Sokoban puzzles interesting and verifiably solvable
  8. Deploy: itch.io as standalone WASM game

Engine Features Available (all implemented, game doesn't use them yet)

  • mcrfpy.BSP - Full libtcod BSP with adjacency graph
  • grid.get_dijkstra_map() / grid.find_path() - A* and Dijkstra
  • grid.compute_fov() + ColorLayer.draw_fov() - FOV with visualization
  • WangSet.resolve() + apply() - Tiled Wang tile support

Phased Plan

  • Phase 1 (8-10h): BSP + Pathfinding + FOV (core gameplay upgrade)
  • Phase 2 (6-8h): Room reveal, solvability checks, balance
  • Phase 3 (12-20h): Wang tiles (optional - high art effort)
  • Phase 4 (1h): Deploy to itch.io

Key Files

  • src/scripts/game.py (706 lines)
  • src/scripts/cos_entities.py (540 lines)
  • src/scripts/cos_level.py (288 lines)
  • src/scripts/cos_tiles.py (224 lines)

Detailed Report

.claude/reports/cos_remaster.md

## Goal Remaster the 7DRL 2025 "Crypt of Sokoban" to showcase the engine's current capabilities and deploy to itch.io. ## Remaster Targets 1. **BSP**: Replace custom Python BSP with `mcrfpy.BSP` (libtcod) 2. **Wang Tiles**: Replace ad-hoc tile rules with proper Wang tile implementation (optional) 3. **Pathfinding**: Replace random enemy movement with aggro/neutral states + Dijkstra pathfinding 4. **FOV**: Add field of view - reveal entire rooms when entered 5. **Visibility**: Enemies remain visible once their room has been seen 6. **Layout**: 2-10 rooms, no scrolling, whole dungeon visible as a puzzle 7. **Puzzles**: Make the Sokoban puzzles interesting and verifiably solvable 8. **Deploy**: itch.io as standalone WASM game ## Engine Features Available (all implemented, game doesn't use them yet) - `mcrfpy.BSP` - Full libtcod BSP with adjacency graph - `grid.get_dijkstra_map()` / `grid.find_path()` - A* and Dijkstra - `grid.compute_fov()` + `ColorLayer.draw_fov()` - FOV with visualization - `WangSet.resolve()` + `apply()` - Tiled Wang tile support ## Phased Plan - **Phase 1 (8-10h)**: BSP + Pathfinding + FOV (core gameplay upgrade) - **Phase 2 (6-8h)**: Room reveal, solvability checks, balance - **Phase 3 (12-20h)**: Wang tiles (optional - high art effort) - **Phase 4 (1h)**: Deploy to itch.io ## Key Files - `src/scripts/game.py` (706 lines) - `src/scripts/cos_entities.py` (540 lines) - `src/scripts/cos_level.py` (288 lines) - `src/scripts/cos_tiles.py` (224 lines) ## Detailed Report `.claude/reports/cos_remaster.md`
Author
Owner

Intended labels (apply manually due to MCP label bug): priority:tier1-active, Major Feature, Demo Target

**Intended labels** (apply manually due to MCP label bug): `priority:tier1-active`, `Major Feature`, `Demo Target`
Author
Owner

Remaster Progress: Workstreams 1-4 Complete

Commit: 99f4399

Completed:

Workstream 1: BSP Replacement (cos_level.py)

  • Replaced custom BinaryRoomNode/RoomGraph with mcrfpy.BSP
  • Adjacency-based corridor digging, pre-computed room_map

Workstream 2: Enemy AI State Machine (cos_entities.py)

  • Three states: idle/aggressive/fleeing with A* pathfinding
  • Fixed duplicate direction bug on lines 428/444

Workstream 3: FOV with Room Reveal (game.py)

  • ColorLayer fog overlay with room-level reveal mechanic
  • Three visual states: visible/discovered/unknown

Workstream 4: Puzzle Solvability (cos_solver.py)

  • BFS Sokoban solver, retries unsolvable layouts up to 10 times

Workstream 5: Wang Tiles - Not yet implemented (blocked on .tsx asset)

## Remaster Progress: Workstreams 1-4 Complete Commit: 99f4399 ### Completed: **Workstream 1: BSP Replacement** (`cos_level.py`) - Replaced custom `BinaryRoomNode`/`RoomGraph` with `mcrfpy.BSP` - Adjacency-based corridor digging, pre-computed `room_map` **Workstream 2: Enemy AI State Machine** (`cos_entities.py`) - Three states: idle/aggressive/fleeing with A* pathfinding - Fixed duplicate direction bug on lines 428/444 **Workstream 3: FOV with Room Reveal** (`game.py`) - ColorLayer fog overlay with room-level reveal mechanic - Three visual states: visible/discovered/unknown **Workstream 4: Puzzle Solvability** (`cos_solver.py`) - BFS Sokoban solver, retries unsolvable layouts up to 10 times **Workstream 5: Wang Tiles** - Not yet implemented (blocked on .tsx asset)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
john/McRogueFace#248
No description provided.