space-wizards / space-station-14

A multiplayer game about paranoia and chaos on a space station. Remake of the cult-classic Space Station 13.
https://spacestation14.io
MIT License
2.53k stars 3.13k forks source link

Replay ghost does not always spawn on the station #29725

Closed VasilisThePikachu closed 1 month ago

VasilisThePikachu commented 2 months ago

Description

Possibly #17170 issue 2

Players should not spawn in the middle of no where on replays. And idk of any ways to tp to the actual station or someone so this makes replays really annoying to players to view.

This has been happening for a bit but only now did i get told of a reproducable replay

Reproduction

Reproducable replays https://moon.spacestation14.com/replays/salamander/2024/07/04/salamander-2024_07_04-17_41-round_58587.zip https://moon.spacestation14.com/replays/lizard/2024/07/07/lizard-2024_07_07-07_21-round_58823.zip https://moon.spacestation14.com/replays/lizard/2024/07/07/lizard-2024_07_07-06_38-round_58818.zip

IProduceWidgets commented 2 months ago

Is it Core by chance? I think Core still has the issue where the singularity eats the observer spawn / the tile its on.

VasilisThePikachu commented 2 months ago

Is it Core by chance? I think Core still has the issue where the singularity eats the observer spawn / the tile its on.

Don't think it's map dependant, I have also been told it was also happening on oesis from another player

VasilisThePikachu commented 1 month ago

Increasing priority, activity hurting player expirience of the replay system.

Djungelskog2 commented 1 month ago

oh thank you so much I was having trouble with this the other day

metalgearsloth commented 1 month ago

Increasing priority, activity hurting player expirience of the replay system.

The issue is vgroid was marked as a station grid and replays seem to pick a random one for people to use.

At any rate the vgroid is no longer a station grid.

Errant-4 commented 1 month ago

Increasing priority, activity hurting player expirience of the replay system.

The issue is vgroid was marked as a station grid and replays seem to pick a random one for people to use.

At any rate the vgroid is no longer a station grid.

The issue is still happening, here is an example from 2 days ago https://moon.spacestation14.com/replays/lizard/2024/07/19/lizard-2024_07_19-07_19-round_60042.zip

LankLTE commented 1 month ago

And here's an example from about an hour ago https://moon.spacestation14.com/replays/rain_one_one_gateway/2024/07/21/rain_one_one_gateway-2024_07_21-19_01-round_60257.zip

Errant-4 commented 1 month ago

Okay so I haven't fully cracked it (because I don't yet sufficiently understand a lot of what is happening earlier in this system), but I got a good look at the issue. The problem is this:

We get toReplaySpectatorSystem.Position.SetSpectatorPosition(). Every If check fails (I don't know if this is normal or not, this happens on both a "bad" spawn and a "good" spawn that I debugged), and then it goes into it's last chance to spawn: TryFindFallbackSpawn()

TryFindFallbackSpawn goes through all the mapgrids, gets an estimate for their size, and then picks the largest one. This was probably quite reliable before vgroids, but now the vgroid is sometimes the largest grid so it takes precedent over all but the largest maps. mapgridcomponent does not seem to have any obvious datafields to check if something is a station (I guess that's why size was used in the first place)

Errant-4 commented 1 month ago

We could put an IsStation datafield on mapgridcomponent but it would only really be reliable early in the round. That would be sufficient for replay purposes though. (I imagine with gridsplits down the round it would become dificult or infeasible to keep track of what grid is really a station and whats not)