Flexi - Unity Gameplay Ability System Framework

Flexi - Unity Gameplay Ability System Framework

GitHub
Discord

  • This project is still work-in-progress
    :sparkle::sparkle::sparkle::sparkle::sparkle::sparkle::sparkle::sparkle::sparkle::white_large_square: 90%
  • Though still in development, it’s usable and already worked on a real project. Feel free to pick a tag version and try a small project, and join the Discord to discuss if any problem.

What is Flexi?

Flexi is an ability system framework for Unity.

The basic concept is:

  • Flexi has done some general low-level logic.
  • Programmers can directly jump into extend with Flexi, and create your gameplay ability system.
  • Then designers can use the graph view editor to create/edit ability.
  • At runtime, load these abilities and run with built-in runner.

P.S. Flexi is inspired from Unreal GAS (Gameplay Ability System), but not the same concept.

Features

  • Customizable: Flexi only do low-level things. So you have space to implement your own gameplay.
  • Stat & Modifier: With stat refresh process, modify unit stats with abilities.
  • Built-in ability runners: Start from easy and not make your hands dirty.
  • Node-based ability editor: Built with GraphView and UIToolkit.
  • OOP approach: Not rely on Unity. Not singleton approach.
  • Macro: Reuse your partial graphs (Failed to find GC free approach. Suspend until main feature finished.)

Flexi EditorCard Game Sample 1

Real-Time Sample 1

Installation

Download repository and Export unitypackage

  1. Donwload and unzip. Choose the latest tag for stable state.
  2. Open this Unity project. (Dev in 2021.3)
  3. Export the package with Tools/Export UnityPackage. This excludes unnecessary assets.
  4. It will show you the result package, then you can import this to your project.

Resources

Limitations

  • Not support DOTS. (This is full OOP approach.)
  • It’s a tool for programmers. Recommend to have experienced programming skill.

TODO List

  • Doc
  • Finish Macro
  • Undo/Redo
  • Better Samples
  • ListView for blackboard might easily broken. (Layout update is struggling to process current layout)
1 Like

Update 01/13/2023

  • Initial implementation for tick-based (real-time) usage
  • Sample of action and recast mechanic

Update 06/06/2023
v0.9

  • Icons & USS
  • Organized projects and include samples
  • Able to create ability pools
  • Support multiple flows and multiple entry nodes
  • Way to implement custom stat refresh rule
  • Reduce GC issue (For now, about 40B per ability run from Context allocation)

Update 02/02/2025
v0.12.1

From previous update (long time ago) until now:

  • Bring Flexi into real production, create a game, and validate its usage.
  • Keep improving features, fixing bugs and performance issues. Make a stable v0.11. (Treat as v1 version)
  • After that game project, to improve the user experiences, modify lots of API and object concept. Now it’s v0.12 (Treat as v2 version).
  • Every I can show looks the same…

Next:

  • Working on new docs
  • Better Samples to fulfill real production usage

Update 02/06/2025
v0.13.0

Writing quickstart tutorials, and modifing some APIs and types which didn’t design well.

  • Seperate IFlexiCoreWrapper to IFlexiEventResolver and IFlexiStatRefreshResolver
  • Create new ModifierNode to distinguish from ProcessNode
  • Generic for IResumeContext
  • StatModifier support enum statId parameter
  • Editor save notification