Line portal sometimes flashes players back
Moderator: GZDoom Developers
Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
-
- Posts: 34
- Joined: Mon May 01, 2017 1:33 pm
Line portal sometimes flashes players back
Sometimes, when traversing a line portal, what appears to be your own back flashes on the screen.
The WAD from viewtopic.php?f=57&t=56393 can be used to test this:
- Find the "infinite hallway"
- Run through it
- At some point, it might happen
Sorry, but this bug is hard to reproduce.
The WAD from viewtopic.php?f=57&t=56393 can be used to test this:
- Find the "infinite hallway"
- Run through it
- At some point, it might happen
Sorry, but this bug is hard to reproduce.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Line portal sometimes flashes players back
I've tried to fix this but some variation always seems to come back...
Re: Line portal sometimes flashes players back
If I had to take a wild guess, then I believe it has something to do with interpolation - such that interpolation is not fully catching the player as they traverse through a portal, so their copy is renderered on the other side while the camera is left behind, so the camera does not know not to render it.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Line portal sometimes flashes players back
Yes, it is interpolation. The problem here is that there is no foolproof catch-all for determining if the player is supposed to be rendered, because it can actually be visible if the portal links back to the same area.
-
- Posts: 34
- Joined: Mon May 01, 2017 1:33 pm
Re: Line portal sometimes flashes players back
I noticed that, very rarely, it will show a different kind of interpolation bug. I had it happen (again, super rare, so it didn't bother me) in my custom IWAD that doesnt even have player sprites (yet).
EDIT: I should say that the flashing image looked a little bit like noclipping out of the level. I think.
However, today, I was bored, and so was a friend of mine. So we fired said custom IWAD up in Multiplayer (directly over the Interwebs, no VPN or anything. Just port forwarding and host/join parameters). It ran perfectly fine, no stuttering, lag or anything like that. But the flash occured almost always (unless interpolation was turned off)
Bla, bla,bla
tl;dr: Portal Interpolation needs more fixing.
EDIT: I should say that the flashing image looked a little bit like noclipping out of the level. I think.
However, today, I was bored, and so was a friend of mine. So we fired said custom IWAD up in Multiplayer (directly over the Interwebs, no VPN or anything. Just port forwarding and host/join parameters). It ran perfectly fine, no stuttering, lag or anything like that. But the flash occured almost always (unless interpolation was turned off)
Bla, bla,bla
tl;dr: Portal Interpolation needs more fixing.
Re: Line portal sometimes flashes players back
There is a hacky mapping solution to this. Create a linedef a foot in front of the portal that executes the following script:
Then have one on the backside of the portal that runs this one:
Basically this makes the player sprite invisible, so the bug doesn't render.
Code: Select all
{
SetActorProperty(0, APROP_RenderStyle, STYLE_Translucent);
SetActorProperty(0, APROP_Alpha, 0.0);
}
Code: Select all
{
SetActorProperty(0, APROP_RenderStyle, STYLE_Normal);
SetActorProperty(0, APROP_Alpha, 1.0);
}
Last edited by Bauul on Tue May 23, 2017 4:55 pm, edited 1 time in total.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Line portal sometimes flashes players back
That does not work.
Imagine the portal being visible through the portal like in an infinite corridor. You'll clearly see the player flashing out and back into existence.
Imagine the portal being visible through the portal like in an infinite corridor. You'll clearly see the player flashing out and back into existence.
Re: Line portal sometimes flashes players back
Edit: I'm an idiot, I was misreading your comment.Graf Zahl wrote:That does not work.
Imagine the portal being visible through the portal like in an infinite corridor. You'll clearly see the player flashing out and back into existence.
Yes that would be a problem if you're creating a setup where you're meant to be able to see yourself through a portal. But I imagine that's pretty rare outside of gimmick maps. In any situation where a portal is simply a method for traveling from A to B, and isn't used in a "hall of mirrors" type effect, it is valid (albeit hacky) solution.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49067
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Line portal sometimes flashes players back
I cannot replace one bug with another.
Re: Line portal sometimes flashes players back
Oooh my apologies, I didn't mean this is something that should be implemented into GZDoom, I meant it as something a mapper could implement into their own maps as a work around, using linedefs and a pair of custom ACS scripts.Graf Zahl wrote:I cannot replace one bug with another.
I certainly wasn't proposing it was hard-coded into the port!
I've edited my initial post to make that clearer.