Dan Milward Posted February 10, 2015 Share Posted February 10, 2015 What is an ECS? An ECS allows game objects to perform custom operations without any additional manager code. In an ECS, all objects in a game world are represented as entities; their properties are represented as components; and the game has systems to update entities and components. Yes. So why am I posting this?Because we've just overhauled entities in kiwi.js and written up quite a big post on it. Take a squiz... let me know what you think http://www.kiwijs.org/2015/02/kiwijs-v1-2-0-entity-component-system/ Quote Link to comment Share on other sites More sharing options...
Rezoner Posted February 11, 2015 Share Posted February 11, 2015 While you have implemented a good composition over inheritance paradigm here this line bothers me a little > and the game has systems to update entities Because in your architecture the logic has been moved from systems to components. Wikipedia: Component: the raw data for one aspect of the object (...)System: "Each System runs continuously (as though each System had its own private thread) and performs global actions on every Entity that possesses a Component of the same aspect as that System." And by the aspect we can understand a mask made out of components - for example - system Movable has a mask reflecting Velocity and Position (components).Then it loops through all the entities and if they have Velocity and Position components - the logic from that system (Movable) is applied. Anyway - take my point with a pinch of salt as I don't have enough experience with this approach to tell if it will scale well (especially in terms of decoupling). ref: http://www.gamedev.net/page/resources/_/technical/game-programming/understanding-component-entity-systems-r3013 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.