Posts Tagged ‘Roguelike’

A Subtle Change Makes for Not So Subtle Possibilities

June 25, 2011

Off and on, I work on HamQuest.

I decided to keep going with the SilverLight version, and to heck with android.

I’ve been tinkering with a great many of the parts of the game.

Mostly, it deal with offloading things into classes that get loaded into descriptors using reflection.

A recent example of this is that I added properties to the player that allow the handling of command keys.

Before that, there were only six in-game commands:

Arrow keys: move

Tab: switch fight modes

Y: invoke the Amulet of Yendor

I wanted to add a “rest” feature.

Pressing the space bar would have some effects:

  1. Healing (health++)
  2. Use up a full turn of the player (light source duration –)
  3. Increment the wandering monster check for a wandering monster in the room (it should not be without risk to rest in a dungeon)

And naturally, there is a limitation on when a player can rest. The room must have no creatures lurking within it.

Since I already had the one-off “Y” command, I figured I’d put it into the same area, when I realized I should offload it to a class that gets loaded as a part of the configuration.

So, now the configuration has the following added to it:

<key-handlers type=”TagSet”>
<amulet-of-yendor-key-handler type=”AmuletOfYendorKeyHandler”/>
<rest-key-handler type=”PlayerRestKeyHandler”/>

I have two parts to this. One, a “TagSet” (i.e. a HashSet<string>) that specifies all of the actual key handlers, and two, the individual key handlers, which use reflection to load into the descriptor.

After putting this in, I realized something…

I have basically made magic spells and special commands to use items possible and infinitely expandable.

And that is when the full realization hit me.

I’m not making a casual roguelike exploring a maze game anymore.

I’m making a casual roguelike exploring a maze game kit.

And I’ve been doing this for some time.

If I wanted to, I could make the “E” key eat ham, the “D” key drink a potion, and all the other roguelike baggage.

Which I do not wish to do for hamquest itself, because the roots of the game are simple controls.

I could add a macguffin item, like mushrooms, to use a “spell components” that power scrolls that do things like banish monsters.

And I could do this WITHOUT recompiling the engine.

Or at least, I’m close to doing so.


Disarming Traps!

February 24, 2010

I got trap disarming functional today. The new version is uploaded at the site.

New Items, Fiercer Monsters

February 23, 2010

New Update:

A small amount of code change, and a lot of configuration change.  All of the new items are in (Battleaxe, Amulet of Yendor, Thieves’ Tools, and Vial of Mysterious Green Liquid) but not all of them are functional yet except for the Battleaxe.

Also, monsters have been updated to be more aggressive, item drops have been configured, and item counts in the dungeon have been adjusted to compensate.

Some playtesting will be needed in order to determine if I have now made it too hard.

Item Drop Solution

February 19, 2010

So I was talking about the item drops, and how I didn’t much like it because the splat of the dead creature hid the image of the item dropped.

Turns out the solution is just to make items render above the splat. Now in the midst of a goblin’s splatty goodness, you may see a ham or copper.

The new version is uploaded, illustrating once again the superiority of a silverlight version for playtesting. I build, I upload a single XAP file, and the player just plays it again, getting a new version(providing he isn’t caching).

Yesterday I learned how to get external variables into the silverlight object. It’s just a particular param tag. This will make facebook integration relatively easy. I’ll just throw the facebook userid into the app, and have any calls to the back end database(coming eventually) use that id as the primary key of the stuff stored.

I also have a ToDo list for HamQuest up.  I put it together yesterday, and crossed off two already.  Most of the items don’t seem all that ambitious this time, which is good. It means the game is nearing completion.

Item Drops Ahoy

February 18, 2010

Today I added a feature to SLHQ that I hadn’t even been sure I was going to include ever.

The feature is creature item drops. Its up on the site, and ready for testing.

At the moment, until I get to more fully exploring what I want to do with all of the creatures, the only creatures with drops are Goblins and Orcs.

The immediate thing I don’t like about the feature is that a creatures final “splat” is shown, the item is not. In the way that the game currently works, the player can immediately walk onto the space, which means he will pick up the item dropped without really being able to see what it is other than the messages panel.

I will have to carefully consider this, as I do want the player to see something before he picks it up. Always.

Even so, it is a cool feature that will add quite a bit of possibility to the game.

Silverlight HamQuest’s Permanent Home

February 17, 2010

Also, I have updated winforms HamQuest to

Still a long way to go, but it was at a good spot.

Shoppes are Back!

February 15, 2010

I finally got the Shoppes back in and working. One fewer item on the todo list between me and winforms parity. Yay!

So, I Defeated a Dragon

February 12, 2010

In the Silverlight version of HamQuest, I killed a dragon, and got all 20 delicious experience points.

My current strategy of play:

  • Go through all of the non-dead end rooms first and empty them out.
  • Stay in the doorway as much as possible and “fight from the door” when enemies are numerous, so that I don’t get surrounded (enemies cannot go into doorways, and so this way I only need fight one at a time)
  • Once most of the dungeon is cleaned out, go through the locked rooms one by one.

I recently doubled the ham and potions, and so I’m thinking about cutting back by 25%, because I won yesterday morning with something like 26 potions remaining (I ran from the dragon in this instance).

So, today after clearing out all of the non-locked rooms, I was going through the locked rooms. I found the dragon, and decided (with 32 potions, armor, and two handed sword) to give it a go.

All of my armor broke. I burned through 15 potions. I killed a dragon.

So, if the game was too hard prior to upping the ham and potions (and it was, I also upped weapons), it is now perhaps too easy. Balance in a  game like this is hard to achieve.

Fortunately, all of the difficulty is in configuration files, so I don’t even have to rebuild.

And that leads me to another new idea.   Multiple configurations, which could be difficulty levels or even scenarios.

But of course, that would be… new business. And new business is new business and old business is old business and new business will only be discussed…. next quarter.  And by next quarter I mean after the current old business concludes.

And the old business consists of:

  • Finish the Silverlight port(which will be the primary project now)
  • Get it onto the Silverlight game sites.

And for finishing silverlight, I have the following criteria:

  • Fix a few remaining bugs(like teleporting gives no message)
  • Put in sound
  • Implement shoppes
  • Rebalance game content
  • Title screen/Main Menu, About Screen, Help Screen(help is likely to be a link to a web page), Option Screen
  • Rudimentary statistics, like high score, number of games played, etc.

HamQuest in Silverlight!!!!

February 11, 2010

You can play it HERE! (Not a permanent location)

A few caveats:

  • Shoppes don’t work yet.
  • Can’t access help or the main menu or the about box, as these don’t exist yet.
  • You have to click on the control at the moment.

Still… this is pretty sweet!

And that’s all I have time for tonight, so that’ll have to do!

HamQuest’s Road To Silverlight

February 9, 2010

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.