Line portal sometimes flashes players back

Bugs that have been investigated and resolved somehow.

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.
Post Reply
Wuerfel_21
Posts: 34
Joined: Mon May 01, 2017 1:33 pm

Line portal sometimes flashes players back

Post by Wuerfel_21 »

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.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Line portal sometimes flashes players back

Post by Graf Zahl »

I've tried to fix this but some variation always seems to come back... :?
User avatar
Rachael
Posts: 13531
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Line portal sometimes flashes players back

Post by Rachael »

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.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Line portal sometimes flashes players back

Post by Graf Zahl »

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.
Wuerfel_21
Posts: 34
Joined: Mon May 01, 2017 1:33 pm

Re: Line portal sometimes flashes players back

Post by Wuerfel_21 »

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.
Bauul
Posts: 78
Joined: Mon Aug 29, 2016 4:23 pm

Re: Line portal sometimes flashes players back

Post by Bauul »

There is a hacky mapping solution to this. Create a linedef a foot in front of the portal that executes the following script:

Code: Select all

{
    SetActorProperty(0, APROP_RenderStyle, STYLE_Translucent);
	SetActorProperty(0, APROP_Alpha, 0.0);
}
Then have one on the backside of the portal that runs this one:

Code: Select all

{
    SetActorProperty(0, APROP_RenderStyle, STYLE_Normal);
	SetActorProperty(0, APROP_Alpha, 1.0);
}
Basically this makes the player sprite invisible, so the bug doesn't render.
Last edited by Bauul on Tue May 23, 2017 4:55 pm, edited 1 time in total.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Line portal sometimes flashes players back

Post by Graf Zahl »

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.
Bauul
Posts: 78
Joined: Mon Aug 29, 2016 4:23 pm

Re: Line portal sometimes flashes players back

Post by Bauul »

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.
Edit: I'm an idiot, I was misreading your comment.

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.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Line portal sometimes flashes players back

Post by Graf Zahl »

I cannot replace one bug with another.
Bauul
Posts: 78
Joined: Mon Aug 29, 2016 4:23 pm

Re: Line portal sometimes flashes players back

Post by Bauul »

Graf Zahl wrote:I cannot replace one bug with another.
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.

I certainly wasn't proposing it was hard-coded into the port!

I've edited my initial post to make that clearer.
Post Reply

Return to “Closed Bugs [GZDoom]”