I feel like I'm cheating a lot with some of my multiplayer code but it really helps, e.g. if you want a stamina attribute which the server has authority over the "boundary" effects of (e.g. running out) but you want the local version to change smoothly and without lag (most of it is driven by player input), the best way I found was turn off replication except at authoritative boundaries & let client & server run them in parallel in between, allowing a little drift for the sake of client visuals
Conversation
Notices
-
Embed this notice
The Seven Voyages Of Steve (sinbad@mastodon.gamedev.place)'s status on Tuesday, 05-Nov-2024 01:12:16 JST The Seven Voyages Of Steve -
Embed this notice
The Seven Voyages Of Steve (sinbad@mastodon.gamedev.place)'s status on Tuesday, 05-Nov-2024 01:16:35 JST The Seven Voyages Of Steve Since this is a co-op game and I don't care about cheating I could have just made stamina wholly client-authoritative, but I don't want to rule out having stamina available on the server as well, even if it's slightly out sometimes. I've found that having the server decide when "exhausted" happens even if the client slightly disagrees works fine, wheras real-time replication from server->client of stamina looks terrible in the UI even with smoothing because of the lag & variable replication rate
-
Embed this notice