Search Unity

DOTS Stats system

Discussion in 'Entity Component System' started by Sinyavtsev, Aug 23, 2021.

  1. Sinyavtsev

    Sinyavtsev

    Joined:
    Feb 29, 2016
    Posts:
    8
    Hi everyone!

    I want to share one interesting thing with you.

    Let's say your game has such classic things as character stats, buffs, items, abilities, and so on ...
    Usually, to implement them (even using ecs), programmers use the oop approach and create base abstract classes for each thing: for example BuffBase, ItemBase, AbilityBase, and so on ...
    The result is a rather cumbersome and complex system, the parts of which are slightly different, and somehow clumsily interact with each other.
    As soon as it becomes necessary to add something, everything turns into one big mess...

    So i wanted to solve this problem and created a DOTS Stat system which isolates only the target aspect from these concepts, and works with it directly using a poor component approach.

    Features
    • Maximum flexibility.
    • High performance. Zero GC allocations.
    • 100% ECS-ish.
    • Ready-made base Authoring components for customization in the editor
    • Supports multiplying and additive stats
    • The minimum amount of boilerplate code.
    • Compatible with burst.
    • Compatible with il2cpp.

    How it works under the hood



    Feedback

    I would be very happy guys if you give some feedback to me!
    You can check the package on the Github page.
     
    Last edited: Aug 23, 2021
    Neiist, bb8_1, Dre0Dru and 14 others like this.