Skip to content

Releases: superdupernairobi/Noid

Release list

Noid 0.1.0

Choose a tag to compare

@superdupernairobi superdupernairobi released this 21 Oct 23:23

A humanoid-shaped state machine for custom Roblox character controllers. It just decides what state a character is in and tells you when it changes. It does not move anything or touch the network.

Noid driving a raycast character

Install

Wally

[dependencies]
Noid = "superdupernairobi/noid@0.1.0"

Studio users: download Noid.rbxm below, right-click ReplicatedStorage in the Explorer, and pick Insert > Import Roblox Model

Use

local Noid = require(game:GetService("ReplicatedStorage").Packages.Noid)

local machine = Noid.Machine.new("Idle", "client")

local desired = Noid.Conditions.resolve({ grounded = grounded })
if desired then
    machine:Change({ state = desired, source = "sensor" })
end

machine:Changed():Connect(function(old, new)
    print(old, "to", new)
end)

What's in 0.1.0

  • Machine is the current state with Change, Changed and Destroy hooks
  • States is a 12-state dictionary similar to the HumanoidStateType aliases
  • Transitions is the thirty-rule table, ex: can(from, to)
  • Conditions binds grounded/swimming/climbing/seated/dead to a state, or nil
  • Realm is the client and server to accept different change sources
  • Signal and Lifecycle are dependencies for cleanup and events

What it isn't

It has no physics, replication, animations, or any of that sort, not even input handling. If you want those handled for you, use the Character Controller Library, it's engine-based and faster than anything written in Luau. Noid is for when you've already built your own controller and just want the states back.

The example in the gif

The thing moving on the screen is a construct, not a controller. It's an anchored part moved by CFrame, with a single Y-axis raycast pointing downward, it has no collision response. That's by design, so the state machine is the POI. You can find the full source at dev/root.client.luau if you're interested.

Links