Skip to content
ai12989757Public

About

Host-independent C++ state machine, animation and blending runtime

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

OneMotion

OneMotion is a host-independent C++20 state-machine, animation and blending runtime.

It deliberately does not know whether an event came from a mouse, keyboard, timer, AI or network, and it does not know whether an output channel targets a UI property, entity, bone, material or audio parameter. Host adapters translate inputs and commit the resulting values.

Targets

  • OneMotion::Core — stable IDs, parameters, values, diagnostics and registry primitives.
  • OneMotion::StateMachine — deterministic event/parameter-driven state decisions.
  • OneMotion::Animation — clips, scalar tracks, markers and extensible motion nodes.
  • OneMotion::Mixer — transition policies, channel algorithms, profiles and layered contributions.
  • OneMotion::Controller — connects state transitions to motion playback.
  • OneMotion::AnimDataAdapter — optional adapter for OneAnimData.

The state-machine target does not depend on animation, mixing, UI or engine code.

Current first-version capabilities

  • Entry states and orthogonal regions
  • Events and immutable parameter snapshots
  • Serializable condition tree plus registered custom condition opcodes
  • State, alias and AnyState transition sources
  • Stable transition priority and transactional rollback on transition-limit failure
  • Opaque state payloads and actions
  • Lifecycle records, snapshots and restore
  • Scalar clip sampling, looping, direction and markers
  • Registered transition blend policies and channel algorithms
  • Crossfade, step, replace, add, multiply and weighted-mix built-ins
  • Blend profiles, layers and registered interrupt policies
  • State-to-motion controller with replace, continue-current, reverse and queue behavior
  • Optional OneAnimData scalar-curve adapter

See the architecture and development document for boundaries, UE comparison, roadmap and migration guidance.

Build

OneMotion uses the same direct Visual Studio build flow as OneGUI. The script locates the installed Visual C++ toolchain, configures its x64 environment, invokes cl.exe directly and runs the tests. CMake is not required or supported.

build.bat Debug
build.bat Release
build.bat Asan

Build products are written to build\<Configuration>. To also compile and test the optional OneAnimData adapter, pass the directory containing one_anim_data.h:

build.bat Debug D:\path\to\OneAnimData

Minimal state-machine flow

  1. Build a StateMachineDocument from code or a host-owned file format.
  2. Compile it against a frozen ConditionRegistry.
  3. Create a StateMachineInstance.
  4. Submit an event batch and one ParameterSnapshot.
  5. Consume transition records and opaque actions, or pass them to MotionController.

All runtime string lookup, document migration and host object resolution should happen outside the per-frame hot path.

About

Host-independent C++ state machine, animation and blending runtime

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages