Roguelike Tutorial Planning + Prep
This commit is contained in:
parent
4e94d1d79e
commit
192d1ae1dd
10 changed files with 3658 additions and 5 deletions
156
ROADMAP.md
156
ROADMAP.md
|
|
@ -1,11 +1,121 @@
|
|||
# McRogueFace - Development Roadmap
|
||||
|
||||
## 🚨 URGENT PRIORITIES - July 9, 2025 🚨
|
||||
|
||||
### IMMEDIATE ACTION REQUIRED (Next 48 Hours)
|
||||
|
||||
**CRITICAL DEADLINE**: RoguelikeDev Tutorial Event starts July 15 - Need to advertise by July 11!
|
||||
|
||||
#### 1. Tutorial Emergency Plan (2 DAYS)
|
||||
- [ ] **Day 1 (July 9)**: Parts 1-2 (Setup, Moving @, Drawing Map, Entities)
|
||||
- [ ] **Day 2 (July 10)**: Parts 3-4 (FOV, Combat/AI)
|
||||
- [ ] **July 11**: Announce on r/roguelikedev with 4 completed parts
|
||||
- [ ] **July 12-14**: Complete remaining 10 parts before event starts
|
||||
|
||||
#### 1b. Sizzle Reel Demo (URGENT)
|
||||
- [ ] **Expand animation_sizzle_reel_working.py** with Grid/Entity demos:
|
||||
- Grid scrolling and zooming animations
|
||||
- Entity movement patterns (patrol, chase, flee)
|
||||
- Particle effects using entity spawning
|
||||
- Tile animation demonstrations
|
||||
- Color cycling and transparency effects
|
||||
- Mass entity choreography (100+ entities)
|
||||
- Performance stress test with 1000+ entities
|
||||
|
||||
#### 2. TCOD Integration Sprint
|
||||
- [ ] **UIGrid TCOD Integration** (8 hours)
|
||||
- Add TCODMap* to UIGrid constructor
|
||||
- Implement mcrfpy.libtcod.compute_fov()
|
||||
- Add batch operations for NumPy-style access
|
||||
- Create CellView for ergonomic .at((x,y)) access
|
||||
- [ ] **UIEntity Pathfinding** (4 hours)
|
||||
- Add path_to(target) method using A*
|
||||
- Implement Dijkstra maps for multiple targets
|
||||
- Cache paths in UIEntity for performance
|
||||
|
||||
#### 3. Performance Critical Path
|
||||
- [ ] **Implement SpatialHash** for 10,000+ entities (2 hours)
|
||||
- [ ] **Add dirty flag system** to UIGrid (1 hour)
|
||||
- [ ] **Batch update context managers** (2 hours)
|
||||
- [ ] **Memory pool for entities** (2 hours)
|
||||
|
||||
#### 4. Bug Fixing Pipeline
|
||||
- [ ] Set up GitHub Issues automation
|
||||
- [ ] Create test for each bug before fixing
|
||||
- [ ] Track: Memory leaks, Segfaults, Python/C++ boundary errors
|
||||
|
||||
---
|
||||
|
||||
## 🎯 STRATEGIC ARCHITECTURE VISION
|
||||
|
||||
### Three-Layer Grid Architecture (From Compass Research)
|
||||
Following successful roguelike patterns (Caves of Qud, Cogmind, DCSS):
|
||||
|
||||
1. **Visual Layer** (UIGridPoint) - Sprites, colors, animations
|
||||
2. **World State Layer** (TCODMap) - Walkability, transparency, physics
|
||||
3. **Entity Perspective Layer** (UIGridPointState) - Per-entity FOV, knowledge
|
||||
|
||||
### Performance Architecture (Critical for 1000x1000 maps)
|
||||
- **Spatial Hashing** for entity queries (not quadtrees!)
|
||||
- **Batch Operations** with context managers (10-100x speedup)
|
||||
- **Memory Pooling** for entities and components
|
||||
- **Dirty Flag System** to avoid unnecessary updates
|
||||
- **Zero-Copy NumPy Integration** via buffer protocol
|
||||
|
||||
### Key Insight from Research
|
||||
"Minimizing Python/C++ boundary crossings matters more than individual function complexity"
|
||||
- Batch everything possible
|
||||
- Use context managers for logical operations
|
||||
- Expose arrays, not individual cells
|
||||
- Profile and optimize hot paths only
|
||||
|
||||
---
|
||||
|
||||
## Project Status: 🎉 ALPHA 0.1 RELEASE! 🎉
|
||||
|
||||
**Current State**: Alpha release achieved! All critical blockers resolved!
|
||||
**Latest Update**: Moved RenderTexture (#6) to Beta - Alpha is READY! (2025-07-05)
|
||||
**Branch**: interpreter_mode (ready for alpha release merge)
|
||||
**Open Issues**: ~46 remaining (non-blocking quality-of-life improvements)
|
||||
**Current State**: Documentation system complete, TCOD integration urgent
|
||||
**Latest Update**: Completed Phase 7 documentation infrastructure (2025-07-08)
|
||||
**Branch**: alpha_streamline_2
|
||||
**Open Issues**: ~46 remaining + URGENT TCOD/Tutorial work
|
||||
|
||||
---
|
||||
|
||||
## 📋 TCOD Integration Implementation Details
|
||||
|
||||
### Phase 1: Core UIGrid Integration (Day 1 Morning)
|
||||
```cpp
|
||||
// UIGrid.h additions
|
||||
class UIGrid : public UIDrawable {
|
||||
private:
|
||||
TCODMap* world_state; // Add TCOD map
|
||||
std::unordered_map<int, UIGridPointState*> entity_perspectives;
|
||||
bool batch_mode = false;
|
||||
std::vector<CellUpdate> pending_updates;
|
||||
```
|
||||
|
||||
### Phase 2: Python Bindings (Day 1 Afternoon)
|
||||
```python
|
||||
# New API surface
|
||||
grid = mcrfpy.Grid(100, 100)
|
||||
grid.compute_fov(player.x, player.y, radius=10) # Returns visible cells
|
||||
grid.at((x, y)).walkable = False # Ergonomic access
|
||||
with grid.batch_update(): # Context manager for performance
|
||||
# All updates batched
|
||||
```
|
||||
|
||||
### Phase 3: Entity Integration (Day 2 Morning)
|
||||
```python
|
||||
# UIEntity additions
|
||||
entity.path_to(target_x, target_y) # A* pathfinding
|
||||
entity.flee_from(threat) # Dijkstra map
|
||||
entity.can_see(other_entity) # FOV check
|
||||
```
|
||||
|
||||
### Critical Success Factors:
|
||||
1. **Batch everything** - Never update single cells in loops
|
||||
2. **Lazy evaluation** - Only compute FOV for entities that need it
|
||||
3. **Sparse storage** - Don't store full grids per entity
|
||||
4. **Profile early** - Find the 20% of code taking 80% of time
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -613,4 +723,40 @@ This architecture would make McRogueFace a first-class Python citizen, following
|
|||
|
||||
---
|
||||
|
||||
*Last Updated: 2025-07-08*
|
||||
## 🚀 IMMEDIATE NEXT STEPS (Priority Order)
|
||||
|
||||
### Today (July 9) - EXECUTE NOW:
|
||||
1. **Start Tutorial Part 1** - Basic setup and @ movement (2 hours)
|
||||
2. **Implement UIGrid.at((x,y))** - CellView pattern (1 hour)
|
||||
3. **Create Grid demo** for sizzle reel (1 hour)
|
||||
4. **Fix any blocking bugs** discovered during tutorial writing
|
||||
|
||||
### Tomorrow (July 10) - CRITICAL PATH:
|
||||
1. **Tutorial Parts 2-4** - Map drawing, entities, FOV, combat
|
||||
2. **Implement compute_fov()** in UIGrid
|
||||
3. **Add batch_update context manager**
|
||||
4. **Expand sizzle reel** with entity choreography
|
||||
|
||||
### July 11 - ANNOUNCEMENT DAY:
|
||||
1. **Polish 4 tutorial parts**
|
||||
2. **Create announcement post** for r/roguelikedev
|
||||
3. **Record sizzle reel video**
|
||||
4. **Submit announcement** by end of day
|
||||
|
||||
### Architecture Decision Log:
|
||||
- **DECIDED**: Use three-layer architecture (visual/world/perspective)
|
||||
- **DECIDED**: Spatial hashing over quadtrees for entities
|
||||
- **DECIDED**: Batch operations are mandatory, not optional
|
||||
- **DECIDED**: TCOD integration as mcrfpy.libtcod submodule
|
||||
- **DECIDED**: Tutorial must showcase McRogueFace strengths, not mimic TCOD
|
||||
|
||||
### Risk Mitigation:
|
||||
- **If TCOD integration delays**: Use pure Python FOV for tutorial
|
||||
- **If performance issues**: Focus on <100x100 maps for demos
|
||||
- **If tutorial incomplete**: Ship with 4 solid parts + roadmap
|
||||
- **If bugs block progress**: Document as "known issues" and continue
|
||||
|
||||
---
|
||||
|
||||
*Last Updated: 2025-07-09 (URGENT SPRINT MODE)*
|
||||
*Next Review: July 11 after announcement*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue