Entity-Component Implementation/Library

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
User avatar
Kingdaro
Party member
Posts: 395
Joined: Sun Jul 18, 2010 3:08 am

Entity-Component Implementation/Library

Post by Kingdaro »

This project/library/demo/whatever you want to call it was created out of interest in the entity-component system game design pattern. Composition is the concept of, instead of having a class extend other classes, have an entity that is made up of individual components that describe its behavior.

As this is one of my first libraries, any comments or suggestions are much appreciated on how I can improve the implementation and/or its API. Anyone is free to use this in any project they please.

GitHub page: https://github.com/Kingdaro/love-ecs
User avatar
Snuux
Prole
Posts: 49
Joined: Sun Dec 15, 2013 10:43 am
Location: Russia, Moskow
Contact:

Re: Entity-Component Implementation/Library

Post by Snuux »

Excellent! Please, add more features. It's very useful. Thanks!
My library for easy saving Slib! Try this! Now you can encrypt your save!
- Drop of light LD#30
- OUTRANGE LD#31
(Sorry for my english. I learn it myself, and I don't have enough experience)
User avatar
ejmr
Party member
Posts: 302
Joined: Fri Jun 01, 2012 7:45 am
Location: South Carolina, U.S.A.
Contact:

Re: Entity-Component Implementation/Library

Post by ejmr »

I have no major suggestions for the implementation itself; that all looks good. But to help people use the library I do suggest adding an explicit license, thorough documentation of the API, and a test suite. Middleclass is a nice example of how a test suite can also serve as a good source of self-documenting code for a library. Having such documentation, in any form, is also useful for whenever you decide to break backwards-compatibility; it’s never fun to update a library only to see it stop working because of an undocumented API change.

All that said, great-looking work! :awesome:
ejmr :: Programming and Game-Dev Blog, GitHub
南無妙法蓮華經
User avatar
Kingdaro
Party member
Posts: 395
Joined: Sun Jul 18, 2010 3:08 am

Re: Entity-Component Implementation/Library

Post by Kingdaro »

Snuux wrote:Excellent! Please, add more features. It's very useful. Thanks!
Thank you! Were there any features you had in mind, specifically?
ejmr wrote:I have no major suggestions for the implementation itself; that all looks good. But to help people use the library I do suggest adding an explicit license, thorough documentation of the API, and a test suite. Middleclass is a nice example of how a test suite can also serve as a good source of self-documenting code for a library. Having such documentation, in any form, is also useful for whenever you decide to break backwards-compatibility; it’s never fun to update a library only to see it stop working because of an undocumented API change.

All that said, great-looking work! :awesome:
Thanks! The main reason I said that was that I was mainly concerned with the lack of consistency in object usage, but if everyone is fine with how it works, I can consider my goal accomplished. :awesome:

Also, thanks for the tips. I'll see if I can get a test pumped out for the library, and adding a license would be a good idea as well.

EDIT: Finished the licensing and tests.
User avatar
Kingdaro
Party member
Posts: 395
Joined: Sun Jul 18, 2010 3:08 am

Re: Entity-Component Implementation/Library

Post by Kingdaro »

Added a StateManager object, used to emulate gamestates using engines. Because of this change, I also made it so that engines can have their own event listeners, for when you want to listen to events without acting on entities using systems.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 2 guests