{"repo":"Adam4lexander/Spoke","free":true,"listed":false,"github":"https://github.com/Adam4lexander/Spoke","clone":"git clone https://github.com/Adam4lexander/Spoke.git","description":"Spoke is a tiny declarative reactivity engine for Unity.","language":"C#","stars":51,"topics":["architecture","csharp","declarative","ecs","game-dev","gameplay","open-source","reactive","reactivity","simulation"],"license":"MIT","category":"game-templates","readme_excerpt":"🔘 Spoke - A reactive framework for Unity Spoke is a reactive framework for Unity that turns tangled event-driven logic into clear, composable, top-to-bottom code. Games are full of long-lived behaviours managed by symmetric Setup/Teardown functions: - OnEnable / OnDisable - Awake / OnDestroy - OnEnemyDetected / OnEnemyLost - OnLaserStart / OnLaserEnd Even OnValueChanged handlers fit the pattern: teardown for the old value, setup for the new. Sometimes they're wired up with events, sometimes with polling and diff-checking in Update() . Either way, the symmetry is maintained by hand, and bugs slip through. For example, an enemy is destroyed while shooting its laser beam, and the beam is left hanging in the scene because nothing cleaned it up. In Spoke, these long-lived behaviours are modelled as localised blocks in a tree, where setup, reaction and cleanup are co-located in one function body. Lifecycle bugs are easy to avoid, the code becomes simpler to reason about and extend, and event-driven behaviour ends up feeling as straightforward as imperative code. - ✨ Control complexity — event-driven logic stays local and readable - 🧪 Use anywhere — adopt it in one script, one system, or a whole project - 🪶 Lightweight — 2,800 lines of plain C#, zero dependencies, unit-tested, MIT --- ⚡ Example Show a HUD over the nearest enemy. 🟧 Vanilla Unity: 🟦 Spoke: The Spoke version reads top to bottom: if there is no nearest enemy, do nothing. Otherwise spawn a HUD, and destroy it when t","default_branch":null,"files":null,"tree":[],"storefront":"/r/Adam4lexander","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Adam4lexander/Spoke/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}