Question about simulating unacknowledged moves on a more complex scenario

I was wondering how would this issue should better be tackled when there are moving elements on the server that affect the player movement.

For example, if there is a moving platform players can use to ride on top of it, when we try to simulate the unacknowledged input, we could run into issues, like the platform not being there from the point we start simulating from.
For the simulation to work properly, we should also have the information of the moving platform. Should the information of these elements be stored with the unacknowledged input? All moving elements? Only close ones? Even only those that affect the movement at that point?
Only the elements who affected our movement seems like the best solution, but if the server corrected the position of a platform that was not affecting us (and therefore, we didn’t store its information with the unacknowledged inputs) comes into contact with us at that point of the simulation, we would not be able to simulate the movement properly.

It could be just considered a one off glitch, but those are just some issue on top of my head, and I bet most multiplayer games had to deal with this kind of scenarios. So any suggestion on how to deal with these cases or any article that would explain the issue with more detail?

Thanks a lot, amazing course!

Good thinking about moving objects in the environment.

One approach might be to consider having a global rollback system. You might need something like this on the server if you are doing an FPS for sniping. This could solve your problem on the client by rolling back the position of all objects in the scene. You might want to only store or roll back “relevant” objects as an optimisation. You might be able to hook into the Unreal relevancy system for this.

The other approach would be to store information about the objects that are directly affecting the player movement. This is the approach that I think is used in the Unreal Character Movemement Component. They store that a character is on a surface and fix the position relative to that surface. We say this as a glitch in the first section when we didn’t update the platform on client and server. The result was that one character moved on the platform while the other stayed put. This was because the character wasn’t moving relative to the surface it was on but the two different machines had a differing opinion on whether or not the surface was moving.

Sorry, more options rather than solutions :wink:

Privacy & Terms