cdsmith / ourmud

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

persist the world across runs

shapr opened this issue · comments

There's already a writeWorld and readWorld that can be used for this. Details:

  1. A background thread should be spawned that occasionally calls snapshotWorld and writes the result using writeWorld.
  2. When the server terminates, it should also writeWorld before exiting.
  3. At startup, the system should first try to read world.json, and if it exists, use that world. Only if there's no world would it recreate the world from the sample.