{"author_link":"\/users\/sri-harsha-chilakapati","author_name":"Sri Harsha Chilakapati","author_uid":"sri-harsha-chilakapati","comments":[],"epoch":1492865633,"event":"LD38","format":"md","ldjam_node_id":21956,"likes":0,"metadata":{"p_key":"87920","p_author":"Sri Harsha Chilakapati","p_authorkey":"1000629","p_urlkey":"300351","p_title":"First break: I have an ECS and a coffee","p_cat":"LDJam ","p_event":"LD38","p_time":"1492865633","p_likes":"0","p_comments":"0","p_status":"WAYBACK","us_key":"1000629","us_name":"Sri Harsha Chilakapati","us_username":"sri-harsha-chilakapati","event_start":"1492732800","event_key":"69","event_name":"LD 38"},"node":{"_collation":{"body_sanitizer":"TextUtils::SanitizeHTML via existing importer","event":"LD38","removed_author":false},"_superparent":9405,"_trust":1,"author":629,"body":"I did start late, but I think I have got enough progress in just three hours. Instead of jumping on the game directly I started working on my existing engine, and began implementing an Entity Component System that mimics the Unity API. Pretty damn good!!\n\n~~~java\nscene.forEachEntityWithComponent(SpriteComponent.class, e ->\n        e.forEachComponentOfType(SpriteComponent.class, c ->\n        {\n            final Sprite    sprite    = c.sprite;\n            final Color     tint      = c.tint;\n            final float     opacity   = c.opacity;\n            final int       layer     = c.layer;\n            final Transform transform = e.transformComponent.getWorldTransform();\n\n            batch.render(sprite, transform, tint, opacity, layer);\n        }));\n~~~\n\nThere are still some small imperfections with it, like the Collision system is out of sync with the Transform in the scene, off by a few pixel units, but it's working!!\n\n## LD #38 game plan\n\nEngine needs update, scenes and systems, finish that off by tonight.\n\n  - [`x`] TransformComponent\n  - [`x`] SpriteComponent\n  - [`x`] CollisionComponent\n  - [`x`] PolygonRenderComponent _# For drawing polygons, debugging_\n\nUpdate system is already implemented, work on rendering system and collision system. Most of the base code is already present.\n\n  - [`x`] CollisionSystem\n\n> Should start by simply finding all the entities in the scene that have a\n> CollisionComponent, add them to the dynamic tree or whatever is selected as\n> the broadphase. Retrieve collisions and report them.\n\n  - [` `] RenderingSystem\n\n> Should start rendering the scene, by selecting the renderers automatically.\n> The process is binding a Empty texture first\n> Find all sprites, sort them into batches and execute the batches\n> Mesh renderings, Camera components will come in next engine update\n\nRelease the engine with a new version.\n\n## Plan for tomorrow, i.e., 22\/4\/2017\n\nWork on the game, think up on the idea. Maybe uhm.. not sure\n\n## Can I leave some site feedback here?\n\nI really like the formatting options, especially that now you have enabled Markdown and strike off ~WordPress~, but one thing:\n\n  1. I don't know what syntax highlighter you're using but it is not highlighting some keywords in code snippets of Java language.\n\nThat's not really necessary, I know that you are very busy making this run smoothly, but it would be great to have. Thanks a lot for this, I'm enjoying a lot, and I hope everyone else is enjoying too.","comments":0,"created":"2017-04-22T12:33:34Z","files":[],"files-timestamp":0,"id":21956,"love":0,"meta":[],"modified":"2017-04-22T12:53:53Z","name":"First break: I have an ECS and a coffee","node-timestamp":"2017-04-22T12:53:53Z","parent":21155,"parents":[1,5,9,9405,21155],"path":"\/events\/ludum-dare\/38\/planetdefense\/first-break-i-have-an-ecs-and-a-coffee","published":"2017-04-22T12:53:53Z","scope":"public","slug":"first-break-i-have-an-ecs-and-a-coffee","subsubtype":"","subtype":"","type":"post","version":29020},"node_metadata":{"n_key":"21956","n_urlkey":"300351","n_parent":"21155","n_path":"\/events\/ludum-dare\/38\/planetdefense\/first-break-i-have-an-ecs-and-a-coffee","n_slug":"first-break-i-have-an-ecs-and-a-","n_type":"post","n_subtype":"","n_subsubtype":"","n_author":"629","n_created":"1492864414","n_modified":"1492865633","n_version":"29020","n_status":"WAYBACK"},"source_url":"https:\/\/ldjam.com\/events\/ludum-dare\/38\/planetdefense\/first-break-i-have-an-ecs-and-a-coffee","text":"I did start late, but I think I have got enough progress in just three hours. Instead of jumping on the game directly I started working on my existing engine, and began implementing an Entity Component System that mimics the Unity API. Pretty damn good!!\n\n~~~java\nscene.forEachEntityWithComponent(SpriteComponent.class, e ->\n        e.forEachComponentOfType(SpriteComponent.class, c ->\n        {\n            final Sprite    sprite    = c.sprite;\n            final Color     tint      = c.tint;\n            final float     opacity   = c.opacity;\n            final int       layer     = c.layer;\n            final Transform transform = e.transformComponent.getWorldTransform();\n\n            batch.render(sprite, transform, tint, opacity, layer);\n        }));\n~~~\n\nThere are still some small imperfections with it, like the Collision system is out of sync with the Transform in the scene, off by a few pixel units, but it's working!!\n\n## LD #38 game plan\n\nEngine needs update, scenes and systems, finish that off by tonight.\n\n  - [`x`] TransformComponent\n  - [`x`] SpriteComponent\n  - [`x`] CollisionComponent\n  - [`x`] PolygonRenderComponent _# For drawing polygons, debugging_\n\nUpdate system is already implemented, work on rendering system and collision system. Most of the base code is already present.\n\n  - [`x`] CollisionSystem\n\n> Should start by simply finding all the entities in the scene that have a\n> CollisionComponent, add them to the dynamic tree or whatever is selected as\n> the broadphase. Retrieve collisions and report them.\n\n  - [` `] RenderingSystem\n\n> Should start rendering the scene, by selecting the renderers automatically.\n> The process is binding a Empty texture first\n> Find all sprites, sort them into batches and execute the batches\n> Mesh renderings, Camera components will come in next engine update\n\nRelease the engine with a new version.\n\n## Plan for tomorrow, i.e., 22\/4\/2017\n\nWork on the game, think up on the idea. Maybe uhm.. not sure\n\n## Can I leave some site feedback here?\n\nI really like the formatting options, especially that now you have enabled Markdown and strike off ~WordPress~, but one thing:\n\n  1. I don't know what syntax highlighter you're using but it is not highlighting some keywords in code snippets of Java language.\n\nThat's not really necessary, I know that you are very busy making this run smoothly, but it would be great to have. Thanks a lot for this, I'm enjoying a lot, and I hope everyone else is enjoying too.","title":"First break: I have an ECS and a coffee","wayback_source":[]}