Is it possible to have client prediction without resimulation?

Started by
11 comments, last by hplus0603 1 year, 7 months ago

hplus0603 said:
You kind of get to pick any two :-) Server authoritative, Client predicted, No resimulation.

Very probably. But I haven't given up yet :D

hplus0603 said:
In case the client is accelerating, braking, or turning, then this won't give you a perfect correction.

I think if the prediction is accurate it should be close (unless there's a lot of RTT jitter), and I can blend the corrections on the visuals (not the simulation though). But I've stopped trying to speculate and I'm just building the system to test it lol.

hplus0603 said:
There's also still the problem that you have to re-simulate at least one step, because the predicted correction position might be inside a wall or something.

Yeah it might be. I'm ok with that so long as it shortly fixes itself. There's some potential for ending up outside the world and then being permanently stuck there but I have some theories as to how I can handle that situation easily.

hplus0603 said:
One option is to decide on this position, then sweep the players collision proxy along a line segment made up by current/predicted positions, and then stop the closest you can get.

Great suggestion! This might work on low ping but I suspect it might be unreliable on high ping (since the player could be a long way ahead of the server). However it's a really good idea (which I think I vaguely had in the back of my mind, but hadn't really thought about) and I'll definitely test it (since it should stop the player ending up outside the world). Thanks!

I will of course report my findings and describe my final setup here. I also might post my stripped-down project as a reference framework on Github if it works well. I might learn something when people tell me I'm doing things the wrong way lol.

Man, I haven't been active on any game development forums for years. I forgot how nice it is to just discuss things with smart people.

None

Advertisement

Clonkex said:
since the player could be a long way ahead of the server

Yeah, there needs to be some amount of distance that you just don't interpolate, but instead “snap” to.

Clonkex said:
I will of course report my findings

Please do! We look forward to it.

enum Bool { True, False, FileNotFound };

This topic is closed to new replies.

Advertisement