Tuesday, January 26, 2010

Ighalsk - Doom Merchants

Where there has been a concentration of undead for several years, a strange, inky black substance can sometimes be found, pooled in hollows in the ground. If you picked it up, you would find that it pours and moves like a dark, viscous liquid - but it doesn't feel wet. At first it feels cold, then your hands become numb, then strength begins to ebb from your limbs. The solitary adventurer may be overcome at this point, but if you have friends (or at least companions) with you, a healing potion or power will restore you to health.

The unscrupulous soon discovered that this substance, when suitably processed, makes an effective and deadly poison. They called it "raw doom" and set up Workshops of Doom, sometimes even Factories of Doom, to refine and mould it into a more convenient form. A drop or two in a cup of wine induces death while the drinker is sleeping that night. A weapon coated with it strikes through armour and is only stopped by certain white fabrics which have been blessed by sacred rites.

The gathering, processing, selling, buying and owning of both raw and processed doom is illegal in all human, elvish, dwarven and goblin dominions. Nonetheless, there are some desperate souls who traffic in it. They call themselves Doom Merchants, or sometimes Merchants of Doom. The Doom Merchants venture deep into necropoleis, cemeteries and ghost towns, wherever they can find undead, and gather large quantities of raw doom. This they carry in large black bags - Bags of Doom. Their customary costume includes thick white gloves and masks for protection, though the black and white vests they also wear are thought to be ornamental.

By all accounts they make substantial sums of money plying their trade, but slowly lose all colour in their skin and hair, then within a few years become weaker and weaker until they collapse. Rumour also says that after death, they themselves turn into undead, with a shadowed, striped, spotted form that breathes out thick clouds of doom.

Saturday, January 23, 2010

Ighalsk - release 0.1.13

I released Ighalsk v0.1.13 last night; it can be downloaded from its SourceForge project page here.

Here are the changes since v0.1.12:
* Can now add up stairs and corridors in the Level Editor. Corridors in particular were tricky since the editor (or some other class) needed to store the start point until the end point had been selected. In fact you can add corridors between any 2 points; the editor will add two corridors (one vertical and one horizontal) between those points.
* Walls are now only shown if seen nearby or remembered (if they have been seen before). In the previous release, monsters were only shown if they were nearby; this release is now more consistent between monsters and walls, though all treasures and stairs in a level are visible at all times ...
* Visibility (the Hero's map) is saved to file, so that a loaded game will have the same memory of walls as when it was saved.
* Refactored Monster Editor and Monster to simplify both by removing duplication - Monster Editor now uses the underlying dict that holds monster definitions more directly. Editing a monster's attack and resists are still special cases.
* Started moving methods from LevelViewer to LevelFormatter so that they can be tested.
* Added 15 new monsters, including Doom Merchant, Gloomhound, Lesser Mook, Huntsman Professor and Wool Golem. Renamed Zombie to Zythar Feeder; added Zythar Axeman and Zythar Deathbringer. I picture Zythar as semi-undead, crazed beings with gleaming green eyes; the Axemen wear black ribbons attached to their helmets.
* Added Monsters for level 4 of each quest. There are some monsters in this new batch of 15 that can't be encountered yet - I'm saving them for level 5 of the quests.

I've got a few features that I'd still like to add in before v0.2.0, as follows:
* Add functionality to the Level Editor to add rectangular rooms, circular rooms and their inverses (filled-in rectangles and circles of walls), zig-zag corridors and a shortcut out of the quest dungeon;
* Refactor the Monster Editor further to simplify the code, and extract editing attacks and resists to a new screen; then adding multiple attacks and possibly descriptions to a Monster;
* Add new damage types, in particular cold, lightning and poison - at this stage, poison wouldn't have the slow draining of health effect, but would be like any other damage type;
* Add Awareness and Stealth attributes and interaction, as a friend of mine suggested, so that some monsters can creep up on you if they've got high enough Stealth and you've got low enough Awareness ...

The Awareness and Stealth functionality would also allow invisible monsters, though I'd prefer to wait to introduce them until I've also added some kind of Detect Invisible power, which would have the effect of increasing Awareness for a time - it's only fair to the Heroes.

Wednesday, January 13, 2010

Ighalsk - Three User Stories

I've been trying to write a decent introduction to user stories, and it hasn't been working. Instead I'll just summarise them as follows:
* User stories describe what the software should do.
* User stories are written from a user's point of view.
* User stories are often used in agile software development (see e.g. here or here).

Here are 3 user stories for Ighalsk.

User Story A.

Tom feels the need for more, bigger and better monsters. He fires up the Ighalsk Monster Editor and creates a Plaid Dragon and a Blue Orc (starting from existing monsters and modifying stats appropriately). He tries them out and decides that yes, they add something to the game. Maybe Melissa would like them? He knows that she's already got the other monsters that he's created, so he just exports these two using the Monster Editor to a separate text file and emails it to her.

Melissa (a friend of Tom's and a fellow Ighalsk player) reads the email, saves the file, and imports the monsters - again using the Monster Editor. Next time she plays Ighalsk, Plaid Dragons and Blue Orcs might be lurking in one of the dungeons ...

User Story B

The Ighalsk website includes a page for uploading and downloading monsters. Each monster has a summary, a description written by its creator, and reviews posted by others. The Ighalsk community votes regularly on which monsters should be included in the next release, or the next bonus pack of monsters (downloadable separately).

User Story C

Cass stares blankly at the screen. YASD - those stupid Plaid Dragons of Tom's! Ah well, they're not official - she'll remove them before she plays again. Now, what sort of Hero to play this time? How about a Mighty Hero for a change? The good thing about starting a new game, she thinks, is that all Heroes have plenty of powers right from the start, which gives them lots of options in dealing with monsters. Though they can still die if they make the wrong choices ... And each sort of Hero calls for a completely different playing style, and a different choice of quests.

Saturday, January 2, 2010

Ighalsk - release 0.1.12 (and 0.1.11)

So I released Ighalsk v0.1.12 a few weeks ago (mid-December) but have only just got around to writing a blog post about it. And yes, I messed up again and needed to jump from release 0.1.11 to 0.1.12 almost instantly. (So 0.1.11 appears in the Subversion repository, but there's no separate download - the Level Editor doesn't work for that release.)

Here are the changes since release 0.1.10:

v0.1.12:
* Added an empty file in data/quests so that this directory will be included in a zip file. :/

v0.1.11:
* Updated the Monster Editor to allow deleting when entering names of Monsters, filenames for Monster Dictionaries, Monster comments and weapon damages (dice descriptions). There are different characters allowed for each type of data, with the loosest constraints for comments (where punctuation is allowed) and strictest for dice descriptions (where 0-9, d, and + are the only characters allowed).
* Monsters are now only visible when they are near the Hero, though with no line-of-sight; I'm assuming that the Hero has limited telepathy. Line-of-sight looks hard :/ so will come later. (Need to do more background reading on RogueBasin ...)
* Added lit squares - this shows the limits of the Hero's sight (telepathy), hence the areas of uncertainty (where the Monsters could be hiding). Needs tweaking a little ... Currently all walls on a level are visible - this will change as well.
* Added 9 new, more powerful and more expensive items of Armour - all are available in the Armour Shop. My current favourite is probably the "Hat of Serenity", which increases resistance to fear.
* Removed the dungeon not associated with any quest; this meant that Habitat is no longer used, so removed it as well. Hooray for simpler code!
* Added a basic Level Editor: currently this allows removing and adding walls, saving and loading levels.
* Characters saved with release v0.1.9 *can* be loaded using this release. (Yes, I have tested this.)

EDIT: The latest version can be downloaded from here.

Sunday, December 13, 2009

Ighalsk - The Nature of Illusions

Lord Apathy has a number of different types of illusions serving him - some on loan from other Lords of Illusion. These include "Embarrassment" illusions, so called not because they embody embarrassment themselves (and somehow infect those they encounter), but because they induce embarrassment in others. With disparaging comments, a haughty stare, and eye-rolling, such an illusion conveys a strong impression that your appearance, actions and indeed thoughts and plans are ridiculous, inappropriate and just plain wrong. It is an illusion, but the feelings of embarrassment that it causes are real.

Another type of illusion at Lord Apathy's command is "Paranoia". Again, it is not itself paranoid, though it may pretend to be. Instead, it induces paranoia in others. With whispered words, raised eyebrows and significant pauses, it insinuates that you have been betrayed and everyone is plotting against you, waiting for your slightest mistake to pounce.

These illusions can be destroyed (unraveled) in several ways; they are resistant to physical weapons, but most vulnerable to a Philosopher's use of reason.

Monday, November 30, 2009

Ighalsk - Tests and Time

At a recent checkin, there were 486 tests defined for Ighalsk, which took 31.8 seconds to run (on my old laptop: 500 MHz, Win98). I'm happy with the number of tests, but would like to decrease the time somewhat (still too many file accesses).

A Google spreadsheet showing some numbers and times for different revisions is available here. I don't know why the time went down to 9 seconds and back up again almost immediately, but I think the dip from 23.3 seconds to 20.9 seconds was just after some test refactoring to speed up tests - probably replacing file I/O with StringIO (see previous post).

Also, I now have a Twitter account here - any updates to these numbers/this spreadsheet will probably be posted on Twitter first (and possibly only). I'm working on increasing the popularity of #roguelike ...

Thursday, November 26, 2009

Ighalsk and Motivation

Ighalsk is not the first software project that I've worked on at home, or even the first game. But it is easily the most mature and furthest along. With earlier projects, I've had a great idea, started working on it, got a few things done, and then my enthusiasm has slowly worn off and I've given up.

With all my projects, I've only had an hour or two to spend on them in a night, and some nights that dropped to zero. Often in this time I'd get started on a task, but wouldn't have time to finish it - I might find a bug, or the task might be more complex than I'd planned for. Then I'd need to wait a day or more before I could work on it again. This was frustrating, and it made me feel like I was going very slowly.

With Ighalsk, I've generally been able to get something finished each night. Part of the reason is that I'm using Test-Driven Development (TDD) almost all the time. This means that my work cycle is usually: write a new test, run it to check that it fails, write just enough code for it to pass, check the changes in. A lot of the comments that I make when I check in changes start with "Added test + implementation of ..." Similarly when I refactor, each refactoring is small and I test it before I go further, so that when I do make a mistake, I can go back and fix it easily. It helps that the full set of tests runs in less than a minute (though I still want to speed them up further over time).

TDD has meant less bugs - or more to the point, that it's quicker and easier to fix bugs - and frequent refactoring (not to mention using Python!) has meant simpler code. Both of these factors have also helped me finish tasks more quickly and feel like I'm making progress.

Motivation has been less of a problem lately; I've got to the point that I have a playable game, where it's easy to see how any new functionality can fit in and will be usable immediately.

Doubtless it's also helped that I don't have any new games that I want to play at the moment - though often ProgressQuest is running in the background while I work on Ighalsk, and I've started playing FreeCol years and years after I last played Colonization ...