DEVLOG

Companion AI: Creating Intelligent Teammates

How I combined EQS positioning, threat awareness, probabilistic evasion, and revive mechanics to create companion NPCs that felt like capable teammates while preserving challenge and encouraging cooperative gameplay.

Creating Companions That Feel Like Teammates

One challenge with companion AI is making characters feel capable without making them feel invincible. For Lynked: Banner of the Spark, I built a layered threat awareness system that helped companions make smarter combat decisions while preserving the need for player cooperation.


The Design Goal

The goal was not to create companions that made perfect decisions. Perfect AI can actually work against the cooperative experience: if companions always avoid damage and make optimal choices, the player has less reason to pay attention to them.

Instead, I wanted companions to give the impression that another player was fighting alongside you—capable enough to be useful, vulnerable enough to need help, and responsive enough to feel believable.

Layer 1: Hazard Avoidance

First, companions used EQS-based positioning to evaluate the environment. Areas near traps and hazards were given lower desirability scores, encouraging companions to naturally avoid dangerous locations before they became a threat.

 

 

Layer 2: Detect Threats They Can't Avoid

For threats they couldn't avoid, each companion had a 3-meter combat awareness sphere that monitored nearby hazards, enemy attack hitboxes, and incoming projectiles.

When a threat entered that space, the AI evaluated whether to continue attacking or reposition. The system was deliberately simple: it used gameplay collision data to create the appearance that the companion was anticipating and reacting to the fight around it. The AI behavior find a safe location and dodge in that direction.


Layer 3: Don't Make Them Dodge Everything

The key was using a probability-based response system instead of making companions dodge every attack. Early in a run, companions were more reliable, but their dodge chance decreased over time.

This created a simple difficulty curve for the player without making the AI feel artificially weaker. As the run progressed, companions became more vulnerable, increasing the player's incentive to pay attention to them and protect them.


The Failure State: Man-Down

If a companion's damage was depleted, they entered a 'man-down' state rather than simply disappearing from the fight. The player or another companion could then revive them.

This gave the entire system a meaningful consequence. Companion survivability was no longer just an AI problem—it became part of the team's combat strategy.


Why the System Worked

The interesting part of the system wasn't any single mechanic. EQS positioning, a simple awareness volume, probability-based evasion, and a revive state are all relatively straightforward systems.

Together, they created the illusion of a teammate that was aware of the fight, capable of making decisions, and vulnerable enough to need the player.

The result was companions that behaved like skilled teammates while preserving challenge and rewarding cooperative gameplay.

Key Takeaways

  • Layer simple systems to create complex-looking behavior.
    EQS positioning, threat detection, and probabilistic reactions were individually simple, but together created much more believable combat behavior.

  • Use imperfection to make AI feel believable.
    Companions didn't always make the optimal decision. Their probability-based evasion allowed them to succeed, fail, and occasionally get caught off guard.

  • Combine AI decisions with responsive animation to sell intent.
    The AI determined what the companion should do, while animation made that decision feel immediate, readable, and intentional.

  • Make companion vulnerability reinforce player cooperation.
    The man-down and revive system gave players a reason to protect their companions, turning AI survivability into an active part of the cooperative combat experience.