How the Pheromone Trails Work

Antline - biomimetic swarm routing and pheromone diffusion cellular automaton schematic
Fig 1. Pheromone diffusion schematic: subterranean nest chamber, dual-channel chemical diffusion ribbons (trail vs home), obstacle stones, and antenna sensory sampling arcs.

In Antline, you never control individual ants directly. Instead, you guide an autonomous foraging swarm by painting invisible chemical scent paths across the soil. Each ant relies on its antennae to sniff out the strongest nearby scent gradient to decide which direction to crawl.

The colony communicates through two distinct scent channels:

  • Green Scent (Trail): Guides empty-handed scout ants outward from the anthill toward rich sugar and food caches.
  • Blue Scent (Home): Guides food-burdened worker ants safely back to the nest. Returning ants also drop blue pheromones as they walk, reinforcing the trail for their nestmates.

Chemical trails evaporate quickly in open air. An abandoned trail fades into nothing in just a couple of seconds. A route only stays alive if steady ant traffic marches over it, laying down fresh scent faster than the air can carry it away.

Pheromone Brush and Controls

Lay down scent corridors and switch between chemicals using fast mouse or keyboard inputs:

Key / Click Action What Happens
Left Click + Drag Paint Scent Trail Paints active scent along your cursor path; consumes ink from your pheromone meter.
T / 1 Select Trail Scent (Green) Switches brush to outward scouting scent, guiding unburdened ants toward food.
H / 2 / Right Click Select Home Scent (Blue) Switches brush to homing scent, guiding food-carrying ants back to the nest.
Spacebar / N Launch Swarm / Next Stage Releases the ant cohort from the nest or advances upon meeting your food quota.
P Pause Simulation Freezes ant movement, level timers, and chemical evaporation immediately.
R Restart Stage Refills your 100% ink reserve, clears existing trails, and restarts the stage.

How to Beat Level 4 (Avoiding the Endless Traffic Circle)

Level 4 is the first major puzzle challenge. The nest sits on the left, while two separate food caches sit on the right, separated by large stone formations.

Nearly every beginner makes the mistake of drawing a giant unbroken loop of Green scent connecting the nest to both food piles at once:

  • The Scent Collision: Ants returning with food from the upper cache run into the green scent highway leading to the lower cache. Because the green trail is strong, it confuses returning ants.
  • The Whirlpool Loop: Disoriented ants start walking around the rocks in endless circles instead of carrying food home.
  • The Ink Drain: Panicked players keep painting more lines over the traffic jam, burning through ink while old trails evaporate.
  • The Solution: Target one cache at a time. Paint a clear Green trail to Cache 1, let your swarm harvest it completely and bring the food home, and only then lay down a path to Cache 2.

Tips and Strategies for Harder Levels

Later stages introduce water obstacles and competing rival colonies:

  • Level 6 (Water Hazard Routing): Puddles wash away scent trails instantly. Never try to paint across water. Instead, route your scent corridors tightly around the dry edges of the puddle to keep your path intact.
  • Level 7 (Rival Colony Rush): Red rival ants emerge to raid the same sugar mounds. Draw a direct Green trail to the nearest cache immediately at the start of the stage so your swarm arrives in force before rival scouts can haul the food away.
  • Level 8 (Pheromone Budgeting): Ink reserves are limited on the final stage. Draw thin, minimal guide lines rather than thick highways. Once the first wave of ants begins carrying food back, their natural deposits will reinforce the route for free.

Frequently Asked Questions

Ants follow the strongest nearby pheromone gradient. If trails fade from natural evaporation or get washed away by water puddles, ants resort to random wandering. Lay down fresh Green Trail scent to reconnect them to the food cache.

Green Trail scent guides unburdened scout ants outward toward food caches. Blue Home scent guides food-carrying worker ants back to the central nest entrance.

On later levels, red rival ants try to haul your food away. Draw a direct, concentrated Green Trail to the nearest cache immediately at the start of the stage so your swarm empties it before rival scouts arrive.

Built with pure vanilla HTML5 canvas and standard Web Audio (no external engines or heavy libraries).