Markets
Visually simulate markets of basic consumers and producers.
Built on zig-gamedev.
Download from the latest release or build from source.
Random Resource Simulation
demo.webm
- Simulate market dynamics of consumers and producers.
- Consumers move to Producers, get resources, travel home and consume the resources.
- Red means consumer is empty and looking for resources.
- Green means consumer has enough resources to consume.
- Parameters:
- Number of Consumers
- Number of Producers
- Consumers moving rate
- Consumers demand rate
- Consumers size
- Producers production rate
- Producers maximum inventory
- Data Gathered:
- Transactions per second
- Empty Consumers
- Total Producer Inventory
- To remove a line from the graph, click it’s title in the legend.
Resource Editor
editor.webm
- Manually place position of consumers and producers.
- Each producer and consumer grouping has individual parameters.
Variable Parameters
variable.webm
- Very similiar to the random simulation.
- Have input parameters controlled via a wave timeline.
Build From Source
Download
zigup is recommended for managing compiler versions.
Run
git clone https://github.com/ckrowland/simulations.git
cd simulations
# Run natively
zig build random-run
zig build editor-run
zig build variable-run
# Run in browser
zig build -Dtarget=wasm32-emscripten random-web-emrun
zig build -Dtarget=wasm32-emscripten editor-web-emrun
zig build -Dtarget=wasm32-emscripten variable-web-emrun