FakeFishGames / Barotrauma

A 2D online multiplayer game taking place in a submarine travelling through the icy depths of Jupiter's moon Europa.
http://www.barotraumagame.com/
1.77k stars 409 forks source link

Rethink character freezing logic #904

Closed Regalis11 closed 4 years ago

Regalis11 commented 6 years ago

The way the server freezes characters when there's no inputs available from the client causes a bunch of problems and needs some improvements:

juanjp600 commented 6 years ago

Perhaps the server should make predictions of the players' movement instead? If the prediction turns out to be inaccurate then we could rewind the predicted movement (obviously with a certain limit so it's not super exploitable) and recalculate the resulting position, without ever disabling the collider.

We should also look into adding in some lag compensation so weapons used by laggy clients take into account past positions of the targets, I've been getting reports of enemies being impossible to hit.

rico6822 commented 6 years ago

What about making characters freeze every time they're ragdoll speed is low enough and unfreeze once it goes above it?

Regalis11 commented 5 years ago

I believe the "flying by spamming the ragdoll button" issue is also cause by this.

Rokvach commented 5 years ago

With the upcoming improvements and improvements already implemented I don't see the point of keeping this issue open. Closing.

Regalis11 commented 5 years ago

None of the issues have been addressed by the upcoming changes, I think this should still be kept open

Rokvach commented 5 years ago

@Regalis11 Is this still an issue with the newer changes?

Regalis11 commented 5 years ago

Yes, we haven't done address these issues

Regalis11 commented 4 years ago

Clients can stop their character in place at will (which could easily be abused to prevent impact/fall damage).

Since physics are completely disabled on the collider, it can move through walls. A frozen character outside the sub can teleport itself inside if a sub moves through it.

These 2 issues should be fixed by https://github.com/Regalis11/Barotrauma-development/commit/886a5474d2ebe37695e897d7dacac2f202374b56.

I'd consider this fixed: the current behavior is not perfect but the remaining issues are so minor I don't think reworking the character syncing logic just to fix them is worth it.

Rokvach commented 4 years ago

Couldn't find any issues with this, closing.