josh771's AI Director

Projects that alter game functions but do not include new maps belong here.
Forum rules
The Projects forums are ONLY for YOUR PROJECTS! If you are asking questions about a project, either find that project's thread, or start a thread in the General section instead.

Got a cool project idea but nothing else? Put it in the project ideas thread instead!

Projects for any Doom-based engine (especially 3DGE) are perfectly acceptable here too.

Please read the full rules for more details.

josh771's AI Director

Postby Josh771 » Sun Oct 21, 2018 5:44 pm

Image
E1M1 with 20% population and groups of 1 to 10 monsters, plus item randomization

This "AI Director" is a very simplistic attempt at something akin to Left 4 Dead's AI Director: spawning monsters based on in-game factors to keep things interesting as you play. It creates spawn rosters of all the monsters and (optionally) all the items on a map, removing them in the process, then uses that same roster to spawn new monsters and items at randomized positions. This means a map that normally has a lot of imps will still have a lot of imps, a map that didn't have a chaingun spawn in it still won't have one. However, it also means a map that had one hell knight could have more than one -- and in unexpected places. Or it could have none at all.

The settings menu includes options for adjusting how many monsters spawn in place of old ones, how frequently new monsters spawn in over time (which can also be disabled entirely), and adjusting how many monsters are placed at the start of the map. There are more settings, each hopefully described well enough within the menu itself for you to figure out how it all works together. There is even a setting to make spawns over time less frequent and numerous when players are injured -- and, for that matter, more numerous when players are supercharged!

I find that this can make IWAD maps feel fresh again, and I like that I can adjust it to turn maps into slaughterwads or casual strolls.

One difference between the spawns-over-time with my "AI Director" as opposed to DCS is that this mod tries to avoid teleporting monsters into the map where the player can see them. Instead, it quietly spawns groups of enemies out of sight at a minimum distance, so that you might stumble upon them or be surprised by new foes in a room you'd cleared earlier.

Download v0.2 on GitHub!
Moderator Note: Version 0.2 has a bug in recent versions of GZDoom. Please download and use the "master" version in the meantime until Josh does a new release: master.zip
--caligari87


While the current state of this mod does not take incredibly many factors into account when spawning monsters mid-game (players' health and armor if "Dynamically Soften Spawns" is enabled), I plan to add dynamic moments of higher and lower intensity spawning, and possibly even dynamic item spawning adjustments based on things like player ammo levels. For now, this is essentially a highly customizable randomizer, but I felt it had reached a point where it was well worth sharing. :)

Spoiler: Setting Recommendations
Last edited by Josh771 on Fri Oct 26, 2018 12:02 pm, edited 1 time in total.
User avatar
Josh771
formerly known as SidDoyle
 
Joined: 03 Apr 2013
Location: Elsewhere.
Discord: josh771#7771

Re: josh771's AI Director

Postby Cherno » Sun Oct 21, 2018 7:08 pm

Ineresting project. This kind of "middleware" hopefully will show it's true potential in the mid- to longterm, when dedicated TCs which utilize it are released (like a Left4Dead TC! :twisted: )
User avatar
Cherno
 
Joined: 06 Dec 2016

Re: josh771's AI Director

Postby Rowsol » Sun Oct 21, 2018 7:13 pm

Messed around for a bit. A few things I noticed.

At default settings there seems to be less monsters than without the mod.
I turned all the item random options on and on map12 I had a row of BFGs in the ooze where there is usually a row of health bonuses.
An occasional monster stuck in the wall.
Sometimes the monsters wouldn't respond, like they couldn't hear me. Not entirely sure this is the mod and not just the level I was playing.
The option for no monsters to spawn in front of you when you start the level is kinda iffy. There are some maps that have a ton of guys facing away at the spawn, something like nuts.wad comes to mind.

This is yet another cool mod you've released.
User avatar
Rowsol
 
Joined: 06 Mar 2013
Location: Maryland, US

Re: josh771's AI Director

Postby Josh771 » Sun Oct 21, 2018 8:15 pm

Rowsol wrote:At default settings there seems to be less monsters than without the mod.

Default settings are 1 to 3 monsters at half of the usual monster spawns. This means that, on average, it should be close to vanilla counts. Spawning 1 to 3 monsters at random should produce an average of about 2 monsters per spawn point, which reduced by 50% becomes 1 monster per spawn point. Therefore, it is somewhat probable that you end up with 1:1 monster counts or something very close to it. But it has a very real chance to be considerably less or considerably more, not to mention that it may create pockets where there are no monsters and large groups where there was normally a small one.
Rowsol wrote:I turned all the item random options on and on map12 I had a row of BFGs in the ooze where there is usually a row of health bonuses.

That's a product of (1) the number of BFGs in the map and/or (2) total random chance. I suggest turning off "Randomize Weapons" to prevent this from happening, although this should be an incredibly rare occurrence. I would ask you to see if you can replicate this on that same map.
Rowsol wrote:An occasional monster stuck in the wall.

This was much more common before I put in a few measures to try to prevent it, but those measures are imperfect and I'm still figuring out ways to prevent it. :wink:
Rowsol wrote:Sometimes the monsters wouldn't respond, like they couldn't hear me. Not entirely sure this is the mod and not just the level I was playing.

The spawned monsters are randomly given +AMBUSH. I should probably add a setting to disable this behavior. They sometimes also totally ignore the player when they are stuck on a ledge or inside a wall. If I can prevent those spawns from occurring, it should fix this issue.
Rowsol wrote:The option for no monsters to spawn in front of you when you start the level is kinda iffy. There are some maps that have a ton of guys facing away at the spawn, something like nuts.wad comes to mind.

This is the primary reason I made it an option, rather than just force it. There are maps where you would not want this to happen. In general, this option is meant for maps with a little more varied geometry than nuts.wad to prevent players from getting bombarded in what are normally fairly mild starts. One can always disable the setting; this is definitely a mod that requires user setup for maximum enjoyment.
Rowsol wrote:This is yet another cool mod you've released.

Thanks! :)
User avatar
Josh771
formerly known as SidDoyle
 
Joined: 03 Apr 2013
Location: Elsewhere.
Discord: josh771#7771

Re: josh771's AI Director

Postby namsan » Sun Oct 21, 2018 9:00 pm

looks freaking interesting, honestly.
Can you add features like "Reduce the amount of enemies when player died and restarted"?
It would make no-save run interesting.
User avatar
namsan
Loves English but hates Revenants
 
Joined: 31 Mar 2012
Location: Japan
Discord: Namsan#8146

Re: josh771's AI Director

Postby Cherno » Mon Oct 22, 2018 4:43 am

Josh771 wrote:
Rowsol wrote:An occasional monster stuck in the wall.

This was much more common before I put in a few measures to try to prevent it, but those measures are imperfect and I'm still figuring out ways to prevent it. :wink:


When I spawn monster groups, I commonly spawn an invisible projectile at a low velocity outwards from the center spawning spot. Once it hits something, it will spawn the monster. This way, monsters won't spawn in walls so often.
User avatar
Cherno
 
Joined: 06 Dec 2016

Re: josh771's AI Director

Postby OlegGontar » Mon Oct 22, 2018 6:24 am

Is your mod compatible with monster randomizer mods too?
OlegGontar
 
Joined: 14 Oct 2018

Re: josh771's AI Director

Postby BoneofMalkav » Mon Oct 22, 2018 12:01 pm

OlegGontar wrote:Is your mod compatible with monster randomizer mods too?

Testing it with Shades of Doom, Works just fine with it so far.
User avatar
BoneofMalkav
Six O'Clock on a Christmas Morning...
 
Joined: 22 May 2014
Location: Citadel Station - Medical Bay
Discord: BoneofMalkav #5547
Twitch ID: BoneofMalkav

Re: josh771's AI Director

Postby Rowsol » Mon Oct 22, 2018 12:28 pm

It seems that the more closed in an area, the less guys spawn. I have the settings cranked (2-8 guys, 100% chance) and I've found that very little ever spawns in the imp closet of map02 after grabbing the red key, 1 or 2 guys instead of the normal 5 imps. I assume there's some check in the code to prevent spawning if it would otherwise spawn in the wall. I think that's where my initial diagnosis of 'default has less monsters' stems from. The mod is still fun regardless of the occasional mishap.
User avatar
Rowsol
 
Joined: 06 Mar 2013
Location: Maryland, US

Re: josh771's AI Director

Postby sir_firebrand » Mon Oct 22, 2018 3:18 pm

So, is this basically the zdoom version of Left 4 Dead's "The Director"?

Tried this with some Iwads (Hexen and Heretic) and mods (HD, Beautiful Doom, Brutal Doom and High Noon Drifter) here and all of them seem to be compatible with this.

I will probably replay some good wads that got stale, this will probably will make an excellent addition to wads like alien vendetta and DTWiD.

I wish this was compatible with Zandronum, so all those coop servers would have some variety on the monster's position and location...

Damn you Zandronum!

I U STOPED UPDATING
User avatar
sir_firebrand
 
Joined: 09 Apr 2017

Re: josh771's AI Director

Postby -Ghost- » Mon Oct 22, 2018 3:54 pm

Great idea! I'm loving all the AI stuff you're putting out right now, they really help mix things up in familiar level sets. It's nice that they work with other mods, too.

Enemy spawning feels okay, I'm still trying to figure out a good item randomization amount, since it tends to give you too much at once.
User avatar
-Ghost-
 
Joined: 08 Sep 2010

Re: josh771's AI Director

Postby Josh771 » Mon Oct 22, 2018 6:16 pm

sir_firebrand wrote:So, is this basically the zdoom version of Left 4 Dead's "The Director"?

That's my end goal. I hope to eventually introduce more dynamic and less purely random behavior, with item spawns occurring in the map as you explore rather than as soon as the map begins, and other things (like tracking player skill level/map difficulty, etc).
OlegGontar wrote:Is your mod compatible with monster randomizer mods too?

Should be just fine, but it's got some hiccups even in vanilla.
Rowsol wrote:It seems that the more closed in an area, the less guys spawn. I have the settings cranked (2-8 guys, 100% chance) and I've found that very little ever spawns in the imp closet of map02 after grabbing the red key, 1 or 2 guys instead of the normal 5 imps. I assume there's some check in the code to prevent spawning if it would otherwise spawn in the wall. I think that's where my initial diagnosis of 'default has less monsters' stems from. The mod is still fun regardless of the occasional mishap.

Yeah, I've noticed the same thing, and you've guessed right: it's because of the code attempting not to spawn monsters inside walls. I'm considering something of a "fix" for this, giving each spawn point a flag that gets set after its first spawn. Using this flag, I can make the first monster placed at a spawn point actually spawn in the exact position.
User avatar
Josh771
formerly known as SidDoyle
 
Joined: 03 Apr 2013
Location: Elsewhere.
Discord: josh771#7771

Re: josh771's AI Director

Postby BROS_ETT_311 » Mon Oct 22, 2018 6:38 pm

I don't think anyone else has mentioned this, but will this eventually be expanded to include a dynamic music system. This might seem superfluous to most, but I'm always a huge sucker for games that incorporate such a system, and this mod seems to have the potential for just that.
User avatar
BROS_ETT_311
 
Joined: 03 Nov 2017

Re: josh771's AI Director

Postby Josh771 » Mon Oct 22, 2018 6:48 pm

BROS_ETT_311 wrote:I don't think anyone else has mentioned this, but will this eventually be expanded to include a dynamic music system. This might seem superfluous to most, but I'm always a huge sucker for games that incorporate such a system, and this mod seems to have the potential for just that.

There is currently no plan for a dynamic music system. That said, I love the idea, but I think something like that might be better suited to a fuller gameplay mod or TC.
User avatar
Josh771
formerly known as SidDoyle
 
Joined: 03 Apr 2013
Location: Elsewhere.
Discord: josh771#7771

Re: josh771's AI Director

Postby RikohZX » Mon Oct 22, 2018 11:18 pm

Or perhaps someone making an addon that taps into when the AI director decides it's time for the lube.
User avatar
RikohZX
 
Joined: 04 Sep 2012

Next

Return to Gameplay Mods

Who is online

Users browsing this forum: Hege Cactus, MauiBot, Simple Pie [RSS] and 8 guests