Haxeflixel use case; ECS?
I tried (twice) making an entity-component system with HaxeFlixel; it always seems like I'm fighting the architecture -- FlxObject, FlxSprite, etc. just have loads of properties (position, velocity, image, etc.) and are "supposed" to be used as the building-blocks of monolithic classes?
I don't know if I'm getting it. Can someone provide a non-trivial (like non-demo) version of a game that shows how HaxeFlixel is supposed to be used, and/or architected?
I came up with this idea of a ECS engine built on HaxeFlixel, which means HF would run as an underlying system for rendering, updating and other processes.
Inside the engine,
Entitieswould be mapped to a
FlxObjectof their own. When a component data was changed, the new data would be copied to the
FlxSpritemapped to its
For example, we have an
Positioncomponent which stores 2 values
y, if any of them is set to a new value, the position of the
FlxSpriteis also changed. Same thing for othe concepts.
All of this happens under the hood so the users virtually don't know of the HaxeFlixel API at all but indirectly through the API of this ECS engine.