📚 Complete documentation reorganization: 🗂️ Structure: - docs/global/ → Complete project documentation (all original files) - docs/engines/ → 10 engine-specific docs with focused responsibilities - docs/serveur/ → Server coordinator and inter-engine communication - docs/client/ → Smart Client interface and user experience 🔧 Engine Documentation: - Designer: Vehicle design with AI assistance (1-2 designs/tick) - Economy: Market simulation and dynamic pricing - Event: Breakthrough system and global events - Factory: Factorio-like production with belts/assemblers - Intelligence: Metrics collection (3.1GB adaptive) + reconnaissance - Logistic: Supply chains and convoy management - MacroEntity: Companies, diplomacy, administration (1000 pts/day) - Map: Procedural generation (218+ elements) + chunk streaming - Operation: Military strategy and adaptive AI generals - War: Multi-chunk combat and persistent frontlines 📋 Each engine doc includes: - Core responsibilities and system overview - Key mechanics from relevant design documents - Communication patterns with other engines - Implementation notes and architecture details 🎯 Navigation optimized for: - Engine developers (focused system details) - System architects (coordination patterns) - Game designers (mechanics integration) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
98 lines
3.3 KiB
Markdown
98 lines
3.3 KiB
Markdown
# Systèmes techniques
|
|
|
|
## Tile System
|
|
|
|
### Superficies
|
|
- **Océan** : 362 000 000 000 m²
|
|
- **Total** : 510 000 000 000 m²
|
|
- **Terre** : 148 000 000 000 m² (118.4 Go)
|
|
- **Urbain** : 4 440 000 000 m² (3.552 Go)
|
|
|
|
### Référence Minecraft
|
|
- MC 256x256 = 3 540 ko
|
|
|
|
## Gestion mémoire
|
|
|
|
### Game Chunk max DD Absolue pire cas (256x256)
|
|
- **Land** : 131 ko
|
|
- **Ressources** : 393 ko
|
|
- **Build** : 459 ko
|
|
- **Roof** : 131 ko
|
|
- **Effect** : 131 ko
|
|
- **Total** : 1 245 ko
|
|
|
|
### Game Chunk RAM (256x256)
|
|
- **Land** : 131 ko
|
|
- **Ressources** : 655 ko
|
|
- **Build** : 720 ko
|
|
- **Roof** : 131 ko
|
|
- **Effect** : 131 ko
|
|
- **Total** : 1 768 ko
|
|
|
|
## Architecture Multi-Échelle des Chunks
|
|
|
|
### Principe de Design
|
|
Différents types de données utilisent différentes résolutions de chunks selon leur granularité naturelle et leurs besoins de performance.
|
|
|
|
### Hiérarchie des Échelles
|
|
|
|
#### Chunk 512x512 - Terrain de Base
|
|
**Usage** : Données homogènes sur grandes zones
|
|
- **landId** : 16b - Texture de la tile (potentiel modificateur) DD/Ram
|
|
- **roofId** : 16b - Identification toitures/couverture sol
|
|
- **Justification** : Terrain change peu, grandes zones homogènes
|
|
- **Mémoire** : Toujours en RAM (données de base)
|
|
|
|
#### Chunk 256x256 - Structures et Bâtiments
|
|
**Usage** : Bâtiments et constructions moyennes/grandes
|
|
- **buildingPtr** : 32b "DD"/Ram
|
|
```cpp
|
|
{
|
|
BuildingId : 32b DD/Ram
|
|
Collision : 4b Ram
|
|
PV : 20b DD(24b)/Ram
|
|
}
|
|
```
|
|
- **Justification** : Bâtiments ont taille intermédiaire, besoin résolution moyenne
|
|
- **Mémoire** : Chargement à la demande
|
|
|
|
#### Chunk 128x128 - Effets et Détails Fins
|
|
**Usage** : Effets visuels, particules, détails haute fréquence
|
|
- **effectId** : 16b
|
|
- **Justification** : Effets nécessitent granularité fine pour précision
|
|
- **Mémoire** : Streaming selon proximité joueur
|
|
|
|
#### Chunk 64x64 - Gameplay Principal
|
|
**Usage** : Simulation de base, FOW, navigation (documenté dans map-system.md)
|
|
- **Justification** : Échelle optimale pour mécanique Factorio-like
|
|
- **Mémoire** : Core gameplay, chargement prioritaire
|
|
|
|
### Système Ressources (Indépendant)
|
|
**ResourcePatches** : Formes libres non-alignées sur chunks (78x53 exemple)
|
|
- **Justification** : Gisements naturels ne respectent pas grilles artificielles
|
|
- **Documentation** : Détails complets dans map-system.md
|
|
- **Mémoire** : Chargement selon exploration et exploitation
|
|
|
|
### Avantages Architecture Multi-Échelle
|
|
- **Performance optimisée** : Chaque donnée à sa résolution naturelle
|
|
- **Mémoire efficace** : Granularité adaptée aux besoins d'accès
|
|
- **Scaling intelligent** : Pas de sur-échantillonnage ni sous-échantillonnage
|
|
- **Maintenance** : Systèmes indépendants, modifications isolées
|
|
|
|
## Stack technique
|
|
|
|
### Langages de performance
|
|
- **C++ / C / ASM** pour performance critique
|
|
- **Justification** : Simulation temps réel complexe + milliers d'unités
|
|
- **Compromise** : Complexité dev acceptable vs performance requirements
|
|
|
|
### Optimisations performance
|
|
|
|
#### Adaptive Tick Rate
|
|
- **Normal** : 60 TPS
|
|
- **Sous charge** : 15 TPS
|
|
- **Principe** : Dégradation gracieuse selon la charge
|
|
|
|
#### Queue Systems
|
|
- Batch processing pour opérations coûteuses
|
|
- Future scaling : clustering dynamique per module |