ludic/packages/ludic.npcai/package.ludic
Orkuncakilkaya 9ce69d23e3
All checks were successful
bootstrap / cfree-fixpoint (push) Successful in 22s
ci / build-and-test (push) Successful in 2m11s
commit-lint / conventional-commits (push) Successful in 4s
docs / build-and-deploy (push) Successful in 29s
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>
2026-09-01 17:12:32 +03:00

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"