New Game: Roads to Nowhere
Erik on Dec 28th 2008
On December 5th took part in the 13th Ludum Dare 48 hour game programming competition. The theme was roads and I created a small puzzle sort of game in flash.
You can play the game online. Roads to Nowhere Competition Version
There is also the Roads to Nowere ld48 page.
What went right:
- Motivation. For some reason the combination of theme, timing, my idea and my mood had me very motivated. I think I spent about 22 hours in front of the computer during the compo, and that time was almost 100% productive. The distractions of the internet sucked up very little of my time. It was a really great feeling to get so much productive time in. Unfortunately I couldn’t tell you exactly what the driving factor was that made my motivation level higher this time than it was last time.
- Tools. I decided to work in Actionscript 3 so that my game would run in flash. I recently wrote a tutorial on using Adobe’s freely provided mxmlc, and I found that I had no trouble building a game from what I had learned. I even learned to use the included debugger, fdb. It’s pretty limited, but it’s helpful in a pinch. Though I’m still more productive with Python’s tools and libraries, I’m happy with my choice to work in AS3. The biggest thing I miss from Python is an equivalent to iPython. I really wish there as an interactive Actionscript 3 shell. Ultimately, being able to play the resulting game in the browser is enough of a win for me to be willing to tolerate a lot of down sides.
- Idea. The Roads theme immediately had me thinking about cities collecting resources from around them by building roads to them. Something like the resource mechanic in the early Civilization games. With this in mind, I thought it would be interesting to try to make some sort of resource gathering puzzle game, similar to what Jolle had done with some of his ld48 games. I think this worked out well for me. Interestingly, two of the reviewers of my game noticed the Jolle influence and commented on it.
- Crunch Time. I fond myself at a point where I had about eight hours left in the competition, and I had zero gameplay. I had to scale back my original idea, cut some features, stop implementing new things and start creating a game from what I had. The final game concept, the rule system, the user interface and the levels all came together in the last hours of the weekend. In fact, I put the levels together so quickly that I had no idea whether or not they would be interesting or fun. Fortunately, people enjoyed the game. There were even people that were impressed by the intricacy and design of the levels.
What went wrong
- Pathfinding. My initial gameplay idea involved having workers transporting resources along the roads from the land into the cites. In order for this to work, I would need path finding from each of road tiles to the cites via the road grid the player built. I considered implementing A*, but I didn’t have an AS3 priority queue library and implementing one or finding one and learning in the short time frame didn’t appeal to me. So instead I decided that I would do a brute force depth first search from each road tile to each city. For performance reasons, I cached the paths that I found on intermediate tiles. Unfortunately, this scheme can cache bad paths when a road ends in a loop. I spent most of my programming time on Saturday, and a good part of Sunday fighting with this. I tried working around the problem, but the performance quickly hit unacceptable levels. I decided to start from scratch on the pathfinding, instead implementing a breadth first search starting from each city. As the search spread out, it found all of the connected road tiles, and stored the shortest path that was used to find that tile. I had my new algorithm up are running perfectly in about an hour. Of course I wouldn’t have been able to implement the new scheme so quickly if I hadn’t spent so much time with the old scheme. The most frustrating part of it was that with so much time wasted on pathfinding, I had to change my game idea to a simpler one that didn’t really need the pathfinding at all.
- Graphics. I had hoped to make nice pixel art land tiles, resource gathering animations and rippling water effects. All of these ideas got cut in my last minute scramble to put something playable together. Instead I ended up with some crude last minute pixel art with big ugly blocks for land tiles. While graphics have never been a big focus for my games, I think that the visual impact counts for a lot. In this case, I think the visuals were so bad that some people might have been discouraged from giving the game a try.
- Time management. Spending over a quarter of my time on a pathfinding feature than was never used certainly seems like a waste of time. But I have trouble categorizing my use of time as something that really went wrong. I had to give up on my original gameplay idea, but I ended up with gameplay that people like. I didn’t have any time to play test the levels I made, but on the other hand I didn’t over think the levels, and people were happy with the result. Plus there was something satisfying about grinding through the pathfinding problem and getting it working correctly in the end.
Results
My game did quite well in the competition ratings:
6th Overall, tied for 6th in Fun, 3rd in Innovation, 7th in Use of Theme. The scores were very close in the Fun category. Second place had a score of 3.90, tenth place had a score of 3.80. I received a lot of great feedback in the comments, and these are the highest scores I’ve received for a ld48 entry. Pretty good for a game that I thought was too rushed for anyone to be interested in.
I’m really glad I made the last minute decision to enter this competition. It was a lot of fun, and I made a game that a lot of people seemed to like.
Finally, I suggest you take a look at all roads lead from home by dessgeega, and Rara Racer by increpare. These two entries really made me say wow.
Filed in Games, Programing | No responses yet