A game starts to feel real when it remembers what you did. For the last month I’ve been working on two kinds of memory in Fiber: short-term memory for the maps you walk through, and long-term memory for your character.
Maps that remember
Fiber’s world is made of maps joined by warps. Until April, leaving a map threw it away, so walking back in respawned every enemy fresh and brought back every pickup you’d already grabbed. Now a map state manager takes a snapshot when you leave and restores it when you return:
- Mobs come back where you left them, with the same health and behavior state.
- Spawners keep their timers and their pool of reusable mobs.
- Pickups you already collected stay collected.
It’s session-only on purpose. Each spawner has a reset timer, five minutes by default, after which the map starts fresh. Map state isn’t part of your save. The spawners don’t know the manager exists, either: the main scene asks every spawner on the old map for a snapshot and hands them back on return.
Multiplayer made this more interesting. The host owns map state, so when a pickup is collected or a mob dies, the host’s snapshot is the one that counts, and map warps are synced to every player by the host.
Saving your character
The save system splits data into three scopes:
| Scope | What’s in it |
|---|---|
| User | Settings, account-wide currency and unlocks, a shared stash |
| Character | Stats, inventory, equipment, emblems, patterns, materials and position |
| World | Quest progress, guild town progress and discoveries |
Saving has three tiers. What you’re playing with lives in memory. A save manager writes to a local cache on disk first, then syncs to Nakama in the background, so a slow connection never stalls the game and you can keep playing offline. Nakama is the authority once you’re online.
The pattern that makes it manageable is the saveable. Each system owns its own serialization: inventory knows how to save inventory, equipment knows how to save equipment, and each one registers with the save manager when the player spawns. The save manager doesn’t know what any of the data means; it just collects it and writes it out. Items and emblems save by a stable definition ID plus their rolled values, so renaming or moving a resource file in the project doesn’t break an old save, and every save carries a version number so future changes can migrate old saves forward.