Director AI Thoughts

Moderator: Moderator

Post Reply
Message
Author
yufra
Perspiring Physicist
Posts: 1332
Joined: Tue Jul 13, 2010 2:53 pm

Director AI Thoughts

#1 Post by yufra »

I have been thinking about trying to mimic the Director AI used in Left 4 Dead and Pyromancer (http://doryen.eptalys.net/pyromancer/ if you have never seen it). Now I am battling a cold/flu so my thought process is a bit funky right now and instead of coding I want to get the ideas down so others (including my proper coding self) can critique and improve upon them.

The Pyromancer source looks like it uses spawn locations determined at initialization, but I am thinking about something a little more generic. The reason I am even considering this approach rather than the generation of all monsters upon entering the level is because I would like to be able to support relatively complicated AI on large maps. One approach would be to have the AI functions skip if they are X distance away from the player, but that rules out NPCs that are slow (and thus the player can run away) but can hunt (but the player should not be able to rest). Hmm, well I guess those types of AI's could simply ignore the distance criterion...

Anyway, back to outlining the Director. The process would have to be invisible to the player. This means that monsters must be generated out of LOS and not in a surprising fashion (wait, I thought I just cleared that room!) I think the distance map used in ActorFOV can be used for that, coupled with a definition of sources and sinks. For example, just because a player is standing right next to the stairs (can see them) doesn't mean a creature shouldn't be created on them (they are a source) or disappear on them (they would also be a sink). Rooms that you have seen and are connected to a source/sink could spawn/decay NPCs, but only if the connection does not have to pass your FOV. Sound plausible?
<DarkGod> lets say it's intended

darkgod
Master of Eyal
Posts: 10750
Joined: Wed Jul 24, 2002 9:26 pm
Location: Angolwen
Contact:

Re: Director AI Thoughts

#2 Post by darkgod »

Sounds very neat to me!
[tome] joylove: You can't just release an expansion like one would release a Kraken XD
--
[tome] phantomfrettchen: your ability not to tease anyone is simply stunning ;)

Post Reply