Glossary · Gaming & Media

NPC (Non-Player Character)

An NPC is any character in a game controlled by the game software instead of a human player, such as shopkeepers, quest givers, allies and enemies.

Updated October 6, 2026

An NPC (non-player character) is a character in a game that is controlled by the game's code rather than by a person. Shopkeepers, quest givers, enemies, pedestrians and companions are typical examples.

Why it matters

NPCs make a game world feel populated and give players goals, information and opposition. Their behavior can be as simple as a scripted dialogue line or as complex as a decision system using behavior trees, state machines or pathfinding. Because every NPC consumes CPU time and memory, game engines often simplify distant NPCs or disable them until the player is near.

Example

A basic guard NPC can be described as a small state machine:

Patrol -> sees player -> Chase
Chase -> player in range -> Attack
Chase -> loses sight for 5s -> Patrol

Each state runs a few rules every frame or at fixed intervals, which is cheap enough to run for dozens of characters.

Common mistakes

  • Assuming NPC means "enemy". Many NPCs are friendly or neutral.
  • Thinking every NPC uses artificial intelligence in the modern sense. Most use hand-written rules.
  • Using the term for other human players; players controlled by bots are normally called bots.

Get notified when this term updates

Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.

This page is general information written by our editorial team and updated when documentation changes. Servers and providers differ, so test changes safely first. See our editorial policy and disclaimer.