Post news RSS Devblog #9 - The Constant

Yesterday I played around with monster spawning for Doom 3: Phobos. I wanted to change the teleporter, or spawn-in, effect of the monsters. The problem as I and others on the team see it is that you get too much of a warning in Doom3 when monsters spawn in.

Posted by on

Yesterday I played around with monster spawning for Doom 3: Phobos. I wanted to change the teleporter, or spawn-in, effect of the monsters. The problem as I and others on the team see it is that you get too much of a warning in Doom3 when monsters spawn in. A break-down of the effect would go as follows;

1) Start sounds of whispering
2) Show neat and ominous particle effects
3) Strike the ground with a bolt
4) Spawn in the monster

The duration of this process is what bothers me. It takes between 1.6 and 3.6 seconds for a monster to spawn in. This fact alone makes the spawning monsters a useless feature, in my opinion. The player gets a warning as well as a detailed description of where the monster is going to teleport in. AFTER the couple of seconds, the monster will then have to land and scream at you. 4 or 5 seconds can easily pass before the monster is ready to claw at you.

Compare this to the old doom where an imp could teleport in with a "BZZT" and attack you instantly. No warnings, no delays, just 100% surprise and fast action.

I wanted to replicate this effect.

The first place I looked was in the teleport.fx files. These control the sequences of the spawn-in effects. It all made sense in there. There were delays, durations and references to different particle effects, lights and models. "Easy", I thought and for proof-of-concept I tried to delete everything in the fx. No go. While all the particle effects and lights were gone, the imp STILL took its sweet time spawning in. This sent me on a wild goose chase in the SDK. I couldn't find a variable for this delay anywhere and after a couple of hours in the SDK I tried to look elsewhere. Apparently the delay is a hard-coded value inside the base AI script for monsters. Kind of backwards and hacky if I may say so. I removed this delay and finally the imp could spawn into the area in all its instant-action glory.

User Posted Image

The reason I've been playing around with this is because E1M3 has reached the internal demo phase where we pretty much just need to place enemies and items. While we already went through this process during the equivalent phase for E1M2, this still feels new for us and we are going to spend some time the following weeks experimenting with it. Even though we have a clear-cut vision of how the mod should play, we still need to spend some time getting there or even learning how to get there. The last thing we want is for the monster placement to become an after-thought. This needs to be done right. Doom3 never really went far in the experimentation of the combination of different monster types. How often did you encounter melee enemies AND long-range enemies at the same time? How often did you need to find cover? Were imps used for mainly melee or ranged attacks? How can we improve on that? These are some of the questions we're exploring the answers to.


i suggest that the big mosters should get this slower span, and the little gets a shorter and silenter one. this would be a good idea to get the atention on the big one, and spawn 2 more little demon on the back of the player to scare him for good.

Reply Good karma Bad karma+1 vote

About the spawn time, I guess it's easy to tell why the play is getting warned. Usually a monster comes from somewhere logical, but when spawned without any effect and sound it can come from everywhere (unlogical) and then it hits the player wheres he had no clue where it came from. If that happens too often, it might be that the player askes himself how stupid that is and stops playing. The sound and effect just prevents this (actually unfair) moment. Still, that's just my theory!

Reply Good karma Bad karma+1 vote
shaviro Author

The effects and sounds will still be there, but the monster won't wait around before entering the area :)
You will 'know' a monster is coming and where it came from, but you won't get the time to place yourself right in front of the incoming foe :)

And as medve mentiones, the larger monsters could still have a delay to build up suspense while battling the already entered smaller enemies :)

Reply Good karma+1 vote

For my own mod I used some scripting to bring about the "instant spawn" effect. Within a spawn function you would have:
entity spawned_monster;
sys.setSpawnArg("origin", originposition);
and this would automatically spawn a monster into the map without any special effects, and send it after the player. The downside of this method is you need to load each monstertype into the map on start, otherwise they won't be precached and the game may freeze temporarily when it loads the monster to be spawned.

I don't know if this helps.

Reply Good karma Bad karma+1 vote
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.