Wall portals
Moderator: GZDoom Developers
-
- Lead GZDoom+Raze Developer
- Posts: 49141
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Wall portals
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.
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.
-
- Posts: 8193
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: Wall portals
So that may mean moving polyobject portals may be tossed out after all?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.
-
-
- Posts: 17923
- Joined: Fri Jul 06, 2007 3:22 pm
Re: Wall portals
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.
-
- Posts: 13548
- Joined: Wed Jul 16, 2003 3:52 am
Re: Wall portals
@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:
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?
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?
-
- Posts: 173
- Joined: Fri Aug 14, 2015 8:56 pm
Re: Wall portals
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.)
-
- Lead GZDoom+Raze Developer
- Posts: 49141
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Wall portals
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.
And yes, they need to be two-sided - at least the linked portal type.
And overall, the feature is not yet ready for use.
-
- Posts: 13548
- Joined: Wed Jul 16, 2003 3:52 am
Re: Wall portals
Thanks for the explanation I am just a bit impatient
-
- Lead GZDoom+Raze Developer
- Posts: 49141
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Wall portals
As always...
Sorry, line portals are not that easy because unlike sector portals there isn't just a coordinate to check against whether it got passed.
Sorry, line portals are not that easy because unlike sector portals there isn't just a coordinate to check against whether it got passed.
-
- Posts: 13548
- Joined: Wed Jul 16, 2003 3:52 am
Re: Wall portals
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
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
-
-
- Posts: 1384
- Joined: Sun Oct 14, 2012 1:43 am
- Location: Ukraine
Re: Wall portals
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.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.)
Not sure if Graf retained my explicit check for portal 2-sided lines.
-
- Lead GZDoom+Raze Developer
- Posts: 49141
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Wall portals
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.
-
- Posts: 8193
- Joined: Sun Jan 28, 2007 3:55 pm
- Preferred Pronouns: He/Him
- Location: QZDoom Maintenance Team
Re: Wall portals
I somehow get the feeling handling A_Warp is going to be painful. Especially actors with +NOINTERACTION and the likes...
-
- Lead GZDoom+Raze Developer
- Posts: 49141
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: Wall portals
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.
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.
-
- Posts: 13548
- Joined: Wed Jul 16, 2003 3:52 am
Re: Wall portals
No idea what you are talking about, but it sounds lik pain - pretty happy that I am not a programmer now:P
-
- Posts: 2648
- Joined: Thu Oct 26, 2006 12:08 pm
- Location: Bucharest, Romania
Re: Wall portals
That was merely a developer mistake in Eternity where he forgot to add a check in an "if" test, due to duplicated code.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.)