kraflab / dsda-doom

This is a successor of prboom+ with extra tooling for demo recording and playback, with a focus on speedrunning and quality of life.
342 stars 87 forks source link

Add a new thinker thread for teleports #514

Closed MarkJeronimus closed 3 weeks ago

MarkJeronimus commented 1 month ago

This fixes the extreme lag in Oversaturation when thousands of zombies try to teleport in, and the th_misc class thinker list is around 60000 elements long.

Bofu correctrly voices his concern about desyncs. I think, if the teleport destinations in the list can be guaranteed to be in the same order, there should be no desyncs.

kraflab commented 1 month ago

I don't think this is a safe change - not because of the order of the teleporter list, but because they aren't in the old list anymore. Couldn't you potentially give the teleport destination monster properties with dehacked? You can also give it more physical properties in udmf that might matter. Rather than changing the core thinker list, I would suggest maintaining a separate teleporter list (probably in p_telept, exposed by stuff like P_RegisterTeleportDestination).

MarkJeronimus commented 1 month ago

It doesn't desync on this monstrous demo, so I think we're safe. https://www.doomworld.com/forum/post/2459281

MarkJeronimus commented 1 month ago

Lol I didn't even see your reply even when I replied. Yeah, that could be a problem in maps that use more exotic stuff if there's a need for teleport destinations in the main list. You're free to rewrite this as you see fit. For Oversaturation, Vytaan is happy using it as we speak, even if it's a one-off build.

kraflab commented 3 weeks ago

Closing this PR but anyone who wants to take the alternate approach can create a new one in the future.