Monday, 17 January 2011

Announcing "Unearthed"

I've begun several roguelike projects in the past.  Some have been traditional roguelikes and some have been more roguelike-likes; similar in appearance and functionality but not really capable of falling neatly into the roguelike category.  All have been ditched for more interesting projects.

Today I dug out some old code after playing Angband on my phone.  I already had the basics of a C# roguelike engine and was able to neaten this up a great deal, removing a broken timeslot system and gutting the random world generation completely.  I began working from the top, adding features as they were necessary.


So far I have much better support for monsters than I have ever had.  Before, I decided to go with one "monster" class and have the details of the individual denizens of my virtual dungeons loaded from text files.  This isn't necessarily a bad way to approach things but I ended up with a massive class filled with variables and procedures that only one or two beasts used.  I've now gone for a bare-bones monster class designed to be inherited by child classes.  This way, I can still keep the traditional roguelike convention of the player being a "special" monster for example without having to stare at player-centric code while dealing with goblins.  After breaking this down into several basic classes (such as player, flying monster, walking monster, magic using monster, etc) I then load the individuals from text files, allowing for easy content addition.

I approached world generation from a completely different angle this time and it's paid off.  Before I had dived into the guts of generating a world before I'd even decided how to store it in memory.  Now I have a system that allows for "chunks" of the world to be loaded in realtime, therefore allowing for an infinitely sized world.  These are generated on the fly the first time you visit one and this is saved for future reference.  I'll go into the reason why I chose this method, but for now although it only generates a few trees at the moment, the under-the-bonnet workings of the game allow me to do a great deal more.  I can also load pre-generated chunks, allowing for pre-built villages for example.  Plus, the way that they link means that caves and dungeons can also be generated this way.

Finally, I have a system that allows the world to be transformed, allowing for the player to transform one object into another.  For example, on a world basis you might cast a fireball that crashes into the ground leaving a scorched patch.  It would be a cinch to create a special reaction to fireballs that transforms a grass tile to a scorch tile.  Similarly, you could cut a tree down, converting into inventory items of wood and leaving a stump where you cut it.

It's not a roguelike yet.  I haven't coded monster AI or even support for anything but the player when it comes to monsters being drawn onscreen.  This is deliberate as the player display is only a quick hack for testing purposes and I have plans for how the rendering process is going to map out.  However, actions are already supported and the other monsters should be able to interact with the environment like the player as soon as I put them in.

I'll tell you more about the game shortly, but I want to introduce you to two concepts first:

The Pokemon Effect

Many roguelikes have started to involve what I like to refer to as the Pokemon effect.  It's an old staple of game design and it's everywhere in popular games these days.

When I was a kid I was never into football.  However, that didn't stop me from collecting football stickers, swapping duplicates with my friends and begging my mom for a new set every time I saw them on sale.  In later life I was glued to GameBoy for many months trying to collect virtual fighting monsters, and nowadays I often find myself reading the Achievement list for a game on my XBox trying to find some simple ones to complete and add to my GamerScore.

The Pokemon effect comes from a natural human desire to collect a set of something.  It becomes an addiction.  It manifests itself in many ways and I've noticed that TOME now includes unlockable classes to keep people playing, so it's now begun to invade the world of roguelikes.


Traditional roguelikes suffer from a lack of permanent progression, bar one very small detail.  When you play an RPG such as Diablo or World of Warcraft, you can enter into a fight knowing that you will probably benefit from the outcome no matter what that outcome is.  In Diablo 2 you may bite off more than you can chew and lose some gold, or even lose your corpse behind something that you can't get past without gear, but most of the time it's a win-win situation.  You'll gain some experience, probably an item or two to sell for gold if not a nice new upgrade and stand to lose very little.  In World of Warcraft the worst you can lose is time and a small amount of gold spent on repairs.

Roguelikes aren't so friendly as they usually include permanent death as an untoggleable feature and the genre loses out somewhat because of this.  If you play a roguelike chances are that you're playing it because of the permanent death amongst other things as it adds excitement, but when the time comes to lose a character I often just let it happen.  Fighting against the almost inevitable death of my character seems like a lot of effort and I'd rather just let it play out and watch with morbid interest.  Dice the Knight, level 14, your time has come.

So, a character has died and where does it leave the player?  Well, progression rears it's head with TOME again as there's the possibility that I've unlocked a new class to play as.  It's very apparent in Dwarf Fortress too, as it's permanent world allows me to venture back into my old fort and either reclaim it or just admire it's architecture.  In the majority of roguelikes though, the only permanent progression is the slim chance of meeting your old ghost in a distant dungeon somewhere.


Unearthed builds on these concepts somewhat to try to provide an addictive yet still brutal gameplay experience.  I wanted permanent death to be in and I wanted it to become a regular occurrence, but I also wanted something to show for each character's life.

You play as a sort of Indiana Jones style tomb-raider.  Your task is to populate a museum with captured beasts, forgotten relics and the like and you do so by risking your life in caves, jungles, dungeons and other inhospitable places.  This builds on the Pokemon effect, as the entire idea behind the game is to collect complete sets of various things.

The world in which the game is based is randomly generated and linked together by a series of "waypoints", ala Diablo 2, allowing you to warp between any two that you have discovered before.  Again, another collection to complete and one that will help you immensely.  After death, your new character will continue where your old one left off with any items in the museum left as they were.  Therefore, you can complete the game over several characters.  This is where progression comes in despite permanent death and it also allows for the interesting possibility of re-visiting an old nemesis with a tougher character, taking revenge by banishing his soul to the netherworld and then prising that one final relic for the museum from the fingers of the skeletal remains of Dice the Knight, level 14...

1 comment:

  1. There is shocking news in the sports betting industry.

    It has been said that any bettor needs to see this,

    Watch this or stop betting on sports...

    Sports Cash System - Advanced Sports Betting Software.