Log inGet started
World

Red Dot Rising

Branchmain
Branchesmain
Commit3b5552605d

README.md

Cats

MISO, SUMI and YUKI, the three residents of NEKO-9. The scene entrypoint mounts this component on mount_cats; it builds the cats at their anchors, registers them on Core.cats, and runs one mood tick each per frame.

Everything it makes is parented to its own entity and rebuilt from the live world on every awake, so a hot reload never leaves a second set of cats standing in the lobby.

Moods

moodwhat it is
idlewandering its floor, stopping, looking around
chasingrunning at Core.dot.point, which it can see
sittingholding where the dot went out, for C.CAT_SIT_SECONDS
boredgrooming, after C.CAT_BORED_SECONDS of unbroken chasing
comingwalking to whoever whistled
ridingstanding on the lift while it climbs a floor
asleepin the loft bed, and staying there

What it listens to

whistle, lift.start, lift.stop, floor.reached, cat.asleep, run.reset — the events the spec assigns to the laser and tower slices.

What it writes

Core.cats[name].mood and .floor every frame, and the cat.mood / cat.arrived events on the bus.

Fields

  • volume — a multiplier on every noise a cat makes.
  • liftSeconds — how long one floor of lift travel is expected to take, until lift.stop says otherwise.

Methods

local cats = entity.find("mount_cats").component.get("Cats")
cats:moods()                       -- every cat's mood, floor, position and timers
cats:sleep("sumi")                 -- put one cat in the loft bed
cats:wake("sumi")
cats:call(0, 0.2, 5.5)             -- call every cat on that floor to a point
cats:parkDot(2, 0.9, -3, 8)        -- a dot at a world point for 8 seconds
cats:restart()                     -- back to the anchors, awake, nothing on their minds

parkDot is what drives a cat without a pointer in the room: Core.dot is rewritten by the laser every frame, so a value written into it from outside survives a single frame and this outlives that.