Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issue Report]: Map reveal/monster activation bug #7745

Closed
Firnblut opened this issue Feb 10, 2025 · 7 comments · Fixed by #7755
Closed

[Issue Report]: Map reveal/monster activation bug #7745

Firnblut opened this issue Feb 10, 2025 · 7 comments · Fixed by #7755

Comments

@Firnblut
Copy link

Operating System

Windows x64

DevilutionX version

1.5.3

Describe

This is, to my knowledge, a bug only occuring when multiple players are involved:

Upon entering a new dungeon floor, some area of the minimap is revealed to players entering the floor after the first player, despite nobody every being there. Monsters in this area are activated, which can lead to huge ambushes.

To Reproduce

  1. Be in the dungeon with at least 2 characters.
  2. Descend to the next dungeon floor with both characters. I'm not 100% sure, but I suspect it happens when descending in quick succession, probably when player B descends while player A is still in loading screen.
  3. You'll see the revealed area on your minimap in red (as if another player had been there.

I haven't been able to reliably reproduce it, but going down in quick succession worked most of the time.

Image
Screenshot from player Bs persective.

Image
Screenshot from player As perspective.

Expected Behavior

The minimap should only be revealed where you have already been and (more important) monsters shouldn't get activated without being in your lightradius

Additional context

No response

@julealgon
Copy link
Contributor

Interesting..... it's as if it is picking the wrong stairs to spawn the player in, then maybe it teleports the player to the correct one?

@kphoenix137
Copy link
Collaborator

Interesting..... it's as if it is picking the wrong stairs to spawn the player in, then maybe it teleports the player to the correct one?

It's probably updating the other player's position a bit too late so vision is performed locally by player 1 on behalf of player 2 while player 2 is entering the level of player 1

@Firnblut
Copy link
Author

It has nothing to do with the other stairs. They are just random in the revealed area.

Yeah, it‘s probably an issue with updating players‘ position during loading screens.

@kphoenix137
Copy link
Collaborator

kphoenix137 commented Feb 10, 2025

It has nothing to do with the other stairs. They are just random in the revealed area.

Yeah, it‘s probably an issue with updating players‘ position during loading

Vanilla has an issue where teleporting during the fade in would teleport you to a coordinate position close to the coordinate position you were in the previous level so I wouldn't be surprised if a similar problem was happening here

@Firnblut
Copy link
Author

As far as I know that‘s because a player will enter the floor at the same position they left the previous floor and are then correctly positioned once loading is done.
If you cast teleport during the fade in, it takes priority over the reposition the game would‘ve done. I think you fixed the teleport bug in DevX, but the underlying mechanics are probably unchanged and can lead to this issue when multiple players are involved.

@kphoenix137
Copy link
Collaborator

As far as I know that‘s because a player will enter the floor at the same position they left the previous floor and are then correctly positioned once loading is done. If you cast teleport during the fade in, it takes priority over the reposition the game would‘ve done. I think you fixed the teleport bug in DevX, but the underlying mechanics are probably unchanged and can lead to this issue when multiple players are involved.

It's a bit absurd because vision doesn't get activated for a player entering the level until the position is updated, apparently from what I looked at. I think it's going to be hard to solve this without debugging an actual instance of this happening in game, seems like the result of some kind of weird desync.

@Firnblut
Copy link
Author

Firnblut commented Feb 12, 2025

You can replicate this easy:
Start a tcp game with char A, launch the game a second time and join yourself with char B. Go into the dungeon, descend the stairs to the next floor in quick succession.

Worked like 8/10 times in my tests. Obviusly easier when having two windowed games next to each other on your screen than alt-tabbing to switch between them.

I don't think I'm gonna be able to get debugging running, else I would do it myself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants