Just for the heck of learning about ECS and how it works, I have been trying to integrate EntityX with Urho3D.
I’m presenting my work here as a way to learn, improve, and hopefully help others with the work.
The Github repo that I’m sharing is supposed to duplicate (and extend) the First Project.
With the ECS integration, creating a box looks like so:
auto box = CreateRenderableEntity("Box"); box.assign<StaticModel>("Models/Box.mdl", "Materials/Stone.xml"); box.assign<Position>(0, 2, 15); box.assign<Direction>(); // So that we can apply angular velocity box.assign<Scale>(3, 3, 3); box.assign<AngularVelocity>(10, 20, 0); // Rotates the box
The full Demo scene setup code can be seen here.
I’m not fully happy with the structure of how things are glued, and I’m looking into how to refactor the code so that it’s cleaner. Let me know if you have any suggestions around that.
Constructive criticism is always welcome! Let me know what you think.