{"author_link":"\/author\/brianbruggeman\/","author_name":"brianbruggeman","author_uid":"34227","comments":[{"author_name":"xgeovanni","author_uid":"11296","time":"Aug 24, 2015 @ 4:29pm","epoch":1440433440,"text":"An unorthodox entry.\r<br\/>\r<br\/>Having &quot;factory&quot; classes and that sort of thing isn't very Pythonic. The docstrings are nice but it could do with a few more comments.\r<br\/>\r<br\/>I might use this some time and return better feedback, that's just what stood out from skimming the code.\r<br\/>\r<br\/>I might"},{"author_name":"triplefox","author_uid":"391","time":"Aug 26, 2015 @ 9:22am","epoch":1440580620,"text":"ECS in a dynamic language like Python tends to involve a redundant approach to architecture. You can already access the raw fields and check for existence. The only thing you need on top of that is something to maintain a global indexing of same-type fields. And then once you pursue that road further, and try to add more integrity constraints, you drift towards implementing a relational database, or at least some subset of one. If you want a game engine that is maximally data-driven, try writing all data in BCNF form. (You can spend well over a week thinking about how to implement a clickable GUI button, doing this.)\r<br\/>\r<br\/>If you want to continue focusing on architecture from a performance angle I recommend thinking about how your system will treat memory allocation as that is the main thing separating &quot;great&quot; entity systems from &quot;good enough&quot; ones; zero runtime allocation is a good goal. If the entity system ends up being worse than just hand-rolling allocation strategies for each piece of data in the game, it loses by default.\r<br\/>\r<br\/>Bottom line, though: you will get more done in gamedev, especially in game-jam scenarios, by writing a single large main loop that does everything in a semi-customized fashion. It is inelegant and CS Professors Hate It, but it has the result of making the code more like an art asset - fluid, easy to change, easy to toggle or cut bits out, or make one-off variations."},{"author_name":"brianbruggeman","author_uid":"34227","time":"Aug 27, 2015 @ 6:11am","epoch":1440655560,"text":"Thanks for the feedback guys!\r<br\/>\r<br\/>@xgeovanni - I'll be adding more examples in the near future.  Factory is really for fast\/simple generation of a component.  My first example avoids the use of the factory and uses the Component class a more traditional sense.\r<br\/>\r<br\/>@triplefox - My goal was to make the interface easy to understand and use for rapid development.  But I appreciate the constraints and considerations you've mentioned."},{"author_name":"foxor","author_uid":"9290","time":"Aug 27, 2015 @ 1:55pm","epoch":1440683400,"text":"Seems like a start to a potentially useful project, but ATM it doesn't do enough to be worth the overhead.\r<br\/>\r<br\/>Next steps seem to be things like adding a serialization engine, visual editor, asset importer, graphics pipeline and all the various parts necessary to support the &quot;drawing system&quot;.\r<br\/>\r<br\/>Python totally needs better game engines!"},{"author_name":"LegacyCrono","author_uid":"3093","time":"Aug 28, 2015 @ 10:39pm","epoch":1440801240,"text":"Hmm, not sure how to rate this. What an unusual entry :P\r<br\/>I don't use Python for gamedev but I can see this being quite useful, you should work on it and release for the community to use in the next LD. Good job!"},{"author_name":"colinn","author_uid":"57626","time":"Aug 29, 2015 @ 12:56am","epoch":1440809460,"text":"I rated this fairly high since as a programmer I really enjoy looking at different architectures"},{"author_name":"El Cabaro","author_uid":"22640","time":"Aug 29, 2015 @ 4:17am","epoch":1440821520,"text":"Like others have said, what an unorthodox entry. I kinda dig it."},{"author_name":"hate-marina","author_uid":"26068","time":"Aug 29, 2015 @ 9:50am","epoch":1440841500,"text":"Looks pretty JAVA-ish, but it's okay, carry on :D"},{"author_name":"lanestp","author_uid":"49246","time":"Aug 30, 2015 @ 2:04pm","epoch":1440943140,"text":"Thats actually a nice little library. For a game jam having a prebuilt ECS would be really nice, esp. in Python. The problem with languages like Python is they put you into patterns that don't work all that well for Gamedev. In a gamejam scenario almost any reasonable sacrifice in performance is acceptable as long as it makes development faster."}],"images":["ld33\/34227-0018234f2a9e3279b618ca541fb24d61.jpg"],"links":[{"url":"http:\/\/learnpythonandmakegames.github.io\/ecs","text":"Source"}],"metadata":{"g_key":"8587","g_author":"34227","g_event":"LD33","g_eventkey":"29","g_subevent":"JAM","g_urlkey":"8620","g_title":"ECS in Python","g_status":"UCHK1","g_place":"99999","g_commentcount":"9","g_site2_node_id":"0","g_hide":"N","g_has_icon":"Y","g_rqueue":"0","g_random":"0"},"nds":[],"node":null,"orig_images":["http:\/\/ludumdare.com\/compo\/wp-content\/compo2\/\/479518\/34227-shot0-1440517168.png-eq-900-500.jpg"],"text":"I didn't have much time at all to do anything.  So I implemented an Entity Component System that I think is pretty close to what might be needed for someone just getting started with ECS.  I think there's room for improvement, and I'll certainly update more later.\r\n\r\n","title":"ECS in Python"}