Portal example gallery

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Portal example gallery

Post by Graf Zahl »

A section is a group of connected sectors. As a very sinple example of what 'section' means take MAP30 of Doom2.wad. It contains of two sections: the starting area and the main area with the boss shooter.
User avatar
Trusty McLegit
Posts: 264
Joined: Sun Feb 07, 2016 8:42 pm

Re: Portal example gallery

Post by Trusty McLegit »

But what are the offsets? It looks like the coordinates for vertices but you only offer one set per portal (which I assume to be a linedef)?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Portal example gallery

Post by Graf Zahl »

The coordinate difference between the connecting portal lines.
User avatar
Jaxxoon R
Posts: 772
Joined: Sun May 04, 2014 7:22 pm

Re: Portal example gallery

Post by Jaxxoon R »

Graf Zahl wrote:Say, you have 4 portals (sector or static line portals) in your map, containing 4 sections:

Portal 1 from section 1 to section 2 has an offset of 500, 600
Portal 2 from section 2 to section 3 has an offset of 500, 400
Portal 3 from section 1 to section 4 has an offset of -500, -500
So if you connect section 4 with section 3 you'll need an offset of 1500, 1500, so that across both paths the offset from section 1 to section 3 is 1000, 1000.
This is a vital property of static portals, without it they cannot work properly.
Could you word that in a way that isn't math homework?
Gez
 
 
Posts: 17835
Joined: Fri Jul 06, 2007 3:22 pm

Re: Portal example gallery

Post by Gez »

Let's suppose two L shaped rooms, with two portals connecting them. Let's make it really simple by having the portals moving only in a single axis, so I can talk in "distance" instead of the more generally proper "vector".

Image

On the top example, with the mirrored Ls, the red portals cannot be static because as you notice, the distance between two points in different rooms depends on which portal you take.

On the bottom example, with the translated Ls, the green portals can be static because the distance covered by both portals are the same.

Now you can add in a third room if you want, it'll make the examples more complicated but the rule is the same. The distance between the rooms must be consistent regardless of which portal is used.

As a result, if you have only one portal between two areas, then there's no consistency headache.
User avatar
Nash
 
 
Posts: 17439
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Portal example gallery

Post by Nash »

So basically, as long as the amount of "grids" (like the 64x64 grid in GZDoom Builder) remains consistent, static portals with sound are good?
User avatar
Trusty McLegit
Posts: 264
Joined: Sun Feb 07, 2016 8:42 pm

Re: Portal example gallery

Post by Trusty McLegit »

I can't really tell what's happening in that diagram... Is it meant to me like this:
Spoiler:
or like this:
Spoiler:
Also, according to what I think I've learned from this thread, this test wad should work. What did I do wrong?
Attachments
Static Test.wad
(10.35 KiB) Downloaded 93 times
User avatar
merlin86
Posts: 131
Joined: Tue Jan 29, 2008 4:02 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11 Pro
Graphics Processor: nVidia with Vulkan support
Contact:

Re: Portal example gallery

Post by merlin86 »

Seems pretty interesting stuff (like infinity.wad and elevator_3.wad)
PS: all the test maps show this on GZdoom console:

Warning: z-offsetting not allowed for interactive portals. Changing line 65 to teleport-portal!

I suppose this function is highly experimental...
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Portal example gallery

Post by Graf Zahl »

What's experimental about it? It tells you in clear words that the portal type you are trying to use does not work for the portal you define. Interactive portals allow spawn offsetting but due to how that works it cannot be done when z is different on both sides of the portal.
User avatar
Jaxxoon R
Posts: 772
Joined: Sun May 04, 2014 7:22 pm

Re: Portal example gallery

Post by Jaxxoon R »

Image
Then why doesn't this work even if both sectors are exactly identical?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Portal example gallery

Post by Graf Zahl »

Hard to tell without the map...
User avatar
Jaxxoon R
Posts: 772
Joined: Sun May 04, 2014 7:22 pm

Re: Portal example gallery

Post by Jaxxoon R »

If you insist.
Attachments
Interactive.wad
(3.57 KiB) Downloaded 101 times
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Portal example gallery

Post by Graf Zahl »

Looks like some checking code got lost. Fixed.
User avatar
Trusty McLegit
Posts: 264
Joined: Sun Feb 07, 2016 8:42 pm

Re: Portal example gallery

Post by Trusty McLegit »

So, I *think* I get what I'm supposed to do for a static portal, and there's no errors in the console, but sound still isn't working. What am I doing wrong?
Attachments
Static_Test.wad
(8.33 KiB) Downloaded 100 times
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49067
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Portal example gallery

Post by Graf Zahl »

Looks ok. But there may still be bugs in the sound code. It hasn't been thoroughly tested yet.
Locked

Return to “Editing (Archive)”