Barbarian spawns: what's wrong and how they can be improved

L. Vern

Chieftain
Joined
Sep 5, 2022
Messages
85
Location
Ontario, Canada
If you have ever had games where you feel like there just aren't any barbarians spawning, especially on higher difficulties, it isn't just you!
I've had several games in a row with just no barbarians so I decided to investigate by seeing the spawn distribution via visualizations, color coded as follows:
  • White: Major Civ Territory
  • Grey: City State Territory
  • Red: Active Barb Camp
  • Orange: Previously Destroyed Barb Camp
With default settings, the album collecting the full set of visualizations is at https://imgur.com/a/ODzVrFD , but for this post will just include the first game as a sample:
1665106685930.png

In this example, the upper-left continent and most of the top half of the right-most continent have seen almost no barbarian activity, and there are similarly large areas with little to no barbarian activity in most of the games recorded.

After some discussion on the discord and analysis of the turn 100 maps, I've come to the following 2 conclusions:
  1. Due to barbarian camps not spawning in vision of players, on lvl7+8 the somewhat recent change to increase vision of units at these difficulties leaves less room for camps to spawn near player territory. This is also compounded by having extra starting units.
  2. Many camps spawn on islands the player will never be able to find/kill until astronomy, so due to there being a cap on camps on the map this vastly reduces the amount of camps in circulation that can spawn on player continents.
Because I wanted to acquire lots of culture and science when I went authority instead of finding zero barbarians, I decided to try to fix this problem. My first attempt was tackling problem #1 by removing the "line of sight blocks spawns" restriction. While there were more barb camps for sure with this approach, not having a way to stop your trade routes from getting sniped was kind of anti-fun in my playtest.

My second approach tackled problem #2 instead: the game by default when deciding which tiles camps can spawn on excluded islands of size 1. Increasing this value to 7 forces those spawns off of small islands and onto continents instead, increasing the probability they will spawn closer to a player. It's definitely not perfect and when the map rolls with few islands not much changes from the default behavior, but I think it's a step in the right direction. Cherry picking my favorite result from the new run:
1665107743709.png

I think shows a very nice distribution with all areas of the map having about equal access to barbs. The full set of results can be found here: https://imgur.com/a/ShGFp8w , and while again it's not perfect there are far fewer areas with no barb activity than the first run.

I'm on my second game now with islandSize>7 and it feels like barbarian spawns are very consistent up until turn ~150, been having a lot more fun personally with the authority start!
I've also made it configurable via config file, any other sizes you would like to see results from? Anyone think it's worth a congress proposal to bump the value from 1->7? Thoughts in general?
 
i like the pirate islands!

how about increasing the camp density instead?
something easier to keep continent density consistent and near performance-free to do instead would be to not count camps on islands of size <= towards the cap, that might work too?
 
Last edited:
I also like pirate islands, but I also like seeing barbs (whether I take Authority or not) - would it be possible to have the island restriction removed after a certain turn count? Or even better, deprioritise islands in such a way that they can spawn there, but much prefer locations on larger landmasses, so they'll tend to spawn there early game until vision restricts them, then naturally spread to smaller islands as the larger landmasses get settled.

If those are possible, anyway
 
Is it possible to make barbarian units barbarian camps? Unchecked would spread like a plague :satan:
 
I'd also like to see tiny islands being excluded (from spawning or from counting towards the limit) - anything >3 island size should be ok for a first test.
 
Yeah I agree on just removing the cap instead. Why's there one to begin with? They're already limited by player sight.
 
Yeah I agree on just removing the cap instead. Why's there one to begin with? They're already limited by player sight.
What would happen on a Terra type game with no cap? Since the second continent would be untouched by sight for a long time, would it just be literally swimming in barbs?
 
It looks like if it's not the first turn, then only a single barbarian camp has a 50% chance to spawn each turn.

I don't see anything related to a hard cap.
 
Top Bottom