aboutsummaryrefslogtreecommitdiff
path: root/specs
diff options
context:
space:
mode:
authorSofviic <sofviic1993@gmail.com>2024-06-18 13:52:13 +0300
committermetamuffin <metamuffin@disroot.org>2024-06-23 19:21:22 +0200
commitc2eaf02fb258fee7c389e00cd3cbf61b5b1126fc (patch)
treef35493e7fc71e84ae716df025e0f28b4621b56d9 /specs
parent12ecbe37e7fe1f68be1f9b9e69595d0baa2ee987 (diff)
downloadhurrycurry-c2eaf02fb258fee7c389e00cd3cbf61b5b1126fc.tar
hurrycurry-c2eaf02fb258fee7c389e00cd3cbf61b5b1126fc.tar.bz2
hurrycurry-c2eaf02fb258fee7c389e00cd3cbf61b5b1126fc.tar.zst
game design document; 6 demand; psudocode for clarification
Diffstat (limited to 'specs')
-rw-r--r--specs/06.Demand.md6
1 files changed, 6 insertions, 0 deletions
diff --git a/specs/06.Demand.md b/specs/06.Demand.md
index 30af805f..01424a27 100644
--- a/specs/06.Demand.md
+++ b/specs/06.Demand.md
@@ -13,6 +13,9 @@ demand = sin(3*sin((hour+offset)/2))+1
(always nonnegative below 2)
every day the `offset` will be offset by `[-1,1]` multiplied by the [sway coefficent](#sway-coefficent).
+```c
+offset += rand(-1,1) * sway
+```
### The Demand Bias
Demand scale starts at 0%.
@@ -20,6 +23,9 @@ Demand scale starts at 0%.
every day the `bias` will be offset by `[-10,10]` multiplied by the [sway coefficent](#sway-coefficent).
(clamped to -50% & 50%).
+```c
+bias += rand(-10,10) * sway
+```
### Traffic Coefficent
Usually 1%