feat(controllers): #61 NPC AI — ludic.npcai package (base + extensible)
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>
This commit is contained in:
parent
02a8bcc324
commit
9ce69d23e3
5 changed files with 537 additions and 0 deletions
18
packages/ludic.npcai/package.ludic
Normal file
18
packages/ludic.npcai/package.ludic
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
# 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"
|
||||
Loading…
Add table
Add a link
Reference in a new issue