---
key: path/npc-behavior
type: path
id: npc-behavior
lang: ru
title: Поведение NPC
summary: 'Что персонаж знает, как выбирает действие и каким путём добирается к цели.'
updatedAt: '2026-10-20'
status: active
url: 'https://gamemechanics.pro/ru/learn/npc-behavior/'
jsonUrl: 'https://gamemechanics.pro/api/v1/knowledge/ru/path/npc-behavior.json'
markdownUrl: 'https://gamemechanics.pro/content/knowledge/ru/path/npc-behavior.md'
aliases: []
tags: []
sourceIds: []
sources: []
relations:
  - type: contains
    direction: outgoing
    label: Материалы маршрута
    key: lesson/npc-perception
    title: Восприятие NPC и память о цели
    url: 'https://gamemechanics.pro/ru/lessons/npc-perception/'
    jsonUrl: 'https://gamemechanics.pro/api/v1/knowledge/ru/lesson/npc-perception.json'
    markdownUrl: 'https://gamemechanics.pro/content/knowledge/ru/lesson/npc-perception.md'
  - type: contains
    direction: outgoing
    label: Материалы маршрута
    key: lesson/npc-action-selection
    title: Как NPC выбирает действие
    url: 'https://gamemechanics.pro/ru/lessons/npc-action-selection/'
    jsonUrl: >-
      https://gamemechanics.pro/api/v1/knowledge/ru/lesson/npc-action-selection.json
    markdownUrl: >-
      https://gamemechanics.pro/content/knowledge/ru/lesson/npc-action-selection.md
  - type: contains
    direction: outgoing
    label: Материалы маршрута
    key: lesson/npc-pathfinding
    title: Поиск пути и выполнение маршрута
    url: 'https://gamemechanics.pro/ru/lessons/npc-pathfinding/'
    jsonUrl: 'https://gamemechanics.pro/api/v1/knowledge/ru/lesson/npc-pathfinding.json'
    markdownUrl: 'https://gamemechanics.pro/content/knowledge/ru/lesson/npc-pathfinding.md'
  - type: requires
    direction: outgoing
    label: Перед началом
    key: lesson/game-loop
    title: Игровой цикл и время
    url: 'https://gamemechanics.pro/ru/lessons/game-loop/'
    jsonUrl: 'https://gamemechanics.pro/api/v1/knowledge/ru/lesson/game-loop.json'
    markdownUrl: 'https://gamemechanics.pro/content/knowledge/ru/lesson/game-loop.md'
  - type: requires
    direction: outgoing
    label: Перед началом
    key: lesson/state-machines
    title: Состояния и переходы
    url: 'https://gamemechanics.pro/ru/lessons/state-machines/'
    jsonUrl: 'https://gamemechanics.pro/api/v1/knowledge/ru/lesson/state-machines.json'
    markdownUrl: 'https://gamemechanics.pro/content/knowledge/ru/lesson/state-machines.md'
  - type: requires
    direction: outgoing
    label: Перед началом
    key: lesson/collision-basics
    title: Основы столкновений
    url: 'https://gamemechanics.pro/ru/lessons/collision-basics/'
    jsonUrl: 'https://gamemechanics.pro/api/v1/knowledge/ru/lesson/collision-basics.json'
    markdownUrl: 'https://gamemechanics.pro/content/knowledge/ru/lesson/collision-basics.md'
  - type: practices
    direction: outgoing
    label: Применить на практике
    key: practice/shared-workshop
    title: Общая мастерская
    url: 'https://gamemechanics.pro/ru/knowledge/practice/shared-workshop/'
    jsonUrl: >-
      https://gamemechanics.pro/api/v1/knowledge/ru/practice/shared-workshop.json
    markdownUrl: 'https://gamemechanics.pro/content/knowledge/ru/practice/shared-workshop.md'
  - type: practices
    direction: outgoing
    label: Применить на практике
    key: practice/maintenance-patrol
    title: Ремонтный патруль
    url: 'https://gamemechanics.pro/ru/knowledge/practice/maintenance-patrol/'
    jsonUrl: >-
      https://gamemechanics.pro/api/v1/knowledge/ru/practice/maintenance-patrol.json
    markdownUrl: >-
      https://gamemechanics.pro/content/knowledge/ru/practice/maintenance-patrol.md
  - type: reviews
    direction: outgoing
    label: Проверить через призму
    key: lens/schell-028
    title: Машина состояний
    url: 'https://gamemechanics.pro/ru/knowledge/lens/schell-028/'
    jsonUrl: 'https://gamemechanics.pro/api/v1/knowledge/ru/lens/schell-028.json'
    markdownUrl: 'https://gamemechanics.pro/content/knowledge/ru/lens/schell-028.md'
  - type: reviews
    direction: outgoing
    label: Проверить через призму
    key: lens/schell-031
    title: Действия
    url: 'https://gamemechanics.pro/ru/knowledge/lens/schell-031/'
    jsonUrl: 'https://gamemechanics.pro/api/v1/knowledge/ru/lens/schell-031.json'
    markdownUrl: 'https://gamemechanics.pro/content/knowledge/ru/lens/schell-031.md'
  - type: reviews
    direction: outgoing
    label: Проверить через призму
    key: lens/schell-062
    title: Прозрачность
    url: 'https://gamemechanics.pro/ru/knowledge/lens/schell-062/'
    jsonUrl: 'https://gamemechanics.pro/api/v1/knowledge/ru/lens/schell-062.json'
    markdownUrl: 'https://gamemechanics.pro/content/knowledge/ru/lens/schell-062.md'
placements: []
supersededBy: []
attributes:
  lessons:
    - id: npc-perception
      url: 'https://gamemechanics.pro/ru/lessons/npc-perception/'
      markdownUrl: 'https://gamemechanics.pro/content/ru/npc-perception.md'
    - id: npc-action-selection
      url: 'https://gamemechanics.pro/ru/lessons/npc-action-selection/'
      markdownUrl: 'https://gamemechanics.pro/content/ru/npc-action-selection.md'
    - id: npc-pathfinding
      url: 'https://gamemechanics.pro/ru/lessons/npc-pathfinding/'
      markdownUrl: 'https://gamemechanics.pro/content/ru/npc-pathfinding.md'
  prerequisites:
    - id: game-loop
      url: 'https://gamemechanics.pro/ru/lessons/game-loop/'
      markdownUrl: 'https://gamemechanics.pro/content/ru/game-loop.md'
    - id: state-machines
      url: 'https://gamemechanics.pro/ru/lessons/state-machines/'
      markdownUrl: 'https://gamemechanics.pro/content/ru/state-machines.md'
    - id: collision-basics
      url: 'https://gamemechanics.pro/ru/lessons/collision-basics/'
      markdownUrl: 'https://gamemechanics.pro/content/ru/collision-basics.md'
  practice:
    - id: shared-workshop
      url: 'https://gamemechanics.pro/ru/practice/#shared-workshop'
    - id: maintenance-patrol
      url: 'https://gamemechanics.pro/ru/practice/#maintenance-patrol'
  lenses:
    - id: schell-028
      url: 'https://gamemechanics.pro/ru/lenses/#schell-028'
    - id: schell-031
      url: 'https://gamemechanics.pro/ru/lenses/#schell-031'
    - id: schell-062
      url: 'https://gamemechanics.pro/ru/lenses/#schell-062'
endsAt: null
provenance: >-
  Авторский материал gamemechanics.pro. Учебные примеры требуют проверки в своём
  проекте.
license: CC-BY-4.0
codeLicense: MIT
attribution: gamemechanics.pro contributors
---
# Поведение NPC

id: npc-behavior
type: path
key: path/npc-behavior
lang: ru
status: active
url: https://gamemechanics.pro/ru/learn/npc-behavior/

Что персонаж знает, как выбирает действие и каким путём добирается к цели.

## Перед началом

- [Игровой цикл и время](https://gamemechanics.pro/ru/lessons/game-loop/)
- [Состояния и переходы](https://gamemechanics.pro/ru/lessons/state-machines/)
- [Основы столкновений](https://gamemechanics.pro/ru/lessons/collision-basics/)

## Порядок изучения

1. [Восприятие NPC и память о цели](https://gamemechanics.pro/ru/lessons/npc-perception/)
2. [Как NPC выбирает действие](https://gamemechanics.pro/ru/lessons/npc-action-selection/)
3. [Поиск пути и выполнение маршрута](https://gamemechanics.pro/ru/lessons/npc-pathfinding/)

## Применить на практике

«Общая мастерская» помогает сформулировать роли и конфликт ресурсов. «Ремонтный патруль» соединяет восприятие, выбор и выполнение маршрута в проверяемую систему.

- [Общая мастерская](https://gamemechanics.pro/ru/practice/#shared-workshop)
- [Ремонтный патруль](https://gamemechanics.pro/ru/practice/#maintenance-patrol)

## Результат

Робот с наблюдениями, памятью, выбором действий и проверенным движением по маршруту.

## Проверка результата

- В журнале видна причина каждого решения.
- Потеря цели и закрытие двери обработаны явно.

## Связанные материалы

- Материалы маршрута: [Восприятие NPC и память о цели](https://gamemechanics.pro/ru/lessons/npc-perception/) (key: lesson/npc-perception)
- Материалы маршрута: [Как NPC выбирает действие](https://gamemechanics.pro/ru/lessons/npc-action-selection/) (key: lesson/npc-action-selection)
- Материалы маршрута: [Поиск пути и выполнение маршрута](https://gamemechanics.pro/ru/lessons/npc-pathfinding/) (key: lesson/npc-pathfinding)
- Перед началом: [Игровой цикл и время](https://gamemechanics.pro/ru/lessons/game-loop/) (key: lesson/game-loop)
- Перед началом: [Состояния и переходы](https://gamemechanics.pro/ru/lessons/state-machines/) (key: lesson/state-machines)
- Перед началом: [Основы столкновений](https://gamemechanics.pro/ru/lessons/collision-basics/) (key: lesson/collision-basics)
- Применить на практике: [Общая мастерская](https://gamemechanics.pro/ru/knowledge/practice/shared-workshop/) (key: practice/shared-workshop)
- Применить на практике: [Ремонтный патруль](https://gamemechanics.pro/ru/knowledge/practice/maintenance-patrol/) (key: practice/maintenance-patrol)
- Проверить через призму: [Машина состояний](https://gamemechanics.pro/ru/knowledge/lens/schell-028/) (key: lens/schell-028)
- Проверить через призму: [Действия](https://gamemechanics.pro/ru/knowledge/lens/schell-031/) (key: lens/schell-031)
- Проверить через призму: [Прозрачность](https://gamemechanics.pro/ru/knowledge/lens/schell-062/) (key: lens/schell-062)

## Источники и происхождение

Авторский материал gamemechanics.pro. Учебные примеры требуют проверки в своём проекте.


CC-BY-4.0 · gamemechanics.pro contributors
