Deconstructing The Spiral - Part 1

Friday 08 April 2011 at 1:27 pm.

So it's been a couple years now, since I decided to move my core project to XNA. A lot has happened since then: the project grew from XNA Game Studio 2.0 to 4.0, a new XNA platform came out, I've started several more projects with varying levels of completeness and failure, and over all that time I've missed my deadlines for Spiral Island. Not that it's all for naught, mind you, as of right now the bulk of the work left is just art and music, which aren't my key fields. Now I've already done some entries on my personal blog about how the game came to be, as well as posting the story's introduction, and that's not what I'm going to talk about here. These entries will be about the technical side of the game.

So let's rewind to 2008 for a moment. XNA Game Studio 2.0 was the current tech level at the time. I had just placed a different XNA project on the shelf, Phobia: Genome Prototype, because I wasn't going to be adequately able to tell that story the way I wanted. I had only been using XNA for a few months at that point, and only been programming in C# and .NET for a year altogther. Now I'm not going to claim that I'm an expert today, but I have learned a lot in those years since. And, as I look back, I realized that I made some major mistakes back then that have left me in a mess today, by taking shortcuts. And the first shortcut I took was the tile engine.

The App Hub, as it's called nowadays, has an amazing set of learning resources for beginners. One of those, the RPG Starter Kit, is one I looked to for building Spiral Island, not for the purpose of a tutorial, but because I wanted a quick way out of writing the tile engine. I had remembered how much of a pain it was for me years back writing a tile engine in C++/DirectDraw, and wanted to just get up and running and avoid that. So I took the steps from the second tutorial for that kit, and started my project with that tile engine. Which, all these years later, has brought me to the problem I am at now.

The main thing about that is its meant to be a tutorial. It's not meant to fit every need, and my needs were very different from what it offered, and so over the years I began to just hack things into the tile engine where I thought they fit to get the behavior I wanted, leaving my tile engine code compared to the original a horrid mess. I first noticed the problem when I forked off the Spiral Island code to make a Roguelike, attempting to make the entire thing in 7 Days as a challenge but finding myself having to quit halfway in because the code was such a mess now that getting it to work for the new purpose was nigh impossible. Then came converting the code to XNA 4.0, which took a day's work to get working on PC and XBox because of all the changes, only to find when I tried to build for WP7 that it was going to be completely impossible because of some fundamental storage diffences on that platform making some methods I had hacked together completely impossible.

So that's where I'm left now. Code that can't build, code that's a hackish mess, and code that, nowadays, even with my comments, I can't tell up from down anymore in the older sections of it. And so, I think it's best to start over, trash it all and rewrite the entire codebase from scratch, the way I should have done it from the beginning, both to clean up the mess I left it in, as well as to make it much simpler to port to other platforms when I get to the point I actually can release the game. And it will have to begin all the way at the base: the tile engine.

No comments


Title: Deconstructing The Spiral - Part 1
Date posted: 08 04 11 - 13:27
Next entry:   » Deconstructing The Sp…
Previous entry: « Bullet List Hell