Client-side prediction and server reconciliation using nakama server runtime

Hi all! I am looking into creating a multiplayer Arcade/Arena FPS game (mostly to learn) and came across Nakama for the backend service. I am using the Godot engine.

For the game architecture, I was looking into making the server authoritative. This means I need to run a simulation in both the client and server (client-side prediction approach). I understand most of the theoretical details of implementing this. This approach requires the game (at least a logic level simulation) to run the same-ish (can make the interpolation of entity robust for prediction errors too - so it doesn’t need full determinism.) on both client and server.

This being an FPS the main things are movement system and a simple physics/collision system. What do you guys suggest I do? I could write a simple collision system in Lua and try to do the same in Godot. But this means I have to maintain 2 versions of my simulation logic (outside of the other client-only code) and ensure both do the same. But since they are different languages I don’t know how this will go.

I could also move away from the client-side prediction & server reconciliation approach using something like time-dilated simulation (which essentially hides lag, but game responsiveness is lessened).

Any help is appreciated.

Hello! I use Nakama and Godot for multiplayer (either separately or together depending on the project) so I can help a bit.

The suggested approach for something like an FPS is to use a godot headless server for the game logic side of the multiplayer, and Nakama would only handle things like matchmaking, leaderboards, storage, etc…

So to be clear you would need both Nakama and Godot running on your server. See my comment here for why some games need a copy of the game on the server.

To get started with using godot for server-authoritative multiplayer I would recommend the excellent menip tutorials.