Why doesn't AI recognize interactive wall portals?

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.
Locked
User avatar
Fishytza
Posts: 781
Joined: Wed Feb 23, 2011 11:04 am
Preferred Pronouns: No Preference
Contact:

Why doesn't AI recognize interactive wall portals?

Post by Fishytza »

Note: I don't consider this a bug, otherwise I would have made a report on mantis.

I know AI/monsters can use static (Eternity) portals, but those are rather a pain to setup for what I'm planning and are less flexible. (Also, [wiki]Line_SetPortalTarget[/wiki] doesn't affect them.)

I'm just curious what are the technical reasons why the more flexible interactive wall portals are "invisible" to monsters and why you can't hear anything on the other side?

EDIT: Test map removed.
Last edited by Fishytza on Thu Mar 16, 2017 12:50 pm, edited 1 time in total.
User avatar
Rachael
Posts: 13532
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: Why doesn't AI recognize interactive wall portals?

Post by Rachael »

Interactive portals are more illusory than static portals. The reason why static portals work is because they link everything together - they try to tie together information from both ends of the portal and essentially make the scene truly seamless - interactive portals are nothing more than a visual window to the other side that just happens to let objects pass through.
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: Why doesn't AI recognize interactive wall portals?

Post by Graf Zahl »

The reason is that the AI needs a fixed offset between two regions to handle it - when making calculations it just adds that offset to the coordinates.
Fixed offset means that all paths leading from section A to section B add up to the same displacement. If you have different displacements along different paths the AI cannot determine which one to choose.
User avatar
Fishytza
Posts: 781
Joined: Wed Feb 23, 2011 11:04 am
Preferred Pronouns: No Preference
Contact:

Re: Why doesn't AI recognize interactive wall portals?

Post by Fishytza »

Thanks for answering so quickly. :)
User avatar
Trusty McLegit
Posts: 264
Joined: Sun Feb 07, 2016 8:42 pm

Re: Why doesn't AI recognize interactive wall portals?

Post by Trusty McLegit »

So, what's the difference between visual portals and interactive portals?
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: Why doesn't AI recognize interactive wall portals?

Post by Graf Zahl »

Visual portals are just visual, they cannot be crossed.
User avatar
Trusty McLegit
Posts: 264
Joined: Sun Feb 07, 2016 8:42 pm

Re: Why doesn't AI recognize interactive wall portals?

Post by Trusty McLegit »

Sorry, I meant "Visual + simple teleporter"
Accensus
Posts: 2383
Joined: Thu Feb 11, 2016 9:59 am

Re: Why doesn't AI recognize interactive wall portals?

Post by Accensus »

Sound doesn't travel through a visual/simple portal, for starters.
User avatar
Trusty McLegit
Posts: 264
Joined: Sun Feb 07, 2016 8:42 pm

Re: Why doesn't AI recognize interactive wall portals?

Post by Trusty McLegit »

Sound doesn't travel through interactive portals either
User avatar
Fishytza
Posts: 781
Joined: Wed Feb 23, 2011 11:04 am
Preferred Pronouns: No Preference
Contact:

Re: Why doesn't AI recognize interactive wall portals?

Post by Fishytza »

As far as you, the player, are concerned, you can't hear anything on the other side of a interactive portal (I assume it's the same for visual and visual + simple teleport). Monsters on the other hand can 'hear' you. Meaning if you shoot your gun any monster on the other side of a interactive portal will wake up.

With static portals, you can hear actor-played sounds (monster chatter, fireballs being thrown etc) but sector-played sounds
(eg. a floor lowering) won't be heard, for some odd reason.
User avatar
Trusty McLegit
Posts: 264
Joined: Sun Feb 07, 2016 8:42 pm

Re: Why doesn't AI recognize interactive wall portals?

Post by Trusty McLegit »

Awesome, thanks for the explanation!
Locked

Return to “Editing (Archive)”