Create a "world" (like a game-lobby) that player see each others

@jojoee Thanks for the extra details. This game design can certainly be achieved with Nakama server. You’ll have to think about various optimizations to fit the specifics of the game logic like message coalescing, etc. but it’s all doable.

The game also provides player-world which is can be customized by the player, and other players also can join the world.

How do players find other player’s individual worlds? Do they have to be friends together or is there some kind of search feature?

Yes, each world/room/space has a different logic e.g.

Ok and each room in the system-world hosts some set of players.

Like other social games (e.g. LINE Play 2) such that

All these other social elements are easy with the APIs in Nakama.

In general how I’d build this game world is with a bunch of different steps.

  1. You’ll need a static dataset which represents the layout of the world space (system-world). A very simplified layout for this could be something like:

    {
        "world": [{
            "shard_name": "city1",
            "rooms": [{
                "name": "casino"
            }],
        }]
    }
    
  2. Now that you have the dataset that describes your system-world you’ll take the data at server startup and create multiplayer match handlers for each shard and for each room within the shard.

  3. Make sure that each match handler has fields in its label which describes itself so that it can be found when players use match listings to move between shards and rooms.

  4. At startup the game clients will open a socket and use the match listings feature to find the shard that they were last active in (saved into a storage object and updated as they play. i.e. move between shards). They can then use match join with the match ID as normal.

  5. Each player can have their own match handler that describes their own world but this will only be created on demand when a player tries to “travel” to a player’s player-world. The rules for what allows the player to find and access another player’s world are specific to your game.

  6. You’ll likely have 2 or 3 different match handlers named in the server:

    1. Player World Match Handlers
    2. Room Match Handlers
    3. System World Match Handlers

A few details to note:

  • Match IDs are ephemeral by design so do not save them to a player’s storage - instead take advantage of match listings and match labels that describe a match handler to find the right part of the world for the player to navigate into.
  • Take advantage of the storage engine which lets players mark their own data as public read to help share data which other players can find.

This is quite a complex game to put together but the server does have all the capabilities already to achieve it. Hope this helps.

3 Likes