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

Hi team, thank you for the good work of the project. I’m really enjoying it.
Right now, I’m developing a social game like an image below but I wonder how to create a world.

image

My goal is to create a world that players can see and interact with each other. I’m thinking about using “Nakama match” which is created by the system’s user.
“match” which seems to be something temporary so I’m really sure what to do, need your help.

Hi @jojoee welcome :wave:

My goal is to create a world that players can see and interact with each other. I’m thinking about using “Nakama match” which is created by the system’s user.

I need more information to understand the game design you want to achieve with your world to provide the best advice on how to approach it with Nakama:

  • How many players do you think will interact online in this world space?
  • Is the world broken up into rooms or logical separations of some kind?
  • When players change parts of the world should it be reflected to all players?
  • What kind of gameplay happens in the world?

Sorry for the mass of questions but I think it’ll help me suggest the best solution. :slight_smile:

1 Like

:slight_smile: Sure, the image below demonstrates the game world.

  1. The game has system-world which all the users can participate with e.g.
  • walk around the map to enjoy other players
  • talk to NPC to receive a quest
  • find a treasure to get a reward
  • clicking the building (e.g. casino, zoo, park) to move into another world/room/space
  1. The game also provides player-world which is can be customized by the player, and other players also can join the world.
  1. For the system-world at a peak time might be around 4-5k with 1k on average.
  2. For the player-world at a peak time might be around 500 with 200 on average (for some player).

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

  • casino-room has a lot of 777 machines
  • zoo-room has a lot of animals with a different logic of interaction

Yes, for example in the player-world

  • if a player places the obstacle then the other players can not walk through it.
  • or when playerA loots an item from player-world then other players can no longer collect it.

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

  • chat with other players
  • send an emoji/sticker to other players
  • fishing in the provided area
  • participate in an event inside game-world
  • challenge another player to play mini-game
  • etc.
1 Like

@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