Join #ludumdare on irc.afternet.org
Mini LD #5 :: November 7th-9th Weekend :: Theme :: Cover

Sign In | Write your Journal
Home | Planet Ludum | Rules Wiki | Mailing List
Ludum Dare 12 Final Results NOW AVAILABLE

Click HERE for the Ludum Dare 12 entries image grid
(to be included in the image grid, you must upload an image to the blog)


The Tower of You - Postmortem

Posted by jolle

For like half of the LDs I’ve participated in I’ve said or thought that I would do a postmortem. But I never got around to it. Thought I’d 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’t. That’s great postmortem material, you know. But still, I’m lazy, so I’ll do the standard postmortem procedure of The Good, The Bad and The Other.

It’s long though, so be warned! Slightly updated 15th, new text at end.

The Good

The theme. The theme had great potential. Lots of space for interpretations, while giving a lot of ideas.

The D programming language. I’ve used C++ in all other real LDs, and it’s 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’t 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’t 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’m definitely using D over C++ in upcoming LDs. Then there’s always Python, of course.

Hex tiles. Tiles are always great. They’re easy to work with, yet providing for many things. I’ve used tiles in all LD games I’ve made except for like one (which didn’t 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 — I even learned stuff. Which I usually don’t from tile code.

The Bad

The initial idea. Not exactly the idea of a tower, and using resources, and expanding land and all that. That is so general it can’t be bad. But in the same way it’s 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 Evening Journey entry. It had an idea that gave the idea of OKiness. But when you got right down to it, it didn’t really work. Evening Journey failed and became a non-entry, because I couldn’t really whip up another game in the set up stuff. Fortunately that didn’t 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’t 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’t going to be a game. It was too complex, drained a lot of time, and didn’t work. Lesson: Don’t start with complex. Because if complex doesn’t work, you have wasted lots of time. Better start with simple, and if simple seems to work but isn’t enough, expand it, or if it doesn’t work, throw it away and try another simple.

Initial controls. 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.

Testing and Tweaking. This is related to the above, too. And some in The Other part comping up. I didn’t 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.

Non-standard libraries in non-standard bin paths. For some reason zlib1.dll was required for running the game exe, but I never noticed. Was simple to fix when reported though.

Divide by 0 error. 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.

Documentation. I didn’t 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!

The Other

Graphics. 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’t 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.

The ‘last minute’ gameplay, controls and AI. Having a way too complex UI and ‘game’ that didn’t 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’s 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’t 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’m 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’t on The Good.

Food-photos. This is kind of fun, doesn’t take long, but it’s starting to feel like an unnecessary distraction.

Preparations (not code stuff). I was busy doing other stuff until the actual compo begun. Which means I didn’t 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.

No sound. The game type doesn’t 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.

And I believe that’s it. Sorry for this wall of text and it’s rambly nature. I blame not really having written anything in a while. And now I got some toast to eat.

Small update: I realized I hadn’t 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’t have time to implement it for the first idea, and didn’t have time to figure out how to get it to work with the second idea and UI.

Tags:

Leave a Reply


All posts, images, and comments are owned by their creators.