Questions about socket connections and battle royale games

Hello,

I’d like to connect to Nakama without using a socket connection .
In using the FishGame project example, we have this

await Socket.ConnectAsync(Session, true);

to connect to the server. If I use it, every single user will have an occupancy socket connection.
My goal is to have users connect to the game, login, get all the information about their saved game data, and go to the menu without using sockets.

After all is done, users click to start a multiplayer match, which takes one socket connection per user .

  1. Is it possible to connect to Nakama without using socket connction?

  2. Is taking socket connections without sending and receiving states wasting server resources?

I saw in the documents that we could use a relay or authenticate server, but I didn’t see how we could actually choose between the themes.

  1. How can we use relay or authenticate server?

  2. My game is an online racing game where up to 10 players can play together on a map.
    Which one is better? relay or authenticate server connction?

I have a plan to make a battle royal mode for my racing game in the future(up to 20-50 players can join per match).
I don’t know a lot about battle royale mechanisms. Please kindly give me some tips
My goal is to use fewer server resources and have a better ping for players.
Idk, for example ,how or when to respawn a player , how to send and receive states that use very low server resources,tick rate, etc.

  1. Can you give me some tips about the Battle Royale games?

I would appreciate any assistance.

1 Like

Hi Jsonberg,
You will almost certainly need to use a socket connection to create a Battle Royale game. It depends on your game and data usage patterns but in general, Nakama can handle more than enough socket connections to create a good Battle Royale.

As for relayed vs server-authoritative code, it essentially depends on whether you are using server runtime code to control the core logic of your game. In general, server authoritative code requires more careful consideration and working in a separate programming environment, but it can prevent cheaters from abusing your game and gives you access to server-side-only features.

Try not to overly worry about server resources and do what makes sense from the perspective of designing your game. For a Battle Royale that will mean using match data to send messages to the various users in your match and acting upon those messages appropriately on the client.