Teleporting ai, it works. - by Flux
Flux on 28/7/2008 at 10:39
Quote:
That was the plan, AI just needs a different script, but operating the same way and using the same sets of teleports as player. Not sure how their pathfinding/thief chasing system would behave, though, in face of such a drastic change of the environment
Following Judith's suggestion...Well, it works!!!:D
I teleported the player and added simple trick like sending a trigger message to make sure the ai is teleported too and he follows the player. Furthermore, he keeps chasing me in the destination that we're both teleported.
I can post the scripts if needed, nothing complex.
Since this might open a few interesting possibilities, I want to discuss;
1) Should the ai in a mansion chase the player back to streets? Is that logical? You know, if a private guard is supposed to guard the house and the thief escapes, he should stay put in the house to guard the house.
2) The cityguard in the streets should follow the player if he breaks into a house, for that I first tried volumes but on some occasions the guard stepped into volume before me, so he vanished.:p To prevent that, I used send trigger message. Like, the player frobs the doors, he's teleported into the house, the moment he's teleported, trigger message tells the ai to teleport to the same location as well. He keeps chasing the player, which is good.
Any other suggestions how we can implement this to improve gameplay? Any obstacles that I'm not seeing at the moment?
massimilianogoi on 28/7/2008 at 12:30
Quote Posted by Flux
Following Judith's suggestion...Well, it works!!!:D
I teleported the player and added simple trick like sending a trigger message to make sure the ai is teleported too and he follows the player. Furthermore, he keeps chasing me in the destination that we're both teleported.
ROTFL
Quote Posted by Flux
I can post the scripts if needed, nothing complex.
Since this might open a few interesting possibilities, I want to discuss;
1) Should the ai in a mansion chase the player back to streets? Is that logical? You know, if a private guard is supposed to guard the house and the thief escapes, he should stay put in the house to guard the house.
But of course!! If you see a thief that robbed something in your home, you not follow him in the streets? (possibly with a gun) :p I think it should be ok, if at least some other guards remains ALIVE in the mansion.
Quote Posted by Flux
2) The cityguard in the streets should follow the player if he breaks into a house, for that I first tried volumes but on some occasions the guard stepped into volume before me, so he vanished.:p To prevent that, I used send trigger message. Like, the player frobs the doors, he's teleported into the house, the moment he's teleported, trigger message tells the ai to teleport to the same location as well. He keeps chasing the player, which is good.
Hummm... Violation of private property??
I think in this case the cops returns to their station to call enforcments (and of course to tell the judge for emending a search warrant).
Beleg Cúthalion on 28/7/2008 at 13:11
So there IS a delay? That imho doesn't help to fake big levels at all. :erg: Plus, what about noise maker arrows etc.? Until you have secluded the area so far that every near person will be teleported and everything surely works the zone portals will long have taken over the performance issue. At least if you really want this to increase level size without a loss of performance. :erg:
Judith on 28/7/2008 at 13:24
So what? It's for the fade in/out effect only, to make the transition smoother. It the same as in Morrowind/Oblivion, but without any loading.
And it does work for the performance improvement, as it connects compeltely sealed off areas - the engine renders only what you see, nothing beyond that area. It is more reliable than zone portals, which depend on the viewing angle.
Flux on 28/7/2008 at 13:44
Well, it does work for performance related issues, much more than zoning thing. Imagine full-lit street where every house is enterable, all interiors are well-lit.
In my script there is no delay, the moment player frobs the door both ai and player is transported. It's up to the designer. How close the ai should be to the player after teleporting is again designer can decide. I don't think these two player points should share the exact same space. The ai is using the same script, instead of teleport player, it's "teleport linked objects." (The ai is considered as object luckily.)
However, what would happen to the ai after he's teleported into streets and player manages to escape and ai gives up after several minutes of searching? It might involve some other complex script to make sure he'll walk to the teleporter/door where he came from, step in and be teleported back to the house.
Again, It will be all about balance/design choices. I will plan to use it in small houses, maybe in poorer areas where the residents are just npc and they don't have money to hire private guards. They will just run out to the streets when they see the player.
Beleg Cúthalion on 28/7/2008 at 13:54
Well, if you said we're going to have a really large map which eats performance in some areas although one cannot see much and then we will make teleport traps to connect the chopped pieces with which it will run much faster, that'd be fine (and this is what I thought you guys were up to over (
http://www.ttlg.com/forums/showthread.php?t=94149&page=38) here). This way we would be faking some kind of intelligent renderer which drops things that aren't needed. But if you want to make it idiot-proof (make sure all "necessary" guards get teleported, patrols work and a couple of other things) you imho have to seclude every teleport trap so heavily that meanwhile T3Ed/Flesh will have made this particular area quite easy-going anyway.
My assumption behind is that – even if you trigger these things with frobbable doors and not with the invisible cuts I'd use for the above mentioned example – you would have a camera angle from which you would look from one part into the other (when the chasing guard opens the door for instance) and then you'd have all the performance eating stuff again. The other way around, if you would build something like the space between double portals (just a simple alley) to look out to (through the door), T3Ed wouldn't bother about that scene/angle anyway. Finally, if you plan to make it similar to that store/fence system in TDS, you'd have to find something to make me believe this was so much different. :p
Judith on 28/7/2008 at 19:09
There's nothing to believe, or not to believe, it simply works.
It gives you great freedom, because you don't have to e.g. model exact interior of the house matching the house mesh - it's like a separate "cell" in morrowind or oblivion, yet without loading. So a house can be bigger inside, or smaller, or whatver you wish. You just make a door which cannot be opened, but can be frobbed and assign a proper script to it. Second, it's sealed tight, so it's not rendered until player gets teleported inside.
You can also have teleports working with volumes, moving player from one location to another almost seamlessly, actually it depends on how you arrange a particular scene.
Beleg Cúthalion on 28/7/2008 at 19:22
Why then do you bother about teleporting chasing guards? Do you want to teleport them right behind the player? :confused: Well, just try what you can do with this thing. :)
Ziemanskye on 28/7/2008 at 19:27
/ponders TDS implementation of the Weeping Angels from Doctor Who....