Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Troop spawning race condition

A topic by cuttleshock created Feb 16, 2026 Views: 265 Replies: 2
Viewing posts 1 to 3
(1 edit)

It seems like there's some kind of race condition in the loop for checking if you're allowed to spawn troops, then actually spawning them. So, if you click fast enough (~10+ times a second - I have a macro button set up for this, others will too) you can spawn more troops than your population cap. I assume this is happening because a second spawn-troops command check happens (and passes) in the small delay between the check and the spawn of the first, so it's still below capacity and it says it's okay. This means that both the first and the second lot of troops get spawned.

This also works if you're spawning 10 troops at a time (and I assume 25 and 100, but I haven't tested this). Edit: Have also now had this happen on buying 25x.

This sort of thing is easy to do by mistake, and a pain to check for and debug, so it's very understandable that it slipped by you. :)

Evidence:

Developer

Race conditions are always annoying to deal with :)

Thanks for the report!