NPC
Shift + Hive. .shift compiles AI to u8 ids. .hive bakes Health/Target columns. Flare can snapshot Hive and replicate the Shift id. Sweep Destroy when the model dies.
src/shared/Npc.shift:
state Idlestate Chase parent CombatIdle -> Chase when SeePlayerChase -> Idle when Lostsrc/shared/NpcWorld.hive:
component Health { i32 current, i32 max }component Target { i32 dummy }#include "Npc.clh"#include "NpcWorld.clh"#include <clpp/libs/sweep.clh>
void init() { HiveWorld world = NpcWorld.New(); ShiftMachine brain = Npc.New(); int entity = world.Entity(); world.Set(entity, NpcWorld.Health, 100); brain.ChangeState("Idle");}RobloxStateMachine used string states and polled OnDataChanged every frame. Shift does not. Hive is ECS columns, not a second FSM.