Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(+1)

in regard to the ant running in circles bug


you could make it so that if an ant comes to the same place, the same way 3 times without getting to the surface it stops putting down come here pheromones and instead places a stay away pheromone



or you could be boring and let players erase pheromones

(+1)

is really one of my favorites on this site tho


๐Ÿ˜€๐Ÿ˜€๐Ÿ˜€๐Ÿ˜€๐Ÿ˜€๐Ÿ˜€

That is one potential solution for sure but a fundamental change to the ideology around the ant behavior. The black ants do not have any memory at all and instead react purely based on the current conditions they perceive. My goal is to make them behave close to real ants so arbitrary fixes to address issues kind of goes against that. I'd rather try to find fundamental ways to make the simulation more accurate that causes downstream problems like the doubling back issue to get resolved. 


There's a different potential solution I wanted to try to get working of letting the pheromones diffuse to nearby cells constantly. That way, more stable gradients back to the surface or towards the digging area would be formed and be more resilient against occasional double backs. While I did implement this pheromone diffusion, I disabled it as my implementation was causing constant lag spikes. I might come back and look to optimize it with something like a computer shader but I'll need to adjust several other parameters in the system to account for that. But I have no immediate plans to do so since I'm working on a bunch of other stuff for the time being.


I'm glad you enjoy my ant behavior simulation a bunch though! Sorry for rambling a bit. I like how it turned out too and keep thinking of ways I could do it better if I attempted to improve it. 

what abt erasing pheromones?

or the other ants placing the 'go away' pheromones

it's fine abt the rant

I tend to go on 500-word essays when I'm thinking