An Entity Component System framework based on Cocos2d-x, now the supported version is 3.2 alpha0.
Put the genius-x directory to the root directory of your project, and then add genius-x/build/genius-x.xcodeproj to your project. Now it's only suppoert XCode, but we should support Windows soon.
- based on the Origin Entity Component System idea(Decoupbe the system from component,this make it diff from Component-based design).
- automatic attching system to Entity,you only need concern component.So,
- it's data-driven.
- better performance,we make every Entity has it's own System instance,but still keep auto-attaching,you do not need care about System.
- lua and javascript binding support.(progress....)
- system ordered.
- create an Entity: ECSmanager::createEntity();
- create you own Component which should be a subclass of ECS::Component , such as 'MyComponent'
- create you System which should be a subclass of ECS::System
- init the ECSManager: auto ecs=new ECSManager();
- put all your system: ecs->addSystem(mySystem);
- add component to Entity: ecs->addComponentToEntity(myComponent,myEntity);
- call the update methed of ECSManager in your gameloop, such as the visit or update method of HelloWorldScene.
- that's it!
you may leave a message at my blog: http://genius-x.org