Skip to content

A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.

docs(nav): the AI overview names both shapes of navigable world

esenginee73038813b74
diff --git a/docs/astro/src/content/docs/gameplay/ai/overview.mdx b/docs/astro/src/content/docs/gameplay/ai/overview.mdx
index 7e9a05978..d59190fb9 100644
--- a/docs/astro/src/content/docs/gameplay/ai/overview.mdx
+++ b/docs/astro/src/content/docs/gameplay/ai/overview.mdx
@@ -14,7 +14,8 @@ Estella's AI layer turns an entity into an actor that **senses**, **decides**, a
what it sees into a `Perception` component.
</Card>
<Card title="Navigation" icon="rocket">
- A `NavGrid` + A\* pathfinding moves a `NavAgent` to any world point, replanning
+ A grid of cells or a navmesh baked from geometry moves a `NavAgent` to any
+ world point, replanning
as the target moves.
</Card>
<Card title="State machines" icon="list-format">
@@ -177,7 +178,7 @@ unlocks when it completes, and R replays it — with zero registered actions.
<CardGrid>
<LinkCard title="Perception" href="/docs/gameplay/ai/perception/" description="Sight cones, and what an agent currently sees." />
- <LinkCard title="Navigation" href="/docs/gameplay/ai/navigation/" description="A navigation grid, A* paths, and moving an agent along one." />
+ <LinkCard title="Navigation" href="/docs/gameplay/ai/navigation/" description="A grid for cells, a baked mesh for geometry, and moving an agent over either." />
<LinkCard title="State machines" href="/docs/gameplay/ai/state-machines/" description="States, guarded transitions, and one-shot triggers." />
<LinkCard title="Behavior trees" href="/docs/gameplay/ai/behavior-trees/" description="Selectors, sequences, decorators and leaves." />
<LinkCard title="The blackboard" href="/docs/gameplay/ai/blackboard/" description="The per-agent data plane both paradigms read and write." />
@@ -210,7 +211,7 @@ registerAction('patrol', () => { /* hold position until the player is seen */ })
// One open nav grid over the arena.
export const setupNavGrid = defineSystem([Res(Nav)], (nav) => {
- nav.setGrid(new NavGrid({ width: 60, height: 44, cellSize: 20, origin: { x: -600, y: -440 } }));
+ nav.setSurface(new NavGrid({ width: 60, height: 44, cellSize: 20, origin: { x: -600, y: -440 } }));
}, { name: 'SetupNavGrid' });
```
diff --git a/docs/astro/src/content/docs/zh-cn/gameplay/ai/overview.mdx b/docs/astro/src/content/docs/zh-cn/gameplay/ai/overview.mdx
index 39a377819..e1c06b576 100644
--- a/docs/astro/src/content/docs/zh-cn/gameplay/ai/overview.mdx
+++ b/docs/astro/src/content/docs/zh-cn/gameplay/ai/overview.mdx
@@ -13,7 +13,8 @@ Estella 的 AI 层把一个实体变成会**感知**、会**决策**、会**移
`Perceiver` 在视野锥内感知附近的 `PerceptionTarget`,把看到的东西写进 `Perception` 组件。
</Card>
<Card title="导航 Navigation" icon="rocket">
- `NavGrid` + A\* 寻路把 `NavAgent` 移动到任意世界坐标,并随目标移动而重新规划。
+ 格子网格,或从几何烘焙出来的导航网格,把 `NavAgent` 移动到任意世界坐标,
+ 并随目标移动而重新规划。
</Card>
<Card title="状态机 FSM" icon="list-format">
`StateMachineAgent` 运行一个 `.esfsm` 图——带进入/更新/退出钩子和带守卫的转移的状态。
@@ -157,7 +158,7 @@ registerFsm('intro', {
<CardGrid>
<LinkCard title="感知" href="/docs/zh-cn/gameplay/ai/perception/" description="视锥,以及一个 agent 此刻看到了什么。" />
- <LinkCard title="导航" href="/docs/zh-cn/gameplay/ai/navigation/" description="导航网格、A* 路径,以及让 agent 沿路径移动。" />
+ <LinkCard title="导航" href="/docs/zh-cn/gameplay/ai/navigation/" description="格子给瓦片、烘焙出来的网格给几何,以及在两者上移动 agent。" />
<LinkCard title="状态机" href="/docs/zh-cn/gameplay/ai/state-machines/" description="状态、带守卫的转移,以及一次性触发器。" />
<LinkCard title="行为树" href="/docs/zh-cn/gameplay/ai/behavior-trees/" description="选择、序列、装饰器与叶子。" />
<LinkCard title="黑板" href="/docs/zh-cn/gameplay/ai/blackboard/" description="两种范式共同读写的每-agent 数据面。" />
@@ -189,7 +190,7 @@ registerAction('patrol', () => { /* 在看见玩家之前保持原地 */ });
// 一张覆盖竞技场的开阔导航网格。
export const setupNavGrid = defineSystem([Res(Nav)], (nav) => {
- nav.setGrid(new NavGrid({ width: 60, height: 44, cellSize: 20, origin: { x: -600, y: -440 } }));
+ nav.setSurface(new NavGrid({ width: 60, height: 44, cellSize: 20, origin: { x: -600, y: -440 } }));
}, { name: 'SetupNavGrid' });
```