- Add CLAUDE.md project documentation - Update all documentation with coherence fixes - Add engines directory structure (to be converted to submodules) - Add core/, client/ directories for main components - Resolved 30 coherence problems (P1-P30) - Enhanced map system with 218 procedural elements
4.0 KiB
4.0 KiB
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Project Overview
Warfactory is a Factorio-inspired industrial military simulation game combining factory management with strategic military doctrine. The project is currently in design/documentation phase with comprehensive technical specifications.
Core Philosophy:
- Factory assembly lines as gameplay foundation
- Player-driven military doctrine development
- Progression from PMC operations to conventional warfare
- Choice and complexity balanced with accessible presentation
Documentation Architecture
The project uses a modular documentation system in /docs/:
Core Design Documents
vue-ensemble.md- Vision, philosophy, and design principlesarchitecture-technique.md- Multi-server architecture, engines, performance specssystemes-techniques.md- Tile system, memory management, chunksmap-system.md- Procedural generation with 218+ elements, budget system (-10 to +10)
Gameplay Systems
gameplay-industriel.md- Resource flow, production, factory optimizationsysteme-militaire.md- Vehicle design with grid-based component placementeconomie-logistique.md- Market simulation, supply chains, pricingmecaniques-jeu.md- Research systems, breakthrough mechanics, administration
Advanced Systems
arbre-technologique.md- 3000+ technology tree with prerequisites gatingmetriques-joueur.md- Comprehensive analytics (3.1GB per game, adaptive scaling)coherence-problem.md- Resolved design contradictions and technical challenges
Key Technical Concepts
Engine Architecture
- Autonomous Engines: 6 specialized engines (Economy, War, Intelligence, Designer, MacroEntity, Map)
- Smart Client: Request/response pattern, no streaming, FOW at chunk granularity
- Performance Target: 60fps with 1000+ AI companies, 1-2 vehicle designs/tick globally
Map System
- Multi-scale: World (diplomatic) → Regional (logistics) → Local (factory) → Detail (combat)
- Procedural Generation: 218 elements with budget scoring, millions of combinations
- Chunk System: 64x64 tiles, streaming on demand, persistent storage
Military Design
- Grid-based Vehicle Design: Irregular chassis shapes with component placement
- Interface: Pick/place with A/E rotation, R for snap toggle, template support
- Combat: Multi-chunk battles, persistent frontlines, auto-battler with player oversight
Development Context
Resolved Issues
Most initial "coherence problems" (P1-P30) were invalidated through clarification:
- Architecture scales properly with smart resource management
- Interface complexity is standard for genre (comparable to Factorio, Tarkov inventory)
- Performance targets achievable with proper optimization
- Only P7 (engine responsibilities) requires further analysis
Current Status
- Phase: Design documentation complete, technically viable
- Next Steps: Implementation planning, engine responsibility clarification
- Questions Open: 11 items in
questions-ouvertes.mdfor future resolution
Working with This Project
Documentation Updates
- Cross-reference systems when making changes (especially architecture ↔ gameplay)
- Maintain coherence between technical specs and game design
- Update
coherence-problem.mdif new conflicts emerge
Key Design Constraints
- Skip-ability: All systems must be automatable for accessibility
- Depth vs Accessibility: Complex systems with simple interfaces
- Performance: Real-time constraints with large-scale simulation
- Realism: Military authenticity balanced with gameplay fun
Important Files for Context
- Start with
vue-ensemble.mdfor project vision - Reference
architecture-technique.mdfor technical decisions - Check
coherence-problem.mdfor resolved design challenges - Use
questions-ouvertes.mdfor known open issues