📚 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>
70 lines
2.6 KiB
Markdown
70 lines
2.6 KiB
Markdown
# Economy-Engine Documentation
|
|
|
|
## Engine Overview
|
|
**Economy-Engine** handles market simulation, pricing dynamics, and economic interactions between companies.
|
|
|
|
**Key Responsibilities:**
|
|
- Real-time market pricing simulation
|
|
- Supply and demand calculations
|
|
- Company economic interactions
|
|
- Resource flow optimization
|
|
|
|
## Core Systems
|
|
|
|
### Market Simulation
|
|
From `economie-logistique.md`:
|
|
- **Dynamic Pricing**: Supply/demand based price fluctuations
|
|
- **Market Depth**: Multiple buyers/sellers with varying priorities
|
|
- **Price Discovery**: Realistic market mechanisms
|
|
- **Resource Categories**: Raw materials, components, finished products
|
|
|
|
### Economic Mechanics
|
|
- **Company Budgets**: Financial constraints and cash flow
|
|
- **Trade Networks**: Inter-company commerce
|
|
- **Market Manipulation**: Large players affecting prices
|
|
- **Economic Warfare**: Sanctions, embargos, trade restrictions
|
|
|
|
### Performance Requirements
|
|
From `architecture-technique.md`:
|
|
- **Real-time Processing**: Market updates at 60fps
|
|
- **Scalability**: Support 1000+ AI companies
|
|
- **Autonomous Operation**: Self-regulating market dynamics
|
|
|
|
## Engine Architecture
|
|
|
|
### Core Classes
|
|
```cpp
|
|
class EconomyEngine {
|
|
// Market management
|
|
void updateMarketPrices();
|
|
double getPrice(const std::string& resource) const;
|
|
void processTradeOrder(const TradeOrder& order);
|
|
|
|
// Company economics
|
|
void updateCompanyBudgets();
|
|
bool validateTransaction(int buyerCompany, int sellerCompany, const TradeOrder& order);
|
|
|
|
// Market analysis
|
|
MarketData getMarketData(const std::string& resource) const;
|
|
std::vector<PriceHistory> getPriceHistory(const std::string& resource) const;
|
|
};
|
|
```
|
|
|
|
### Communication with Other Engines
|
|
- **Factory-Engine**: Production costs and output volumes
|
|
- **Logistic-Engine**: Transportation costs and supply chain efficiency
|
|
- **MacroEntity-Engine**: Company budgets, diplomatic trade relations
|
|
- **War-Engine**: Wartime economic impacts, resource scarcity
|
|
- **Intelligence-Engine**: Market intelligence and economic espionage
|
|
|
|
## Key Design Documents
|
|
- `economie-logistique.md` - Complete economic system design
|
|
- `architecture-technique.md` - Performance specifications
|
|
- `coherence-problem.md` - Economic balance considerations
|
|
- `mecaniques-jeu.md` - Economic progression mechanics
|
|
|
|
## Implementation Notes
|
|
- Negative prices are allowed for certain scenarios (waste disposal, etc.)
|
|
- Market depth simulation for realistic price discovery
|
|
- Company-specific pricing preferences and strategies
|
|
- Economic warfare and sanction mechanics |