<aside> š¢ This document aims to give a list of useful mental models when building Autonomous Worlds with MUD.
</aside>
bytes32
Can be done Gold being generated linearly for each player.
Save the last time a player used their gold to do something (build, buy, etc). Every time a player executes an action that requires gold, first refresh the amount of gold a player has based on their previous gold amount, their latest refresh, and the rate of refresh. On the client show the gold as it would be if the player were to make an action now
Can be done with tricks Moving monsters in a room automatically.
When a player moves in a room, the transaction also moves all monsters in the room according to some pre-defined rooms. If you want to make it such that more players donāt make monsters behave faster (due to them making more moves), you can save the last time the monsters got moved and skip the monster move code-path if it happened recently enough. It is important that the code path of moving monster is bounded (eg: there can only be so many monsters in a room). Otherwise it is possible for the game to enter a deadlock where moving a player would lead to such a gas-heavy transaction to move all monsters that it would exceed the maximum block limit.
Avoid this pattern if possible.
Canāt be done Minecraft-like system where the world is alive around you, even without actions
There doesnāt exist good architecture for this yet.