Archive 17/01/2023.

Lag compensation for networked projectiles

lebrewer

I’ve been reading and working on top of the NinjaSnowWar sample project in order to come up with a basic networked game. One of challenges I’ve been facing is lag compensation and projectiles. I’ve read a little bit on how the Source engine does it:

https://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking#Lag_compensation

But I’m still not sure how that applies in Urho. Do I have to, on every frame, get all reported positions for the project + the player, and do a Slerp based on server time, and see if the hit was probable or not?

JSandusky

Is your game competitive? If it’s cooperative than you can just rely on the client like the Monster Hunter series has done for more than a decade in order to operate on poor latency devices (PS2, PSP, 3DS).

lebrewer

Yes, competitive. Although I’m not really worried about cheating, since this not likely have enough traction, and even if it does, it is supposed to be played among friends and not really building a community around it.

George1

There is a network prediction demo floating around in this new forum.

vmost

Where?
20characters…

George1

Search for “network prediction”

vmost

You said ‘in this new forum’. This discourse forum has been around over a year… I was seeking clarification not condescension.

George1

I understand. We just need to search for the correct keyword. The older forum has many other stuffs which might not being brought over to this one. It has been many years. By the way, I like the new front page from Wei Tjong. Nice modern looking.
Cheers.

Just a side note. There is an Urho3d archived, which contains some nice demo from previous guys.

There is a SceneReplication network demo that allows to change gear from Lumak. The demo in the current version needs to be updated with this feature.

Enhex

old & probably outdated of client side prediction, maybe one of the forks updated it:

Note that i don’t maintain it anymore, so you’re better off forking instead of making PRs.