Wondering in general how IDs are stored in a large massively multiplayer online game.

From what I can imagine, it seems that each "game entity" would have a globally unique ID (GUID). Say there are 10 people connected to the game. The game server then spawns any new game entity, and sends the GUID (along with the entity data) to the clients. The clients never create entities directly. Actually no, the client maybe can also create game entities that are unique to the view of that specific client. So if player 1 is viewing a screen, then they might see game entity x, in addition to game entities a, b, c, etc. Then player 2 sees game entities a, b, c, and y, but not x. Not sure if these "dynamic" game entities are created on the client or server, so that is the first part of the question.

Then given these GUIDs, say there is tracking (analytics) that goes on. Say the game company wants to track when a player defeats a game entity. So it saves to the backend/server database "player 1 defeats game entity 123asdf....GUID". But if game entities are constantly spawned and then destroyed/cleared (by hiding or maybe they have a temporary/ephemeral existence), then the database would have GUIDs for a lot of non-existent game entities. So I'm wondering if this is how it's done, or if these ephemeral game entities have metadata permanently stored to the database beyond their GUID, or if they are never saved to the DB, etc.

Then there is the problem of having lots of game entities (particles) on the screen. If each particle of say 1 million particles has a GUID, and you shoot (if it's like asteroids game) one of them, then the DB saves "player 1 destroyed GUID x at timestamp y". But the GUIDs have to be unique across the game server. So if 10,000 people are playing asteroids, and each asteroid has a GUID, the problem is how to guarantee the GUID is unique, and also secure (if that's a concern).

Then there is the issue of offline playing. Say you play offline, but then sync your data occasionally. Then GUIDs need to be generated on the client, and could be tampered with (and be insecure). Ideally the GUIDs would be generated on the server so we know how they are constructed and that they are secure.

Basically, I am wondering how GUIDs work in a MMO.

  • If all game entities have a unique GUID.
    • If ephemeral game entities have unique GUIDs.
    • If there are non-ephemeral (persistent) game entities that have GUIDs.
  • If tracking/analytics tracks both ephemeral and persistent game entities.
  • How GUIDs are guaranteed to be unique.
  • How GUIDs work if the player is playing offline.
  • 1
    \$\begingroup\$ You seem to be mostly interested in logging entity-related events for analytic purposes. Can you tell us more about the analysis requirements you have for your game? That would allow us to write an answer which is tailored to your specific challenges. That would help you more than reading about a solution used by a completely different game which had completely different requirements. \$\endgroup\$
    – Philipp
    Commented Jun 29, 2018 at 11:25

1 Answer 1


How important is it really that you track individual entities or that all of them are unique?

Per player you only care about which type of monster killed and what loot he got.

Then when the respawn timer runs out you can spawn the monster again and make it indistinguishable from the previous monster.

You can still use timestamps to differentiate between the monsters if you need to.

Also when you allow offline play everything the client says he did when reconnecting is suspect GUIDs are the least of your worries then.

  • \$\begingroup\$ EVE-Online tracks EVERYTHING (last I heard) so they can track real fraud. Not ingame fraud, because they love that. \$\endgroup\$
    – Almo
    Commented Jun 29, 2018 at 13:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .