[Added] Wall portals

Moderator: GZDoom Developers

Re: Wall portals

Postby Graf Zahl » Tue Feb 23, 2016 6:29 pm

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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Wall portals

Postby Major Cooke » Tue Feb 23, 2016 6:34 pm

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?
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Re: Wall portals

Postby Gez » Tue Feb 23, 2016 6:38 pm

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.
Gez
 
 
 
Joined: 06 Jul 2007

Re: Wall portals

Postby Tormentor667 » Wed Feb 24, 2016 11:51 am

@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
Tormentor667
needs more detail
 
Joined: 16 Jul 2003
Location: Germany

Re: Wall portals

Postby Shadow Hog » Wed Feb 24, 2016 11:58 am

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
Shadow Hog
Avatar by Jon Davies (Twitter: @SovanJedi)
 
Joined: 14 Aug 2015

Re: Wall portals

Postby Graf Zahl » Wed Feb 24, 2016 12:03 pm

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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Wall portals

Postby Tormentor667 » Wed Feb 24, 2016 12:38 pm

Thanks for the explanation :) I am just a bit impatient
User avatar
Tormentor667
needs more detail
 
Joined: 16 Jul 2003
Location: Germany

Re: Wall portals

Postby Graf Zahl » Wed Feb 24, 2016 1:02 pm

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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Wall portals

Postby Tormentor667 » Wed Feb 24, 2016 3:19 pm

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
Tormentor667
needs more detail
 
Joined: 16 Jul 2003
Location: Germany

Re: Wall portals

Postby ZZYZX » Thu Feb 25, 2016 3:14 pm

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
ZZYZX
le chat du rabbin
 
 
 
Joined: 14 Oct 2012
Location: Ukraine
Discord: ZZYZX#1394
Github ID: jewalky

Re: Wall portals

Postby Graf Zahl » Thu Feb 25, 2016 3:41 pm

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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Wall portals

Postby Major Cooke » Thu Feb 25, 2016 5:58 pm

I somehow get the feeling handling A_Warp is going to be painful. Especially actors with +NOINTERACTION and the likes...
User avatar
Major Cooke
QZDoom Maintenance Team
 
Joined: 28 Jan 2007

Re: Wall portals

Postby Graf Zahl » Thu Feb 25, 2016 6:07 pm

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
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Wall portals

Postby Tormentor667 » Fri Feb 26, 2016 6:05 am

No idea what you are talking about, but it sounds lik pain - pretty happy that I am not a programmer now:P
User avatar
Tormentor667
needs more detail
 
Joined: 16 Jul 2003
Location: Germany

Re: Wall portals

Postby printz » Fri Feb 26, 2016 9:40 am

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.
User avatar
printz
Eternity, Eureka and AutoDoom programmer
 
Joined: 26 Oct 2006
Location: Bucharest, Romania
Github ID: ioan-chera
Operating System: Windows 10/8.1/8/201x 64-bit

PreviousNext

Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests