{"assets":[],"author_link":"author\/jolle\/","author_name":"jolle","cat":"LD #12 - The Tower - 2008","categories":["LD #12 - The Tower - 2008"],"comments":[],"epoch":1218544320,"event":"LD12","likes":0,"metadata":{"p_key":"76273","p_author":"jolle","p_authorkey":"0","p_urlkey":"284036","p_title":"The Tower of You \u2013 Postmortem","p_cat":"LD #12 - The Tower - 2008","p_event":"LD12","p_time":"1218544320","p_likes":"0","p_comments":"0","p_status":"WAYBACK","us_key":null,"us_name":null,"us_username":null,"event_start":"1218153600","event_key":"89","event_name":"LD12"},"source_url":"2008\/08\/12\/the-tower-of-you-postmortem\/","text":"<p>For like half of the LDs I\u2019ve participated in I\u2019ve said or thought that I would do a postmortem. But I never got around to it. Thought I\u2019d do a postmortem this time to make up for it. And this time is one of those times that are perfect for postmortems, for several reasons. Like, I almost failed but didn\u2019t. That\u2019s great postmortem material, you know. But still, I\u2019m lazy, so I\u2019ll do the standard postmortem procedure of The Good, The Bad and The Other.<\/p>\n<p>It\u2019s long though, so be warned! <strong>Slightly updated 15th<\/strong>, new text at end.<\/p>\n<p><span id=\"more-3453\"><\/span><strong>The Good<\/strong><\/p>\n<p>The <em>theme<\/em>. The theme had great potential. Lots of space for interpretations, while giving a lot of ideas.<\/p>\n<p>The <em>D programming language<\/em>. I\u2019ve used C++ in all other real LDs, and it\u2019s a language that I know very well. It requires no hesitation of thought when coding in, but it does really nag you in some ways. Especially during 48h compos. Slow compiles. Needs forward declares. Manual include files. Lambdas needing boost. Actually, lots of things needing boost. Clumsy dynamic\/associative arrays. Manual memory management. Those are the things, mainly. Most of those works very well in D. The drawbacks of using D was, though, that I didn\u2019t know the language as well. But that gave me a great opportunity to improve. And less libraries available, more problems with compiler setup and so on, but I set those things earlier, so it didn\u2019t really matter during the compo. Mostly, in the end, I wrote things as I would have written them in (LD) C++, except there were less corners in the way. I\u2019m definitely using D over C++ in upcoming LDs. Then there\u2019s always Python, of course.<\/p>\n<p><em>Hex tiles<\/em>. Tiles are always great. They\u2019re easy to work with, yet providing for many things. I\u2019ve used tiles in all LD games I\u2019ve made except for like one (which didn\u2019t fare so well). But square tiles are a bit boring, and I really wanted to figure all the hex tile stuff out for reasons outside LD, so I thought (once again) this would be a great opportunity to do it. Having figured out the initial indexing and so, which went fairly quickly  (as things do in LDs), it was a pleasure to work with. Just keeping an array of references to the neighbor tiles made almost anything you wanted to do easy. And hex tiles looks interesting, and have potential of looking great. All in all, good from all points of view \u2014 I even learned stuff. Which I usually don\u2019t from tile code.<\/p>\n<p><strong>The Bad<\/strong><\/p>\n<p>The <em>initial idea<\/em>. Not exactly the idea of a tower, and using resources, and expanding land and all that. That is so general it can\u2019t be bad. But in the same way it\u2019s not good without more specific stuff. I spent a lot of time on stuff I later threw out. I can only say that during a large part of the Sunday, I had the same feeling I got when doing my <a href=\"http:\/\/www.ludumdare.com\/compo\/category\/ld10\/?author_name=jolle\">Evening Journey<\/a> entry. It had an idea that gave the idea of OKiness. But when you got right down to it, it didn\u2019t really work. Evening Journey failed and became a non-entry, because I couldn\u2019t really whip up another game in the set up stuff. Fortunately that didn\u2019t happen here. But anyway. The original idea had workers, and you got workers from the land within the tower radius. This was a rather large part of the idea, and was also thematic, based on the Tower of Babel: the idea was that as the tower grew, more people would become interested and join. Then for each worker, you set an action. Like produce resource from land tile, build road or expand tower. First the worker actions were reset each turn, then when that require a lot of work, I let producing of resources stand, but that only made it more obvious that things didn\u2019t work. Then I tried automatic building of the tower at end of turn with all left workers and materials, and then it became even more obvious it wasn\u2019t going to be a game. It was too complex, drained a lot of time, and didn\u2019t work. Lesson: Don\u2019t start with complex. Because if complex doesn\u2019t work, you have wasted lots of time. Better start with simple, and if simple seems to work but isn\u2019t enough, expand it, or if it doesn\u2019t work, throw it away and try another simple.<\/p>\n<p><em>Initial controls.<\/em> This is a bit like the above. Several actions were possible per tile and lots of actions were done in a turn. This required controls for all those cases. First I figured the context info for a tile could have buttons for whatever could be done. Then I got lazy and made it to different keys instead. This got messy though, both code-wise and user-wise. Spent way too much code on it just to throw it all away when I simplified the control scheme later.<\/p>\n<p><em>Testing and Tweaking<\/em>. This is related to the above, too. And some in The Other part comping up. I didn\u2019t have time for any tweaking. For example, the parameters to the landscape generator (written almost first) was never even touched after having got a game running. No balancing, especially in levels. AI could be drastically improved too. And I had no one else test it before I submitted (which provides point below). And so on. This all stems from time issues, which stems from the above points.<\/p>\n<p><em>Non-standard libraries in non-standard bin paths<\/em>. For some reason zlib1.dll was required for running the game exe, but I never noticed. Was simple to fix when reported though.<\/p>\n<p><em>Divide by 0 error<\/em>. Reported by one user, but I have no idea how it can happen. Searching for all divides in my code gives no instances where it should be possible. Which leaves library bugs or compiler bugs. Yeah, D still have some problems in those areas.<\/p>\n<p><em>Documentation<\/em>. I didn\u2019t really have time to write any. I was so tired when it was all done, and I had to get to sleep so I could go to work without problems the next day. Time issue. Complexity kills time. Remember!<\/p>\n<p><strong>The Other<\/strong><\/p>\n<p><em>Graphics<\/em>. The general idea for the graphics I think was great. I really had great plans. But due to time issues the placeholder graphics were left in the release. I just never had the time to redo them. Yet the placeholders didn\u2019t look too crappy. Which is perhaps why it was left in for so long. This is perhaps lesson to make placeholders more ugly so you just have to replace them.<\/p>\n<p><em>The \u2018last minute\u2019 gameplay, controls and AI<\/em>. Having a way too complex UI and \u2018game\u2019 that didn\u2019t work, I did a last minute fix. I used most of the basic stuff, but drastically change controls and rules, and threw in a simple greedy\/random AI. Workers were dropped completely. And instead of producing and consuming resources, the tower simply requires a certain level for a certain level, and the resources were simply set by what land was controlled. Actions were reduced to only one: building. This is mostly road building, but there\u2019s also expanding the fundament at one point, and also, of course, building the tower in the first place. The good thing with this was that it solved the controls. You just had to click where to do your action\/build. This was also the complete turn, so no need to explicitly end the turn. I did most of those before adding an opponent, and by itself it, too, was empty. Naturally. Adding a simple AI helped a lot. But at first you just won by just grabbing as much land as possible and cutting the other player off. So I figured I needed to stop early exploitation like this. This was when the possibility of taking over land was introduced. Based on the tower height and the distance, a simple check was made. Meaning if you expanded widely before having a high enough tower, you could just be cut off. And suddenly there was a game. It was not a great game, and I wasn\u2019t overly happy with it, but I felt it really could do as an entry, and that made me happy. Having looked at the initial reception now afterwards, I\u2019m happily surprised, because it seems better received then I would have thought. I liked it better when replaying it a little today than I did Sunday night before submission. Still, as I mentioned, tweaking never happened. The gameplay has severe limitations. Which is why this isn\u2019t on The Good.<\/p>\n<p><em>Food-photos<\/em>. This is kind of fun, doesn\u2019t take long, but it\u2019s starting to feel like an unnecessary distraction.<\/p>\n<p><em>Preparations<\/em> (not code stuff). I was busy doing other stuff until the actual compo begun. Which means I didn\u2019t shop the day before, so I had to go do that on Saturday. I also forgot to buy everything I needed, so had to head out on Sunday too. And on Saturday I was also doing washing. Why am this under The Other, you ask? Well, while taking some time, the time taking are made up for by getting a slight break which opens the brain for some other thoughts. I feel it actually helps.<\/p>\n<p><em>No sound<\/em>. The game type doesn\u2019t really require much time, which is the good part. The bad part is, of course, there being no sound. Several reasons: Lack of time, lack of microphone, lack of having tested sound lib for D on beforehand.<\/p>\n<p>And I believe that\u2019s it. Sorry for this wall of text and it\u2019s rambly nature. I blame not really having written anything in a while. And now I got some toast to eat.<\/p>\n<p><strong>Small update:<\/strong> I realized I hadn\u2019t mentioned this. So. One thing that was originally intended was canals. Canals were supposed to be built from fresh water lakes and used to give water to unwatered fields and and clay tiles, to make them productive too. There were also supposed to be boats for fishing further from the coast. Didn\u2019t have time to implement it for the first idea, and didn\u2019t have time to figure out how to get it to work with the second idea and UI.<\/p>\n<p>Tags: <a href=\"http:\/\/ludumdare.com\/compo\/tag\/postmortem\/\" rel=\"tag\">postmortem<\/a><\/p>","time":"August 12th, 2008 12:32 pm","title":"The Tower of You \u2013 Postmortem"}