pub fn run() -> Result<()>
Expand description

Runs the game loop and blocks until it returns an error (or the process is terminated).

One loop consists of the following:

  1. Spawn newly logged in player characters if any are reported by LoginServer.
  2. Gather up the new ClientActions from players.
  3. Process the ClientActions into Effects.
  4. Apply the Effects to the World.
  5. Despawn players that haven’t sent a message in a while (= have disconnected).
  6. Send out relevant ChunkUpdates to the players (may include entire Chunks, if needed).
  7. Run World::update (i.e. simulate one timestep).