The current examples are barebones and only showcase syncing positions. The examples should be expanded into an actual game to showcase that the netcode is actually nice to work with. The game could be a barebones MMORPG example showcasing inventory syncing across multiple clients among other things like combat. This is a very involved issue. I don't think I will ever get to this point on my own.
As a small reminder in the following example:
// The client
public partial class GameClient : GodotClient
{
public GameClient()
{
OnPacket<SPlayerPositions>(packet =>
{
Log($"Received {packet.Positions.Count} player positions");
});
}
protected override void OnConnected()
{
Send(new CPlayerJoined("Valk"));
}
}
OnPacket<SPlayerPositions> should be changed to OnPacketReceived<SPlayerPositions>
The current examples are barebones and only showcase syncing positions. The examples should be expanded into an actual game to showcase that the netcode is actually nice to work with. The game could be a barebones MMORPG example showcasing inventory syncing across multiple clients among other things like combat. This is a very involved issue. I don't think I will ever get to this point on my own.
As a small reminder in the following example:
OnPacket<SPlayerPositions>should be changed toOnPacketReceived<SPlayerPositions>