The Singularity Workshop - FSM API (Advanced)
The Singularity Workshop
$21.00
$30.00
30%OFF
(no ratings)
Jump AssetStore
Got FSM? End the game loop bottleneck. Our Advanced API gives you runtime recomposition and dynamic custom loops for unparalleled performance in massive AI and complex systems.This FSM API-Advanced is a script-based solution that is not dependent on any specific render pipeline and will work with all Unity rendering setups.This replaces the FSM_API Integration package without breaking your code, seamless and immediate benefit of control over when your FSMs update, even allowing runtime restructuring or redefinition.FSM_API-Advanced: Forge Logic Beyond the Game LoopWhile our Basic FSM_API Integration Package gives you a heartbeat, our Advanced Integration gives you a brain.This advanced package is designed for developers who need to elevate their projects from simple chaotic logic to sophisticated, scalable intelligence. It is a professional-grade solution that delivers the absolute granular control and performance optimization required for demanding and complex systems. Engineered to Perform!⚡ Shatter the Bottleneck: Absolute Deterministic ControlStop compromising performance with every new system. Unity's default Update() forces your AI agents, network syncs, and UI states to compete for the same millisecond, leading to unpredictable frame-rate spikes and unacceptable performance jitter in high-complexity builds.Our Advanced FSM_API Integration completely shatters that dependency on the conventional Unity game loop. By providing a clean and intuitive way to create dynamic and custom processing groups, achieving the ultimate in control:Granular Control: FSMs are assigned to process groups, which are run only when their associated Unity Message (or custom event) is stepped.Optimal Performance: Run state logic at the exact frequency required (e.g., AI every 0.2s, physics state every FixedUpdate), eliminating needless over-updates for superior performance.Nested Hierarchy: FSMs can be defined in a completely nested hierarchy, maintaining order and integrity across systems.🎤 The Game-Changing Feature: Runtime Recomposition 🎤The static definition of a Finite State Machine carries inherent tradeoffs in massive or long-running projects. We shred all theory around conventional FSMs by providing the capability to:Safely Restructure, Recompose, and Redefine your FSMs and their run sequence at runtime.Adaptive Systems: Implement sophisticated AI that dynamically reorganizes its own logic flow, or even load entire new behavior sets from external sources (like a .dll) and map them to appropriate states, all while the game is running.This results in incredibly decoupled yet fully interoperable behaviors.🛠️ Simplicity with Power: The 4-Step SetupAccessing this advanced control is intentionally simple. The complexity of loop management is contained within the provided Prefab, allowing you to focus on logic using our Fluent FSM Builder.Drag Prefab into the Hierarchy.Assign a Root GameObject to your environment and assign this to the Root field of the Prefab.Define your Process Groups for each Unity Message (e.g., Update, FixedUpdate, OnPreRender, or custom events).Define your FSMs using the FSM_API's Fluent FSMBuilder.Example: A Simple Light Switch FSMThis FSM is assigned to the Process Group named "Update":c#:private void Awake(){ // Check if the FSM definition already exists if (!FSM_API.Interaction.Exists("LightFSM", "Update")) { // 1. Define the FSM blueprint FSM_API.Create.CreateFiniteStateMachine("LightFSM", 0, "Update") .State("Off", OnEnterOff, null, null) .State("On", OnEnterOn, null, null) .BuildDefinition(); } // 2. Create an instance of the FSM blueprint // 'this' is the context (data model), "Update" is the Process Group it runs in. Status = FSM_API.Create.CreateInstance("LightFSM", this, "Update");}Key Benefits Unlocked by Advanced package:IIndie Developers - Cascading Scale & Future-Proofing: Solve scaling problems before they become bottlenecks. Dedicate resources to content instead of fighting game loop jitter.Professional Teams Seamless Interoperability: A unified, highly decoupled architecture where AI, Physics, and UI teams can work in parallel without causing random performance spikes in other systems.Emergent AI Designers True Intelligence: The ability to safely recompose FSMs at runtime allows you to model truly adaptive and emergent behaviors that static systems simply cannot achieve.Competitive / Networked GamesAbsolute Determinism: Essential for complex networking, replay systems, and competitive play where predictable state execution, independent of a variable frame rate, is paramount.In short, this paradigm changing package is absolutely for anyone wanting more complexity made easy.The Core Engine (Assets/Plugins/TheSingularityWorkshop/)Includes the 45 KB compiled FSM_API.dll (the core logic).Integration & Quickstart (Assets/TheSingularityWorkshop/FSM_API/)Prefabs/: FSM_UnityIntegrationAdvanced.prefab (The Runtime Manager for Editor configuration).Scenes/: ReadyToUseEmptyAdvancedScene.unity (A pre-configured scene with the FSM Manager and Root Game Object set up for immediate development).Scripts/: FSM_UnityIntegrationAdvanced.cs (The C# source code for the Integration layer, demonstrating Unity Message marshalling).Advanced Samples (Assets/TheSingularityWorkshop/...Demos~/)Includes fully commented samples : SimpleLight - Shows how to construct an FSM for a light switch. SimpleRotationDemo - Shows how to create a POCO Context to rotate a game object.SimpleScaleDemo - Shows how to create a POCO Context to scale a game object.SimpleTranslationDemo - Shows how to create a POCO Context to Translate a game object.SimpleRotationScalarTranslationDemo - Combines all three motions to drive the game object.Comprehensive Documentation ManifestWe've worked hard to deliver a unified educational resource, available in both Markdown and PDF formats.User Guide (Implementation Focused)00_Introduction.md: Package setup and high-level overview.01_Core_Concepts.md: Explaining FSM Definitions vs. FSM Instances and the Context Pattern.02A_Getting_Started_Unity_Advanced.md: The detailed 4-step quickstart guide.04_FSM_Builder_Deep_Dive.md: Comprehensive guide on the Fluent API pattern.06_FSM_Modifier_Deep_Dive.md: The technical documentation for Runtime Recomposition and FSM modification.08_Performance_Tips.md: Advanced configurations for achieving deterministic performance.11_FAQ.md: Collection of common questions and solutions.Theoretical & Architectural Deep DiveTheory/01_What_Are_FSMs.md: Foundational theory and academic overview.Theory/03_Advantages_And_Disadvantages.md: Honest breakdown of FSM limitations and how this API addresses them.Technical/FSM_CoreClassRelationships.md: Detailed technical class relationship documentation.Technical/StepSequencing.md: Technical deep dive into the FSM Process Group execution model.I use Gemini to generate images, to help coordinate the documentation and to create markdown from my drafts, along with help sifting through information such as documentation.