A distributed resource trading simulation built in Elixir, exploring concurrent systems and the actor model.
Imperium is a space trading game where autonomous ships (each running as independent Elixir processes) navigate a sector map, gather resources, and trade with each other. Ships communicate via message passing - no shared state.
Implemented:
- Ship processes (GenServers) with position and inventory
- SectorMap coordinator tracking ship positions
- ShipIndex (bidirectional lookup: ship→position, position→ships)
- Ship registration
In Progress:
- Movement mechanics and validation
- Implementing new coordinate system based on Traveller. Future:
- Resource gathering
- Ship-to-ship trading
- Network protocol layer (allow external programs to control ships)
- Multiple protocol implementations (TCP, WebSocket, local)
- AI bots in various languages connecting to play
- Supervision trees for fault tolerance
This project explores:
- Elixir's actor model and OTP patterns
- Concurrent system design
- Process supervision and fault tolerance
- Protocol abstraction for multi-language clients
- Network programming and game state synchronization
Inspired by the Traveller TTRPG setting.