Wall portals

Moderator: GZDoom Developers

User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49141
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Wall portals

Post by Graf Zahl »

I think I should post a short status update.

I have currently implemented handling for Eternity-style portals (i.e. those with no directional change and a fixed offset, both plane and line portals) so that actor collision checks through the portal are working. And without doing anything explicit about it, sliding along an actor on the other side of the portal worked right out of the box so my base concept of using offset functions throughout the play code seems to have paid off already.

I also implemented movement through sector portals - with interpolation remaining intact, of course you'll have to use GZDoom to see this in action - but with the right map this should even work with the limited sector portals in ZDoom.

Next step: Transition through wall portals plus interpolation. Once that is in I'll implement arbitrary portals as teleporters. Doing thorough checks for collision and movement is unfortunately not really doable without having a fixed universally retrievable displacement value, so these will inevitably be somewhat limited regarding game physics. I'm sure some things can be solved but they'll all require explicit coding wherever some handling is needed.
User avatar
Major Cooke
Posts: 8193
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: Wall portals

Post by Major Cooke »

Graf Zahl wrote:Next step: Transition through wall portals plus interpolation. Once that is in I'll implement arbitrary portals as teleporters. Doing thorough checks for collision and movement is unfortunately not really doable without having a fixed universally retrievable displacement value, so these will inevitably be somewhat limited regarding game physics. I'm sure some things can be solved but they'll all require explicit coding wherever some handling is needed.
So that may mean moving polyobject portals may be tossed out after all?
Gez
 
 
Posts: 17923
Joined: Fri Jul 06, 2007 3:22 pm

Re: Wall portals

Post by Gez »

Polyportals are explicitly covered by the "arbitrary portals" denomination, so yes they'll be possible even if they won't have all the niceties of fixed portals.
User avatar
Tormentor667
Posts: 13548
Joined: Wed Jul 16, 2003 3:52 am

Re: Wall portals

Post by Tormentor667 »

@Graf Zahl - I downloaded the latest build of GZDoom 2.2 right now (605-ge107d8f) and tried the new portals. It works visually but the teleporter doesn't seem to work at all. This is my line setup in GZDB:
Image
The lines have the ids 500 and 501 (and the exit is 501 and 500). I can perfectly view through them but not walk through them which is a bit odd. Is the code not finished yet or am I doing something wrong?
User avatar
Shadow Hog
Posts: 173
Joined: Fri Aug 14, 2015 8:56 pm

Re: Wall portals

Post by Shadow Hog »

You have to use the Special on two-sided lines and add a buffer sector behind the portal. (In Eternity you had to alter the lighting of the buffer sector to avoid rendering bugs; no idea of ZDoom has a similar restriction.)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49141
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Wall portals

Post by Graf Zahl »

Line portals are not done yet so of course they do not teleport. Did I say anything different?
And yes, they need to be two-sided - at least the linked portal type.

And overall, the feature is not yet ready for use.
User avatar
Tormentor667
Posts: 13548
Joined: Wed Jul 16, 2003 3:52 am

Re: Wall portals

Post by Tormentor667 »

Thanks for the explanation :) I am just a bit impatient
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49141
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Wall portals

Post by Graf Zahl »

As always... :mrgreen:

Sorry, line portals are not that easy because unlike sector portals there isn't just a coordinate to check against whether it got passed.
User avatar
Tormentor667
Posts: 13548
Joined: Wed Jul 16, 2003 3:52 am

Re: Wall portals

Post by Tormentor667 »

I just spot a lot of places where I can take advantage of these to make my mapper's life easier.

It's just fine, I am sure you will get that sorted out and in the meantime, I will just wait for that - even if it's hard ;)
User avatar
ZZYZX
 
 
Posts: 1384
Joined: Sun Oct 14, 2012 1:43 am
Location: Ukraine

Re: Wall portals

Post by ZZYZX »

Shadow Hog wrote:You have to use the Special on two-sided lines and add a buffer sector behind the portal. (In Eternity you had to alter the lighting of the buffer sector to avoid rendering bugs; no idea of ZDoom has a similar restriction.)
You had to alter ANY of the buffer sector properties, the point here is that with 2-sided lines, if both sectors of an invisible line have equal properties, the engine wouldnt even try to draw it.
Not sure if Graf retained my explicit check for portal 2-sided lines.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49141
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Wall portals

Post by Graf Zahl »

I haven't touched any of the renderer-side code and I do not plan to. I'm far too busy anyway with the playsim side - I hope I get portal transitions finished this weekend - but after that the real fun will start with adjusting the FPathTraverse class, sight check and aiming code.
User avatar
Major Cooke
Posts: 8193
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: Wall portals

Post by Major Cooke »

I somehow get the feeling handling A_Warp is going to be painful. Especially actors with +NOINTERACTION and the likes...
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49141
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Wall portals

Post by Graf Zahl »

That's why I took some effort to wrap all offset calculations info functions like Vec3Offset, so that this stuff can be reduced to a handful of places.
Actually, the biggest headache in the game code were the interpolation options in A_Warp, but I hope I got that resolved now.

That entire coordinate refactoring from January was all preparation for portals.
User avatar
Tormentor667
Posts: 13548
Joined: Wed Jul 16, 2003 3:52 am

Re: Wall portals

Post by Tormentor667 »

No idea what you are talking about, but it sounds lik pain - pretty happy that I am not a programmer now:P
User avatar
printz
Posts: 2648
Joined: Thu Oct 26, 2006 12:08 pm
Location: Bucharest, Romania

Re: Wall portals

Post by printz »

Shadow Hog wrote:You have to use the Special on two-sided lines and add a buffer sector behind the portal. (In Eternity you had to alter the lighting of the buffer sector to avoid rendering bugs; no idea of ZDoom has a similar restriction.)
That was merely a developer mistake in Eternity where he forgot to add a check in an "if" test, due to duplicated code.

Return to “Closed Feature Suggestions [GZDoom]”