When you step away from code, you tend to lose familiarity with what you’ve done in the past. Luckily, this time around I not only properly commented all my methods, but I also used VS 2008’s handy built-in task list to remind myself what needed to be programmed next (and where to start), so I didn’t lose much time.
Today, I focused on making the original programming more robust, rather than tackling combat timers. There were a few things I had avoided implementing or worse half-assed just to get it to work, and expanding the scope of the game has made those errors pretty obvious. The first thing to do was be able to move to other maps, which is essentially the heart of an exploration RPG, and the biggest thing I was avoiding. Somehow it worked without a hitch, though it uncovered a rather unexpected quirk. Since XNA primarily uses XML for its data files (for map data and whatnot), apparently it remembers the last state of the data in that XML file (for example, if the player has killed an enemy), so when you go back to an old map, the enemy is still dead, as long as the variable names being used in the data file and the actual game are the same name. I’m still on the fence how I want to deal with it, since it’s both a good and bad thing.
Perhaps more excitingly, as shown in the screenshot here, is I finally added not just the base dialog renderer and parser, but I also added the core scripting language, which I lovingly refer to as usecode in honor of Ultima VII (I had always thought the name was very appropriate, since it’s a script/code for when something is used in-game). So now I can add switches or hotspots that trigger quip dialog (shown here) or full interactive dialog, along with teleportation to other maps at specific locations. After this blog entry I’ll be adding more basic routines such as enemy creation, object modification (fancy word for opening doors), and even changing background music.
Don’t mind the splotch of dark green there, I’m just experimenting with background art styles. 🙂