{"author_name":"Frib","cat":"LD #21","comments":[],"epoch":1314112500,"likes":0,"metadata":{"p_key":"63689","p_author":"Frib","p_authorkey":"3939","p_urlkey":"99474","p_title":"Abstraball postmortem","p_cat":"LD #21","p_event":"LD21","p_time":"1314112500","p_likes":"0","p_comments":"0","p_status":"UPD5","us_key":"3939","us_name":"Frib","us_username":"frib","event_start":"1313712000","event_key":"7","event_name":"LD21"},"text":"<p>When I saw the theme list on the final day of voting, I was rooting for one of the stealthy themes. They didn&#8217;t make it, but escape allowed me to work this idea I had for the past week into a game. I wanted to try and create a top-down game with true line of sight. The end result is Abstraball, a game with true line of sight, so I guess I succeeded with that. But it could&#8217;ve been so much better if I changed some things at the start.<\/p>\n <p><strong>Day 1<\/strong><\/p>\n <p><strong><\/strong>I did my usual routine for making an XNA game. Create a simple screen system, a world class, entities, and fix up drawing things. This time around I wanted to use polygons instead of using the spritebatch, and I wanted to make variable sized geometry rather than tiles. So I worked on that. The camera would be orthographic instead of perspective, and not being limited to square tiles would mean I could make simple big geometry for large portions, and resort to more complex (read: diagonal walls!) shapes when I wanted fancy things. After doing that, I worked on the shadow effect. First I made the area next to and behind you black. Then I added the effect on geometry. And that&#8217;s when I should&#8217;ve made a different decision. An orthographic view with &#8216;shadows&#8217; like that is practically the same as a perspective view with pillars reaching to infinity, but without the texture support, and the without ability to easily prioritize what should be drawn. At first I didn&#8217;t realize that, but now I do, and I definitely would&#8217;ve done it differently if I had known at that point.<\/p>\n <p>Anyway, I continued with that, thinking I could make it look better later on. I started working on the map. I had the ability to make any shape I want, to make any complex level I wanted. But I had no level editor, and placing things by hand was a pain. So I resorted to creating a bitmap, and importing\/parsing that. So at this point I had fancy, unstructured polygons shaped as square tiles, without the benefits of a tile grid. That was mistake #2. I should&#8217;ve made it tiled, then I could index things more easily and efficiently, and also easily make a bit more diversity with other shaped walls. But I didn&#8217;t. Pathing the world was tiled, but they didn&#8217;t support each other. I also had to make some optimizations so unnecessary geometry wouldn&#8217;t be added.<\/p>\n <p><strong>Day 2<\/strong><\/p>\n <p>At this point I started to realize the mistakes I made during day 1. I lost some motivation, but kept on going anyway. I worked on the AI, and after a few hours I got a nice and robust AI system that got the job done very nicely. But again, I had optimization issues because of the way I built the world. So I had to cut on a few things to make it playable. Pathfinding was just bad, and occasionally it would take a second to calculate a path. Line of sight calculations were bad as well, and many other things were bad too. But I worked around most of them. Next to those things, I added the footstep sounds, and the positioning for it. So by now I sort of had a playable game. I named it abstraball because I knew I couldn&#8217;t fix the graphics, so maybe coining it as an abstract game would help.<\/p>\n <p>With about 8 hours left I started talking to a friend. He playtested my game and gave a bunch of tips for features and gameplay changes. I added difficulty modes, tweaked the AI, added a compass, the energy bar, fixed a few glitches, added the plague bearer mode, and did some other minor things. He wants to be credited for being awesome, which he is, so his name is <del><\/del>savooipeerd.<strong><\/strong> With about 4 hours left I added a few final touches. I composed the music with iNudge in about 10 minutes, added keyboard configuration options, and started to playtest some more for balancing changes. I fixed a few annoyances, and with an hour or so left I was done.<\/p>\n <p><strong>Final thoughts<\/strong><\/p>\n <p>While I&#8217;m not that happy with my game (it could&#8217;ve been much better), I still greatly enjoyed creating and playing it<strong><\/strong>. I feel my previous (and first) entry of LD20 is a lot better overall, but during the creation of this game I learned a lot of new things and tricks, which I am sure to use next time. I&#8217;m going to stay away from the spritebatch completely now, as I now have a relatively good understanding on how to work with primitives. For the next time I&#8217;m going to roll out my own engine\/framework\/toolset\/whatever to prevent having to search for and redo basic things, and to do it right. The current code is such a mess, it&#8217;s just plain terrible. I broke so many best practices because of laziness, and while it&#8217;s part of LD, it still feels terrible for doing so. \ud83d\ude00<\/p>\n <p>In any case, I really enjoyed this LD and I&#8217;ll participate next time as well! I&#8217;m also going to attempt to do the october challenge as a motivator and deadline to finally do something with a project I&#8217;ve been working on and off for over the past year.<\/p>","time":"August 23rd, 2011 10:15 am","title":"Abstraball postmortem"}