Sunday, April 28, 2013

Changes to the Dead Simple combat rules

On the topic of my progress with the game, I don't have much to demonstrate new by way of screen shots because I've been playing around with character creation and things like that which don't have much of a visual impact.

Also made a few modifications with respect to the combat system which differ from the Dead Simple rules - firstly, every attack you perform a Speed check which if successful gives you an additional attack on the same target. Characters of the soldier class already attack twice per round so can potentially attack three times per round on a successful check which hopefully increases the importance of dexterity for fighting classes and makes it a bit more of a complicated decision where to invest your skill points.

Secondly, I decided to include a Stealth check for those of the thief class as a kind of backstab attack, but only in circumstances where there is more than one attacker around your enemy. Already this provides for a blanket +1 bonus for all classes when you surround a defender, with thieves getting a +2 bonus, but with a successful Stealth check I was thinking that I would add the amount you pass that check by onto the attack roll with a view to making a thief a poor class for up front solo fighting (because of the lack of shields and anything more than light armour) but a handy support class in that they excel at attacking as part of a group, with ideally your opponent focusing on another of your party to avoid soaking up too much damage yourself.

And here's a screenshot just for the heck of it, with the real development shown being the customised player name and avatar:

And while I'm at it, a bit of a look at some of the further in-game plot description, this time lifted almost directly from the original D&D module upon which the game is loosely based:

Sunday, April 21, 2013


Mujahid was the second seven day roguelike that I finished and it was written for the 2012 7DRL challenge. Again there was some serious leaning on the libtcod + python tutorial to get things underway quickly in terms of the basics before branching out into something different.

In retrospect, this is probably the 'best' of my 7DRL games in that it's a relatively complete fleshing out of a full idea (which is admittedly rather simple) and not too long for that gimmick to become annoying. I think that my 2013 game, Rasatala, crosses over that line just a bit and becomes a bit of a chore to play.

The mechanic I'm talking about is the introduction of facing to a roguelike game. The only major roguelike which comes to mind which incorporates something like this is Unreal World and I wanted to explore stealth gameplay with the concept of facing and the implications that that has to sneaking around a dungeon. The obvious tactics which come to mind is spotting an enemy who doesn't see you because they're facing the other way and sneaking up behind them to dispatch them without being seen.

Inspiration was taken also from the Assassin's Creed series of games, along with the Thief series as well I guess, and the setting of this game bleeds over a little bit from the Assassin's Creed series even though the gameplay is deliberately much more simplified than either of those examples.

You can watch a youtube video of a playthrough of the game here to get a better idea of what it's all about:


A big part of my plan in 2012 was again to pick a setting which was unusual but also not dramatically different from what's expected in roguelike games to the extent that a lot of things needed to be reworked to cover that. I basically ripped the idea off a 2011 7DRL called Alamut which was an ADOM-esque attempt at a roguelike set in the middle ages where you chose between being a Muslim or a Christian and played out some role in the Crusades. That game never really seemed to be finished but I thought the idea was a good one which hadn't been explored before.

And of course there's a natural fit with stealth gameplay and a setting which saw what's popularly thought of as the historical basis for the word 'assassin', so an Islamic themed roguelike struck a chord with me. It also had the benefit of seeming to be slightly more controversial than it actually is and I'm sure there's a bunch of people who are uncomfortable with the name of this game but don't really want to say it.

Anti-combat gameplay

This isn't a straight up fighting game. You could probably try and take that approach and see how it goes but I don't think you'd make it past more than one or two enemies. Health doesn't regenerate and healing salves throughout the dungeon don't do much to help you, so your life is a very precious resource.

Fights are much more efficient when you attack your opponent from an unseen position. In that instance, you insta-kill them, so the trick is to place yourself in a position where you can perform that backstab but avoid being hit while doing so.

The idea was to make the decision to enter a combat a weighty one with the option of avoiding combat entirely being the most attractive one in almost every circumstance where possible. You can win the game with killing as few as four opponents and that really should be your goal even though it's not explicitly stated.

No magic and questionable use of religion system

A semi-realistic setting was my goal and accordingly magic and magic items were a poor fit. There are items scattered throughout the dungeon which you can pick up and use and they're very helpful a lot of the time. There's a few lazy ones - in particular a vial of green gas which confuses your enemies for a short period.

The most interesting item for me was the inclusion of stones throughout the dungeon. Now this sounds pretty damn boring but the gameplay use of stones is not as weapons as you might think at first (and as the youtube above demonstrates, that seems to be the most obvious interpretation) - instead they're used purely as a distraction for enemies. You can throw them to any square within your line of sight and an enemy who can see the square where it lands will go to investigate unless they can already see you, and that presents your opportunity to either sneak past or try and go for the backstab.

The ability to pray is also built into the game and it's caused me a bit of enjoyment to read various reviews of this game where people have guessed as to its effect. Someone said that it made you invulnerable for a short period of time. Someone else said that it reset the monster's AI so that they stopped trying to find you.

The reality is that it does nothing. It's purely for flavour and also for a bit of fun on my part by distracting players which proved successful. Of course, there's nothing stopping it from actually working, but that depends on the grace of Allah and I'm not entirely in control of that...

Things I could have done better

I put smoke bombs into Rasatala this year and made the Thug class start with them. They would have been a perfect fit for Mujahid and I should have included them.

The AI in Mujahid is just a little bit dumb with a few quirks I'm unhappy with. There's a trick where you can step past an enemy and then backstab them without facing your opponent which will count as an insta-kill. It's unintended but an abusable trick which makes the game trivial if that's what you what. Likewise, I'm not really happy with the way in which enemies dramatically change direction without warning which makes sneaking up behind them very dangerous. It would have been better if they gradually changed facing and turned around slowly so the player could observe it happening.

Otherwise, I think it's a pretty solid effort for a roguelike written in seven days!

Thursday, April 18, 2013

The beginnings of plot mechanics

Of course, for a game like this the plot is essential and I'll be forcing the player to read walls and walls of text. Now, the screenshot below isn't exactly thrilling but what is interesting is the behind the scenes actions taking place. 

There's now a system whereby a data file contains all possible messages to be sent to the player as they explore the game world, which can obviously be used to flesh out the plot or provide some kind of description of game areas as things go on. This is stored in plain text and is obviously highly modifiable and very easy to chop and change. Basically the game now loads that all up on start up, positions those messages appropriately through the game world and pays attention to when the player comes within a certain range of the tile containing the trigger and away we go. 

It might not seem like much, but it's an important part of the central structure of making this game an RPG and not a simple roguelike! And it also means that I'm getting much closer to the point where I can start quickly producing game content as the underlying systems to interpret and display that all fall into place.

Next up is probably plot characters - otherwise normal monsters or NPC's which have a certain plot element to their existence and with whom the player can interact. The trick thing will be thinking about how best to store this information in a data file to be interpreted on game start.

Tuesday, April 16, 2013

Dead Simple RPG Rules

Despite aiming for a Dungeons and Dragons-style setting, the last thing I want to do is to go down the Incursion route of trying to replicate a very complex system in a computer game. It'd be great to pull it off as well as Incursion does, but the complexity would kill this project almost certainly. So instead I've been looking around for a simple set of rules in a pen-and-paper roleplaying game to base my game off. Nothing had really grabbed my interest until I stumbled upon the Dead Simple RPG Rules, which as you might expect, are very straight forward.

One of the most interesting things to come from that is that I can do away with a hit point system, character levels and experience. Character progression comes from converting loot into training in the form of increasing your relevant stats in between dungeon diving. The hit point system is replaced by a system whereby if you fail a series of skill checks, there's a chance you'll be first 'wounded' and if you are struck again then there's a chance you'll be knocked 'unconscious'.

The potential for enemies and the player to be knocked out instead of outright killed appeals to me in the sense that I would be aiming to work that into the combat and plot of the game - for instance, with a system that once the player is knocked out, the game continues with the player being helpless as long as there are allies in sight who can potentially win the battle. If not, then the game ends or potentially the player is captured.

Helpfully, the system provides some sample enemy types which I have gratefully seized upon and implemented and accordingly, here's some screen shots of spelunking towards your inevitable death (ignore the messages which are describing off-screen events for debugging purposes).

Sunday, April 14, 2013

Defender of the Deep

I said in an earlier blog post that part of what I'll be doing on this blog is recapping some of my previous efforts to both fill in space on this blog while I work on The Burning Plague, but also to give you an idea of some of the gameplay elements I have preferred in the past and will be likely to include again in the future.


Defender of the Deep was the first complete game that I wrote and it was for the 2011 Seven Day Roguelike competition.

Overall I think it works pretty well in a limited sort of way but is definitely restricted in terms of scope which hurts its replayability. I'll outline a few of the design decisions I made along the way which are probably more of interest to me than to the player who would likely have not cared about these things.

First thing's first, it's based on the excellent python and libtcod tutorial by Jotaf which has spawned a million cheap roguelike games and I would say has had a huge effect in terms of making the barrier for entry in writing an easy roguelike game so much lower. Each game that I've written since has been based on that tutorial in one way or another and The Burning Plague is no different, even though it departed from the structure of that tutorial very early on the piece and doesn't bear much resemblance to it now at all beyond a few class and variable names.

An attempt at an interesting setting

Each game I've worked on started with a setting of interest first with the hope of making it stand out from the crowd a bit by not following a traditional path. The Burning Plague is the exception to this because I'm deliberately embracing fantasy tropes for the sake of simplicity, but Defender of the Deep was designed from the beginning to be a game with a relatively modest and achievable scope but with a concentration on the inclusion of game elements which came with an addition of flavour to the game in terms of world building.

The player character in Defender of the Deep is a monster living within the dungeon which is being invaded by evil surface dwellers. You can be a kobold (high evasion), an orc (brute force warrior), or a goblin (crafty mix of the two). I'll talk a bit more about the setting shortly, because these character types are expanded upon by the influence the setting has on their abilities in the form of religious powers.

No health, mana or piety regeneration

I wanted to play around with this concept and it's something which I think worked quite well. Instead of allowing the player to stop and rest as soon as they are out of combat, the lack of regeneration means that a player needs to push forwards to find healing or mana potions to replenish those aspects of the character, with piety only being replenished upon the death of an enemy. There's no food clock in the game but it's this need for replenishment which pushes the character forwards in search of items and also introduces a real risk/reward trade off which needs to be considered before engaging in combat. An easy kill will boost your piety but you run the risk of damaging your health by unnecessarily picking a fight you don't need to win.

The idea of making every fight non-trivial appeals to me and that's largely behind this design decision.

No spells

I'm bored of games which focus on the conjurer blaster wizard (ie. see the dungeon crawl: stone soup conjurer) and I like the idea of making magic more subtle than that. In this game I simply removed magic per se and linked mana to the ability to use magic items. Which when I think about it now, those items are basically simple conjurations - obviously I didn't meet my goal with this aspect. It's my goal to continue this focus on subtle magic with The Burning Plague - there shouldn't be an obvious magic choice like Magic Missile or Fireball which just causes damage and does nothing else.

No experience and character levels

Building a character and forcing a player to become emotionally involved with the game usually relies on the gradual progression through character levels. I didn't think this was necessary for a coffee break game and I always have thought the idea was lazy. I understand that HP is supposed to be not just someone's physical robustness but also an abstraction of the ability of a veteran to minimize damage by their actions and survive in that way, but it's always struck me as a bit lazy.

In Defender of the Deep, character progression is essentially item-based. You are rewarded with a powerful item upon defeating what effectively amounts to a boss on each dungeon level. The items are common between games but the order in which you receive them isn't and they each improve a different aspect of your character, so you might find that your non-combat kobold suddenly develops offensive skills which make you reconsider the way you approach the next dungeon level in terms of tactics.

Non-existent or at least non-traditional magic items

I wasn't really interested in the idea of littering the dungeons with +1 daggers. Items are ordinary and they are what they look like on the surface with a couple of exceptions. And those exceptions are also plainly obvious.

Important religious system and god powers

This is probably the focus of the game in my eyes - each character type worships a different god lovingly ripped off from some Dungeons and Dragons source book which I can't remember now, and each god offers that character a different god power which can be used at the cost of piety. Piety is only restored upon killing an enemy.

The orc class power is fairly straightforward - it's effectively a berserk ability which greatly boosts your offence at the cost of making you more vulnerable for a period, with the idea being that you should be able to save up piety from a few of the easier kills to rely on this ability when the going gets tough. It's a simple character to play in that regard.

The kobold class is much weaker than the orc and its class power reflects that - it's the ability to disappear into invisibility for a short period. The idea behind this was that the kobold should be played in such a way as to pick and choose fights as much as possible and when cornered, to rely on this ability to slip away from a dangerous situation and live to fight again another day. By the end of the game, the kobold should be an adequate fighter and a solid magic user with this ability as a fallback.

The goblin is a bit different and in hindsight, probably the most powerful class. Goblins have the class power of cursing every enemy in sight. That curse reduces the power of enemies quite significantly and makes fights much more survivable. It leads to the questionable tactic of trying to be surrounded by as many enemies as possible before cursing them so that you affect as many as possible at the risk of being surrounded.


Overall, I was pretty happy with this game. I deliberately aimed low because my priority was to make sure the game was finished and I thought a solid way of making the game interesting was to try and include obvious flavour elements which the player would remember rather than sweating the details of a technically complicated combat system or beautiful procedural level generator or anything like that. It was a success in that sense and it probably turned out to be almost exactly the game I planned on from the beginning.

Friday, April 12, 2013

Roguelike tiles and

Before I forget, I should credit the graphics that I've stolen and put into this game. They come from Open Game Art after a long search for tiles which weren't so big that it didn't cause me problems when the font was forced to be the same size and not so small that you can't make out what they represent.

I settled on that tileset because the 16x16 size felt about right and the tiles themselves haven't been overused in roguelike games to date and looked the part for what I wanted.

You'll see that the graphics I used for the walls didn't come from that same tileset - instead I searched around for something I could use to draw the various different wall directions and joins and ended up stumbling upon a tileset created to be used in Dwarf Fortress which I editted and played around with until I ended up with what you can see in the screenshots.

Bizarrely, Open Game Art user: surt is completely unknown to me before I decided that I liked his tiles and I know nothing about him apart from what he has posted about himself on an internet profile but it turns out that he lives in the same city as me and was born within two days of me. Creepy. Sorry if this weirds you out 'surt', but that's the internet for you.

The Burning Plague

The Burning Plague is the working title of a CRPG game that I've started working on and will be blogging about as a way of keeping my coding motivation up and also as a way of documenting my progress - already my collection of screenshots is making me laugh as I look back at how it was all looking just a few weeks ago.

The basic idea for the game is that I wanted to focus on a no-frills RPG similar in style to the Spiderweb Software series of games - in particular the Exile and probably Avernum series. I'm definitely in the camp of being a hobby programmer and my most recent experience in game writing was putting together a few roguelike prototypes before participating in the last three Seven Day Roguelike competitions where I made a few games:

2011 - Defender of the Deep
2012 - Mujahid
2013 -  Rasatala

Each of those games is ascii based and relatively simple in scope. They are written in python and rely on the libtcod library for rendering and a whole lot of behind the scenes algorithms such as field of views calculations and other labour intensive programming tasks like that. I'll probably post about each of those games in turns so I can talk about the goals I had with each in relation to gameplay and scope but that's enough about them for now.

Because of my experience with that library and python, I decided that the fastest way to get me up and running with a more structured RPG would be to stick to what I know. Originally I was going to keep the ascii graphics throughout because it helps with the speed of programming so much if you don't have to worry about graphics, but libtcod supports graphical tiles and I was tempted to make the switch and looking back now, I'm very glad that I did.

Beyond the style inspiration of aiming for a Vogel-esque RPG, my initial content is loosely based on the Dungeons and Dragons module for low-level players - The Burning Plague. The initial goal is to release an alpha version of the game which fleshes out a short RPG covering an expanded adventure based on that module. Gameplay is intended to be based on roguelikes to a certain extent in that you will only control a single character and rely on providing orders to your companions to boss them around so that it becomes more of a party oriented experience.

Data in relation to the content of the game itself and the various maps to be used is stored in simple plain text with the idea being that once the initial module is completed, the content will be highly moddable and also extremely quick to extend. Building a map is as simple as typing in the characters in a plain text editor. Adding monsters and objects to the map takes just a couple of short lines and is very easy to understand in its current state.

Developmet has been going for around about a month now I'd say and I'll post up a series of screenshots to give you an idea of where the game has come from and the direction it is heading in.

First up, we have one of the basic views of what the game world looks like. You can obviously see the hangover of the ascii environment I was planning with just the actors in the game being displayed graphically. Looming ominously before our intrepid group of adventurers is the mouth of a forbidding cave. To be honest, looking back on this I do enjoy the clean simplicity of the appearance of the game map but I understand that it's probably not for everyone and it would end up being audience limiting in the long term.

Of course, what's a world to explore without enemies. We've still got the rudimentary walls, trees and water reminiscent of the original planned visual style.

 From those slightly more humble beginnings, a fair few tiled graphics were added in to represent the world and the appearance below is roughly what the game looks like currently.

And with those extended graphics, work began on implenting a clear user interface as you can see with the message console at the bottom and the status console on the right hand side, complete with regrettable placeholder names for our loyal companions.

RIP Weird Tony, you will be remembered.

The most current build looks like the screenshot below with a few more visual frills, the addition of a mysterious stone which is a simple placeholder item the player can pick up to the test out the inventory system, and more exciting for me is the behind the scenes additions with the carnage being shown resulting from the player issuing a command to his companion Dilly to attack an innocent peasant and Dilly in turn responding by calling his companion Weird Tony to arms to assist him in his evil deeds. The player can't control Weird Tony directly under this system and while that might not seem like much, it's the groundwork for a more complicated monster AI system where a group of monsters will have a leader and followers tracking around awaiting orders. 

Likewise it adds a bit of complexity where if your good friend Dilly meets an untimely end, then loyal Weird Tony will stand by Dilly's corpse and mourn while ignoring the player's frantic cries for help.