Rice and Shine: A Sengoku Assassination Sandbox
README.md
festival.crowd
One driver for every festival.Figure in play. Each figure joins with a tick(dt) that answers how many seconds
until it next wants a turn (its level of detail decides: 30 Hz up close, 10 Hz mid, 4 Hz far, twice a second while
hidden), and the festival.Festival component calls tick(dt) once a frame, so only the figures that are due run.
This keeps a hundred-odd festival-goers from costing a script call each per frame.
local Crowd = require("festival.crowd")
Crowd.join(key, function(dt) ... return 1 / 10 end)
Crowd.tick(dt) -- once per frame, from the Festival component
Crowd.leave(key)