Starting with a Client Prediction and Authoritative Server foundation. Is this in the right direction?
reddit.com·16h·
Discuss: r/gamedev
Flag this post

Looking to program a top-down PVP game (12 ~ 16 players max) that involves a lot of projectiles and hitboxes on a 2D space.

My idea starts with a netcode like this:

QUESTION ONE: Server runs first. Clients will join a little later, so server game frame is likely going to be accumulating before receiving any client inputs. So when a client enters the match, the server will tell the client which game frame it’s on (i.e 128), by the time that reaches the client, there will already be a mismatch since the server game frame is up a couple of numbers. I’m aware the client must always be ahead of the server, so will I have to add extra dummy frames by a certain amount, i.e ping or a fixed amount for everyone?

QUESTION TWO: The server and client both run at a 60hz rate. The c…

Similar Posts

Loading similar posts...