HamQuest’s Road To Silverlight

After moving JetLag over to Silverlight, I figured I’d get started on HamQuest.  It was well positioned to do so, due to the humongous refactor I did a while back to split out the game and rendering logic.

From the looks of things, the rendering part is going to be the easy bit in Silverlight, as HQ is really nothing more than a big bunch of stacked bitmap tiles that get swapped out. Silverlight is well suited for the type of rendering I am doing… way better than the .NET WinForms stuff using a PictureBox.

One part that wasn’t quite as smooth as I’d have liked it to be was the configuration files (creatures.xml, items.xml, and terrains.xml). I had originally used the XmlDocument/XmlNode set of classes to go through them. Silverlight doesn’t much care for that, and instead uses XDocument and XNode, which has a just different enough syntax to make a person crazy.

And another challenging part were the map files (they have a file extension of .cqm, and they are binary files I have used for very simple map structures since my Cybiko days. CQM stands for “CyQuest Map”, for the vaporware CyQuest, which would have been a lot like HamQuest, so the file format is a fitting homage).  In the WinForms client, I just open a filestream. In Silverlight, they are resources, and I had to determine the correct way to open them, which took a while to research.

Now the configuration files and map files load. The maze generates. We’ll see how well things start to get drawing.

Advertisements

Tags: , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: