based on docs, its possible with nakama. but there are no comprehensive docs for it. or I could not find it.
first of all, does nakama support udp for real-time games? how should I select between web sockets or UDP?
How does the authoritative way work with Nakama? Should it still be there as the server? In such games, authoritative servers are made with the same engine to simulate physics, etc., and clients directly communicate with them. Servers like Nakama are just used for match listing. How does it work with Nakama? Based on the documents, Nakama can also manage a cluster of many game servers.
i think in such scenarios I should use Nakama as relay and the authoritative server to connect to it like other clients but code other ways to handle authority and manage real data.
Hello @virtouso,
We don’t have a public UDP implementation, it’s an optimization we provide to select customers which requires special provisions to be deployed to cloud providers, making it operationally more complex. We may release it to the public in the future.
In practice, most of our customers use TCP socket connections which suffices for most game types.
Nakama has its own authoritative runtime that supports Go, Lua and JS. The runtime is flexible enough to implement the game logic for a wide array of different game types, however for games that require very complex physics to be run authoritatively, it’s likely needed to implement a physics engine from scratch.
We’ve seen a few teams accomplish this successfully for relatively simple games. If very intensive 3D physics support is required, the most common solution is to use something like GameLift or EdgeGap to spin up headless Unity or Unreal instances that run the game logic authoritatively, and use Nakama to orchestrate the deployments of these headless instances, manage their state and all the other facets of the Game (Accounts, Authentication, Inventory, Leaderboards, Matchmaking, etc.).
If required, Nakama Enterprise does support to be scaled-out horizontally to work as a cluster.
Hope this clarifies.