{"author_link":"\/users\/holgk","author_name":"holgk","author_uid":"holgk","comments":[],"epoch":1493999648,"event":"LD38","format":"md","ldjam_node_id":30276,"likes":3,"metadata":{"p_key":"92865","p_author":"holgk","p_authorkey":"1000342","p_urlkey":"305783","p_title":"For Eternity (Post Mortem)","p_cat":"LDJam ","p_event":"LD38","p_time":"1493999648","p_likes":"3","p_comments":"0","p_status":"WAYBACK","us_key":"1000342","us_name":"holgk","us_username":"holgk","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":2,"author":342,"body":"![For Eternity Logo.jpg](\/\/\/raw\/651\/z\/281a.jpg)\n\nIf you didn't tried out my entry [here](https:\/\/ldjam.com\/events\/ludum-dare\/38\/for-eternity) is a link to [For Eternity](https:\/\/ldjam.com\/events\/ludum-dare\/38\/for-eternity).\n\n![For Eternity Screen 2.jpg](\/\/\/raw\/651\/z\/2a9f.jpg)\n\nLet's start with the ugly things so we can end with some positve. :wink:\n\n#### The Ugly\nThis time i had some ugly things to deal with. In the past i never had to deal with crashes or other problem beyond just bad performance. But this time was different! I used a seperate thread for pathfinding in my game and this was my first time using custom multithreading inside a ld entry. And yes i did the most obvious mistake you can do when you write multithreaded code. **I wrote code that wasn't thread safe at all!** :sob: But before i was able to fix that i had to reimport all my models because all my models were missing inside my unity cloud build. So what went wrong there? A short (actually longer) google search informed me that clod build doesn't have support for automatic light baking with that info i came to the conclusion that cloud build doesn't have support for my Cinema4d files. So i reimported all my models as fbx files and baked the lightmap and now cloud build was working. With that working build pipline i recognized my stupid mistake of having a not thread safe pathfinding code. So i fixed that mistake and thought now every thing is fine. :laughing: **Oh boy was i wrong!** The real pain in my as* just started. I played my game a couple of times and had no problem at all. Even a buddy of mine tested it and had no problem too. But the first comments that i got were telling me that the game freezes occasionally. So i did some more testing and couldn't find the problem. I looked into my code because i thought i missed something while i was making my pathfinding code thread safe. But i couldn't figgure it out (there was no bug in pathfinding anymore). So i asked those who experienced this problem to help me. And thanks to @automatonvx (Thank you!) i was able to replicate this freezing behaviour. But it took me hours to narrow it down to a while loop, that under some special conditions, i send into a infinity loop and that was causing the freeze. So that was the ugly part my story how i made my game playable.\n\n#### The bad\nSo after the ugly what's left for the bad, you might asking yourself? Here comes the stroy of the jam. After the announcement of the theme i went into bed. I had no idea what kind of game i should make. The theme hit me by surprise. So i woke up and thought a city builder like \"Paraoh\" would be a nice idea maybe a little challenging but i was fine with that. I totally underestimated the scope of such a game. This resulted that i ran out of time at the end of the jam. I had no time to create a proper ingame tutorial, the price calculation for goods is just a random value betwin a min and max price, there isn't a event system with some random events, there is no music and only a few sound effects, the caravan isn't animated and the whole game isn't balanced at all in particular the quality of life system.\n\n#### The good\nI'm very pleased with the look of the graphics espacially the look of the ui. But the thing i'm most proud of is the underlying structure. That's the reason i ended up with something that is actually  playable and fun. The world generator is pretty good for something that's created in just a few hours. The building system, goods and the ai are all modular and flexible. So it was pretty easy to create more and more buildings and goods. I used a very modular and reusable approach towards the ai and it payed off very well. Only because of this decision i was able to create a city building game in the given time. Even though i had more plans of features, i allways knew that i wouldn't be able to implement them all, i'm pleased and happy with the game [For Eternity](https:\/\/ldjam.com\/events\/ludum-dare\/38\/for-eternity) became.\n\n![For Eternity Screen 3.jpg](\/\/\/raw\/651\/z\/2aa2.jpg)","comments":1,"comments-timestamp":"2017-05-05T16:40:01Z","created":"2017-05-05T13:15:03Z","files":[],"files-timestamp":0,"id":30276,"love":3,"love-timestamp":"2017-05-05T17:48:41Z","meta":[],"modified":"2017-05-05T17:48:41Z","name":"For Eternity (Post Mortem)","node-timestamp":"2017-05-05T15:55:24Z","parent":27699,"parents":[1,5,9,9405,27699],"path":"\/events\/ludum-dare\/38\/for-eternity\/for-eternity-post-mortem","published":"2017-05-05T15:54:08Z","scope":"public","slug":"for-eternity-post-mortem","subsubtype":"","subtype":"","type":"post","version":79259},"node_metadata":{"n_key":"30276","n_urlkey":"305783","n_parent":"27699","n_path":"\/events\/ludum-dare\/38\/for-eternity\/for-eternity-post-mortem","n_slug":"for-eternity-post-mortem","n_type":"post","n_subtype":"","n_subsubtype":"","n_author":"342","n_created":"1493990103","n_modified":"1494006521","n_version":"79259","n_status":"WAYBACK"},"source_url":"https:\/\/ldjam.com\/events\/ludum-dare\/38\/for-eternity\/for-eternity-post-mortem","text":"![For Eternity Logo.jpg](\/\/\/raw\/651\/z\/281a.jpg)\n\nIf you didn't tried out my entry [here](https:\/\/ldjam.com\/events\/ludum-dare\/38\/for-eternity) is a link to [For Eternity](https:\/\/ldjam.com\/events\/ludum-dare\/38\/for-eternity).\n\n![For Eternity Screen 2.jpg](\/\/\/raw\/651\/z\/2a9f.jpg)\n\nLet's start with the ugly things so we can end with some positve. :wink:\n\n#### The Ugly\nThis time i had some ugly things to deal with. In the past i never had to deal with crashes or other problem beyond just bad performance. But this time was different! I used a seperate thread for pathfinding in my game and this was my first time using custom multithreading inside a ld entry. And yes i did the most obvious mistake you can do when you write multithreaded code. **I wrote code that wasn't thread safe at all!** :sob: But before i was able to fix that i had to reimport all my models because all my models were missing inside my unity cloud build. So what went wrong there? A short (actually longer) google search informed me that clod build doesn't have support for automatic light baking with that info i came to the conclusion that cloud build doesn't have support for my Cinema4d files. So i reimported all my models as fbx files and baked the lightmap and now cloud build was working. With that working build pipline i recognized my stupid mistake of having a not thread safe pathfinding code. So i fixed that mistake and thought now every thing is fine. :laughing: **Oh boy was i wrong!** The real pain in my as* just started. I played my game a couple of times and had no problem at all. Even a buddy of mine tested it and had no problem too. But the first comments that i got were telling me that the game freezes occasionally. So i did some more testing and couldn't find the problem. I looked into my code because i thought i missed something while i was making my pathfinding code thread safe. But i couldn't figgure it out (there was no bug in pathfinding anymore). So i asked those who experienced this problem to help me. And thanks to @automatonvx (Thank you!) i was able to replicate this freezing behaviour. But it took me hours to narrow it down to a while loop, that under some special conditions, i send into a infinity loop and that was causing the freeze. So that was the ugly part my story how i made my game playable.\n\n#### The bad\nSo after the ugly what's left for the bad, you might asking yourself? Here comes the stroy of the jam. After the announcement of the theme i went into bed. I had no idea what kind of game i should make. The theme hit me by surprise. So i woke up and thought a city builder like \"Paraoh\" would be a nice idea maybe a little challenging but i was fine with that. I totally underestimated the scope of such a game. This resulted that i ran out of time at the end of the jam. I had no time to create a proper ingame tutorial, the price calculation for goods is just a random value betwin a min and max price, there isn't a event system with some random events, there is no music and only a few sound effects, the caravan isn't animated and the whole game isn't balanced at all in particular the quality of life system.\n\n#### The good\nI'm very pleased with the look of the graphics espacially the look of the ui. But the thing i'm most proud of is the underlying structure. That's the reason i ended up with something that is actually  playable and fun. The world generator is pretty good for something that's created in just a few hours. The building system, goods and the ai are all modular and flexible. So it was pretty easy to create more and more buildings and goods. I used a very modular and reusable approach towards the ai and it payed off very well. Only because of this decision i was able to create a city building game in the given time. Even though i had more plans of features, i allways knew that i wouldn't be able to implement them all, i'm pleased and happy with the game [For Eternity](https:\/\/ldjam.com\/events\/ludum-dare\/38\/for-eternity) became.\n\n![For Eternity Screen 3.jpg](\/\/\/raw\/651\/z\/2aa2.jpg)","title":"For Eternity (Post Mortem)","wayback_source":[]}