AntAttack!

Posted by
July 15th, 2016 4:19 am

Well I’ve kinda made a start on miniLD#69…

Rather than humans colonizing something, I thought back to SimAnt…

Here is a Javascript browser-based made-in-an-hour ant colony simulator:

AntAttack

http://williame.github.io/LD/mini/69/

Its based on a quick glance at https://www.practicingruby.com/articles/ant-colony-simulation but its diverged quite a bit from that. Its rendering ‘debug’ info, showing how the sim works underneath.

The red dots are food sources and the blue dot is the ‘nest’.   Ants wander fairly aimlessly.

When they find food they suddenly lay down a ‘food pheromone’ trail (purple). They then try to find the nest again. If they find it, they lay down a ‘nest pheromone’ trail (yellow).

If ants wander across a food pheromone trail when they are seeking food they tend to follow it if its strong enough, and likewise nest pheromones when they are taking food home. After a while they end up with trails between food and nest.

The system can easily support obstacles etc. But right now the only obstacles are the edges of the canvas.

I have almost zero time to make a game in the coming week, so we’ll see if anything happens.

Haven’t quite worked out the gameplay yet. Maybe you have to help the ants, or maybe you have to kill them. Are you on the side of the ants, or are they the enemy? Suggestions welcome 😀

Tags:


One Response to “AntAttack!”

  1. Will Edwards says:

    Didn’t gifs used to animate? Not sure why the uploaded version ins’t animated. The original gif I made from the screen capture is animated.

Leave a Reply

You must be logged in to post a comment.

[cache: storing page]