A Trade Simulator Game by Rayan Bouzid
Space Merchant is a dynamic, modular simulator game set in a procedurally structured universe. The game simulates a complex web of trade, politics, and goals across a multi-layered world, with autonomous entities competing and cooperating to achieve diverse objectives. Designed to be highly customizable and admin-controllable, it can function both as a game and a pure simulation.
The project uses MSBuild for compilation. You can install MSBuild or use Visual Studio, which has it integrated.
It is recommended to use Visual studio for compilation but if you want to use msbuild separetelly, use this command in the root SpaceMerchant directory:
msbuild SpaceMerchant.sln
In Space Merchant, players or AI entities engage in economic, technological, and strategic activities in a hierarchical game universe. The simulation emphasizes emergent behavior, barter-based trade, and flexible technologies — all governed by user-defined rules.
The game world is made up of nodes, organized in hierarchies. Each node can:
-
Contain sub-nodes
-
Be connected to sibling nodes
-
Be built or destroyed dynamically
Example Hierarchy:
- Game Universe
└── Planetary System
└── Planet
└── Region
└── City
Connections between nodes can be built, destroyed, and require upkeep. They form a living, evolving network of infrastructure.
Entities represent individuals or organizations:
-
Hierarchical: A person can belong to a department, which belongs to a company.
-
Autonomous: Each entity has its own resources, goals, and behavioral viewpoints (e.g., greedy, egalitarian, power-driven).
Entities perform actions such as:
-
Trading commodities
-
Building infrastructure
-
Offering services (e.g., transport, protection, finance)
Technologies can be:
-
Extracted
-
Produced
-
Traded
-
Stored
Technologies define what entities can do, divided into three categories:
- Transport
Enables maintaining node connections and moving goods.
- Production
Powers the creation of commodities using energy and materials.
- Services
Allows entities to offer utility, protection, and financial capabilities to others.
- Backend (C++ Engine)
A headless simulation engine running as a background service. It maintains game state and logic.
- Exposes a TCP socket for communication
- Can respond to multiple frontend clients over LAN
- Frontend (FTXUI Console App)
A visual UI connecting to the engine via TCP:
- Requests and visualizes data
- Can be run from multiple devices