Perception -> decision -> action AI that writes the SAME intent fields the player controllers read, so an enemy reuses the shooter's weapon/aim and a companion reuses the mover (friendly vs enemy = faction + goal, not code). Vision/Memory perception (throttled, faction + optional LOS), three decision models (FSM, utility, behaviour tree) writing one Brain intent with a cancellable DecisionMade hook, Reynolds flocking steering, and a Follower companion. Reuses ludic.gameplay Faction/Stats. Deterministic. 8-check example. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
18 lines
861 B
Text
18 lines
861 B
Text
# ludic.npcai — builtin NPC AI (#61): perception -> decision -> action.
|
|
#
|
|
# Reusable friendly & enemy AI that plugs into the platformer / shooter / RPG
|
|
# bodies rather than re-implementing movement. The AI never moves a body directly —
|
|
# it writes the SAME intent fields the player controllers read (want_x/want_y,
|
|
# want_fire, want_jump), so an enemy gunner reuses the shooter's weapon/projectile
|
|
# systems verbatim and a companion reuses the mover. Three decision models (FSM,
|
|
# utility, behaviour tree) all write one `Brain` intent. Reuses ludic.gameplay
|
|
# Faction (friend/enemy) + Stats (hp for flee). Deterministic: perception + replan
|
|
# are frame-throttled and fixed-order, no wall-clock, no float.
|
|
package "ludic.npcai"
|
|
version "0.1.0"
|
|
kind source
|
|
provides "Vision"
|
|
provides "Brain"
|
|
provides "Ai"
|
|
provides "Follower"
|
|
require "ludic.gameplay" "0.1.0"
|