Featured Blog

A spawning system for Carnivore Land inspired by Left 4 Dead.

Carnivore Land is all about fast paced action. So, how to fill the world with enemies? We decided on a spawning system inspired by Left 4 Dead, which features dynamic enemy spawn locations and behaviours.

From the early stages of the design of Carnivore Land, we were against the idea of having enemies spawn in fixed locations in the game. Having enemies in fixed locations would have killed any replay value because as soon as you learn the spawn locations and patterns, the enemy waves become super repetitive.

Instead, we created a randomized spawning system inspired from the spawning system of Left 4 Dead. We have created a central entity that handles all the enemy spawns and chooses where and how many enemies to spawn based on a set of predefined values and random attributes. Confused? Let me explain.

We have the player object. The player object is the center of the spawning system. All enemies are spawned around him. We also have a vector of where the player is looking and where he is moving towards. Let’s say that the spawn manager entity selects to spawn enemies to the back of the player movement vector and close enough to him so that they will attack from behind. Also, it selects that the spawned enemies of the wave will be very aggressive and will start chasing the player as soon as they are spawned. So it selects a random location to the back of the movement vector of the player and checks for validity. A spawn point is valid if it is on the level’s navigation mesh. If the point is not valid, it tests a new random location and retries, until it finds a valid point or a counter is reached where it retries at a randomized later time. If the spawn point is valid, it checks the spawn point of the next enemy for validity, etc.

The following picture depicts the valid spawn area for the enemies behind the player. The red area is invalid because it is inside the camera view, while the green area is valid because it is behind the player and outside of the camera view.

The following picture depicts invalid and valid spawn points in the aforementioned valid area. The red points are invalid because they are on top of non-navigable obstacles, while the green point is a candidate spawn location.

The following picture depicts the camera view for the aforementioned enemy spawn scenario.

The spawn manager entity controls the following features of the spawned enemies:

  • Health

  • Movement speed

  • Attack speed

  • Attack strength

  • View range

  • Movement state (chase the player, stand still or wander the level)

Also, the spawn manager controls how many enemies will spawn at each wave by monitoring the previous spawned waves. So if the previous wave was packed (a lot of enemies or high strength enemies), it will spawn less, more weak enemies.  

But how the spawn manager decides what and where to spawn? Weights and probabilities. All of the attributes that are controlled by the spawn manager are weighted randomized. When a wave is spawned, these weights are changed to reflect the probabilities of the attributes that the next waves will have.

Regarding the spawn location of the enemies, the spawn manager uses a similar weighted system to select in which direction from the player the enemies will be spawned. Also, there is a timer based weight on the look direction of the player. For example, if the player is still then, after a small interval, there is a greater probability for enemies to be spawned in the direction that the player is looking.

To sum up, the enemies are spawned by a central entity that monitors past spawned waves and player behaviour. The system uses a weighted randomized mechanism to choose the location, the numbers and the attributes of the spawned enemies.

Carnivore Land has been released on as early access at:

You can vote for Carnivore Land on Steam Greenlight if you like it:

For more information please visit

Latest Jobs

Xbox Game Studios

Redmond, Washington
Technical Lighting Artist


Hamburg, Germany
Game Designer - Elvenar

Six Foot

Houston, TX
Six Foot Director, Player Relations

Hometopia Inc.

Lead Engineer
More Jobs   


Explore the
Subscribe to
Follow us

Game Developer Job Board

Game Developer Newsletter


Explore the

Game Developer Job Board

Browse open positions across the game industry or recruit new talent for your studio

Subscribe to

Game Developer Newsletter

Get daily Game Developer top stories every morning straight into your inbox

Follow us


Follow us @gamedevdotcom to stay up-to-date with the latest news & insider information about events & more