RobloxGame SystemsScripts & Plugins
Pathfinding & NPC AI Framework
A powerful NPC AI framework for Roblox built on top of PathfindingService with significant enhancements. Create enemies, companions, and ambient NPCs with complex behaviors using a simple state machine API.
Pathfinding Enhancements
- Dynamic Obstacle Avoidance: NPCs recompute paths when obstacles appear. Handles moving obstacles.
- Path Smoothing: Bezier curve smoothing for natural-looking movement.
- Jump & Climb: NPCs can jump over gaps and climb ladders/ropes.
- Group Pathfinding: Multiple NPCs navigate together without clumping.
Behavior System
- State Machine: Define NPC states (Idle, Patrol, Chase, Attack, Flee, Interact) with transition conditions.
- Behavior Trees: Compose complex behaviors from simple nodes (Sequence, Selector, Condition, Action).
- Perception System: Sight cone, hearing radius, and memory. NPCs remember last known player position.
- Preset Archetypes: Guard, Patrol Enemy, Aggressive Enemy, Passive NPC, Companion — ready to use.
Performance
Uses a priority queue for path requests. Configurable max concurrent pathfinding operations. Tested with 50 active NPCs at 60fps server-side.
Changelog
v2.0.0 — Behavior tree system, group pathfinding
v1.5.0 — Perception system, NPC memory
v1.0.0 — Initial release
Reviews
Group pathfinding is the feature I've been waiting for. My dungeon enemies now move in coordinated groups instead of all stacking on the same path.
The behavior tree system is incredibly flexible. I built a stealth game where guards have patrol routes, investigate sounds, and call for backup. All with this framework.
Sign in to leave a review.