Realtime Multiplayer Client's Stealing Input

I am experimenting with Nakama (locally hosted with docker) and Godot (4.3)

I managed to build a very fun little 1v1 game that works great with 1 exception, each player can only send input if the other is not.

At first I was using op code 100 to send client input to the server, I though maybe each player needed a separate code, so I then changed it so the second player who joins the match would send input on code 101 (updating the server code to handle the new op code respectively) This did not solve my issue.

I also tried using the lobby state when iterating through the match loop to combine multiple input messages together and process them together instead of within their op code cases within the match loop.

I am hoping this is some common “new to nakama” issue, otherwise I may just start to re-implement the client inputs hoping I discover a mistake I might have made.

You can see me demonstrate the issue here: Twitch

Thank you for your time!

Hello @TigerJ,

From the server perspective, no such limitation exists, both clients connected to the server sending inputs on different sockets should either be relayed (if in relay mode) or be part of the messages to be processed in the next tick (in authoritative mode).

I suspect there’s an issue either with input processing in the client or in the authoritative code (if any).

Different code should also not be required, but how these are handled depend entirely on your custom server logic.

If you want an example of an authoritative tic-tac-toe, please refer to our project template.

Hope this helps.

This helps a ton I am doing some very weird stuff with the server side logic/code :slight_smile:

Thanks you have confirmed what I was expecting.

(and saved me from spending my next weekend writing custom client input streams)

well… I think I found the issue :wink: