Journey to bring Dungeons of Chaos to everyone

Normally I post little updates in the SNEAK PEAK section, but I think it is time to give a full rounded update on how the Unity port is going.

For those not yet across this, I am developing a Unity version of Dungeons of Chaos, which allows me to deliver it to all Android and iOS devices.  It will be a new App because otherwise it will overwrite the old App and people’s savegames there (the savegame files are not compatible unfortunately).

In the process, which I was expecting, I am taking a fresh approach on many of then data structures and fight mechanics, and making everything a lot less bug-proof (I hope).

As of today (4th Feb 2016), the game is in full beta on my own iPhone and tablets.  It plays very well and has 95% of the functionality established.

I won’t list the many things I have replicated, you can check out the SNEAK PEAK section for that.

Overall, I think the game will hit the App Stores in 4 to 5 weeks, with the following yet to be done:

  • replicating the random-dungeon routine.  Should take me 2 days to get this done. It is a vital factor for replayability and I have great plans for it for the future.  In the old DoC version, it was only the random orc hideouts that were really required to be explored.  the castle depths and random mines were optional and I am not sure how many people have dived deep into them.  Going forward I plan to put a few more in and make it worth the while a bit more as well.
  • replicating guilds.  This is a matter of designing a good User Interface.  Should take 1 day.
  • replicating content.  All the maps have to be re-done unfortunately, but at the same time it allows me to expand them so it should be good fun for people that have played the old DoC to explore the new one as some things will be different along the way.
  • testing all there is to test in terms of Android.  Not looking forward to this.  Have yet to install the SDK and test it out on a Samsung GS3.  Won’t be able to test many Android versions and devices for obvious reasons, so have to embark on some sort of external playtesting request.  To be confirmed.
  • replicating the opening cinematic scenes.
  • implementing more monsters.  so far have replicated about 20 of the 60, which covers most but not all possible monster actions.
  • implementing more skills and spells. have replicated half so far.
  • defining all the tile properties.  What can you walk through, look through and what does it say when you look at something closely.  a whole day of meticulously looking at pixelated art ahead.
  • ADDING new monster or skills and spells.  Trouble is time here, I may not add new ones in the first release.  Would still be as fun as DoC on iPad was with up to 50h gameplay, so this is something for a future release I think.
  • Lighting.  was not really a feature I got a lot of positive feedback for.  Realism is sometimes no fun.  But given I have a day/night influence to monster spawning, and a daily skill reset, I need to put something in to indicate the time of day.  If the atmosphere it creates is not outweighing the negative feedback in terms of not seeing enough, I may obmit this.
  • ADDING animations for certain tiles.  to be confirmed.  takes a bit of time to look nice.
  • replicating all the NPC dialogue data.  time-consuming as I am cleaning it up structurally in the process.  2 days of work in there.
  • I really want to ADD TRAPS.  But so far have to decide on how it will work without interfering with the casual play feel I like about my game.
  • CURSED ITEMS is high on my list to add.  the functionality is now there (you can’t remove it once worn. ) but I need to decide on the likelihood of when these are found, and what avenues to offer to rid of the curses, as well as what does an uncursed item is like (still have negative attributes??)

Hope that provides some insight.  If anyone is keen to playtest, send me an email or reply below and I will see if I am going down that path in the next weeks.  Below are also some screenshots taken from an iPhone 5C.  The first one is map view without zooming in.  Zoom is what most people will use on phone-sized screens though, but I prefer a wider view myself.

Kind Regards,


DoC Unity map view DoC Unity party view


DoC for everyone!

** UPDATE.  Below is a post I made in October 2015 when I decided to make DoC available to Android and all iOS phones and tablets.  Since then, Android app has been released on 1 June 2016 : GOOGLE PLAY STORE LINK **


Well, almost everyone.  I have exciting news: I am now in the process of porting Dungeons of Chaos to the Unity5 engine.

Which will mean DoC will be available to all iOS and Android devices (*insert boring disclaimer about old operating systems here*).

I had a few other game projects running but have concluded that DoC is where both my passion and my expertise lies, and I have just got so much positive feedback from fans that I think wideing the fan base by making it cross-platform is the way to go.

There are obvious challenges in doing so, which I was aware of before, and here is the latest take on them:

(1) User interface, how can I make it work on devices with screens as small as a smartphone?

This was my biggest concern.  In the existing build under XCode, it was always the question what would prevent an iPhone port.  Answer was the UI challenges.  Now, through gaining more expertise in Unity5 via my other 2 projects, I think I am comfortable finding a way.  There are still about a dozen buttons that are relevant while wandering around or fighting mobs, but I will probably make some dynamically disappear and reappear as relevant.  Bars with available fight spells and skills will probably slide in and out of the right side, so I can retain enough space for the fight arena.  The issue under XCode was that I did not even use buttons, I just used layers in the Tilemap and registered the clicks on the respective Tiles.  So this main obstacle is now theoretically resolved as I know what to do.

(2) Fight arena and map display, how can you accurately click the tile you want to click on a screen as small as a smartphone?

 Several solutions, all are technically possible I just need to make a decision: in overland map mode, I will introduce a zoom function.  problem solved.  everything you need to see from a distance you can still see when zoomed out, everything you need to interact with would be close by so zoomed-in view will be fine for that.

In fight mode, the issue is more complex.  In fact, the reliance on click-to-bash actions may be something I need to rethink.  I know the auto-fight option is everyone’s darling now so a zoomed out view would be fine since you hardly ever need to hit a specific tile accurately at all.  But for those boss fights where you use specific / daily / powerful skills and spells, I will need to think of a way that you can see a lot of the arena while still being able to select a target.  I don’t want to introduce target lists etc, that would be a major deviation of how the engine was built and take too much time to change.

So I will now go full steam into the Unity development, and hopefully in a few months many more people can enjoy Dungeons of Chaos.  Since I don’t want to remove the current DoC App from the App Store, I will probably give it a new name like “Dungeons of Chaos – next generation”, which will also hint at the Chapter3 development of having a bunch of adventurers trying to find out what happened to the initial set of heroes…


this is how the main inventory screen will look like for example, feels nice and readable on my iPhone:

(ignore the character pictures in lieu of items etc., I just put dummies into the images)


Dirty coding (or: how performance issues turn into bugs who turn into nightmares)

I think it is only fair that I keep the community up to date on what these funny performance issues are that I keep mentioning in my release notes, and why there are comments around about some people experiencing crashes and odd issues.  It makes for a good read if you have a slight interest into coding as well, as it shows you how little things can have big impacts.

The background, bear with me this is going to be important:

In the very early stages of my game, I captured information about what monster spawners have used up how much of their monster count.  Each spawner emits a monster group, and if the party engages with that and wins, the spawner needs to check if it is allowed to spawn another one.  So this is saved in the savegame as each new game will start with zeroes.  Because the world was simple and small, I just captured the MAP, the spawnerID and the COUNT.  in a dirty way: I kept each in a separate array.  so the 3 arrays always have the same length, and the 1st entry in each will give you the number of monster groups that spawned and got killed from a certain spawner in a certain map.

A boss monster for example comes out of a spawner with the MAX_EVER setting of 1.  Skeletons near the undead tomb come out of a spawner with the setting MAX_EVER 100000 (never runs out) and MAX_AT_ONCE of 2.  Which means there can be 2 skeleton groups walking around at any time, if the ones walking around plus the ones killed in the past are not >100000.

Here is where the trouble starts:

Every time the party walks one tile in a map, all spawners check if they could be spawning something.  In order for spawner #3 in map #1 to check how many of its previous spawns got killed, it needs to go through the ENTIRE array to check if there is an entry with this map and spawnerID.  No problem early in the game, the maps were hand-crafted and had a maximum of maybe a dozen spawners.  But as of now, the game has 60 maps and some random ones can have >250 spawners.  So EACH step walking through such a large random dungeon, 250 checks are performed and each check goes through the entirety of all 3 arrays.  8^(

Performance wise, that is B*sh%t coding.  When people complained about performance issues recently, I noticed that.  2.0.5 kept the original data in its awkward form but on entry into a map creates an easy to search array with just the pieces of data relevant for this particular map.  That is what the “Loading” screen is about that got introduced with 2.0.5.  However even this could take >10 seconds for some people and that got me thinking something may not be right.  So I finally said this morning, let’s replace the awful array structure I had with a clear 2-dimensional array of MAP x ID where you can quickly query the right piece of data, and overwrite it as well. Because this means saving a new piece into savegames, I handled this very carefully.  On savegame load, my new 2.0.6 version creates a new array out of the old data.  I thought, for an advanced savegame there are maybe 2,000 spawner data pieces there, should not take long even if I let the game print out the number at each step.  I should see it ticking down from 2,000 to 1 pretty quickly.  I took a savegame that behaved slightly slow-ish, but not as slow as what some players reported, and loaded the game.  The ticker started at 180,000 and going down… I stopped it.

It became clear now that the performance issues people experience are the outcome of two things extrapolating each other:  a data structure that was sub-optimal, and a super large data set to start with.  And I had no clue why it was so large.  If you kill a monstergroup from a spawner that you killed one before, it would overwrite the COUNT, not add a new data set.  So 180,000 is far more than all the spawners in all my maps together (which is about ~3,000).  so there was something seriously wrong.  The arrays collected garbage data and it clogged up everything.

To cut a long story short, there is one other instance where data is added, other than when you kill a monster group.  When I created the undead wizard quest VERY early in the development of this game, I wanted to make it feel like something more than just killing a particular monster.  I wanted to make the skeleton spawners outside the tomb stop spawning, as if you had stopped a source of evil power.  By adding three data sets with count of 999999.  When I analysed my 180,000 entries I found that 99% of them were copies of these entries.  I have re-written that bit now.

I have now also replaced all bits of my code that used the old data arrays, so now there is only one [MAP x ID] array and the performance issues should disappear, as well as the odd long loading times, and even the odd long save times.  I saw that with this 2.0.5 issue some also experienced crashes when it says “saving”.  that is odd, I will need to see if I can reproduce it.  I can only imagine that maybe the file size became too much.

As with all such bugs, apologies for the inconvenience.  Hang in there, I will fix them as they come up.

Kind Regards,


Skills and spells

Trying to decide which new skills and spells add the most tactical depth, retain class balance, make advanced classes interesting and desirable, pave the way for the party to become powerful enough to fight some REALLY nasty enemies without making them all-too-powerful.

Current skills and spells I am considering , I will keep adding to this:

  • SKILL (knight; cooldown) DEFENDER: increases evasion for adjacent allies.
  • SKILL (???; daily) SURGE: boosts speed by 100 for 250 ticks (~3 normal turns turn into ~5 turns)
  • SKILL (berserker; cooldown) SMASH: stuns all adjacent enemies, high chance and effect, but no damage.  good if you really have to tank.  or if you want to not take any damage against a medium type enemy
  • SKILL (Exorcist; daily) HOLY LIGHT:  10-15 base damage but 500%-1500% undead bonus! range widens with skill level…
  • SPELL (Exorcist) HOLY WATER: sprays holy water on a target. if undead, deals ongoing damage for a long time.
  • SPELL (exorcist) BANE: massive spell cost, but massive damage to an undead creature, stunned if not killed
  • SKILL (exorcist; daily) TURN UNDEAD: very exhausting, but can clear the ranks of undead…
  • SPELL (priest) HEALING AURA: heals all but best if close by.  costs lots.  makes dizzy. [IMPLEMENTED]
  • SKILL (priest; cooldown) SONG OF HEALING: low but ongoing healing… ?? starts of with very minor heal impact, but powerful at higher levels because it is an unlimited skill (cooldown not daily)
  • SPELL (priest) MAJOR HEAL: strong version of heal, cures all conditions, and can revive the undead out of combat with OK chance
  • SPELL (priest) RESURRECT: 100% chance to revive with 50% health, even IN combat !  (where to place? no corpse?)
  • SKILL (monk? ranger?; daily) REVEAL: shows all monsters HP bars for a while.  DAILY skill but many uses per day …
  • SPELL (geomancer) GEOBLOCK: resistance to all elements and for all players.  impact and duration inc by level… but geomancer immobile for the duration…
  • SPELL (wizard) SLOW.  very costly and difficult to learn, but powerful indeed.  magic resistance has SOME softening impact on the outcome although not fully nullified either way
  • SPELL (archmage) MASS SLOW.  super costly and immobilises the caster.  but well worth it.
  • SPELL (geomancer+) IGNITE. sets all foes on fire, not simply dealing initial fire damage but ongoing fire damage!  not very costly, however not very strong either.
  • SPELL (exorcist) DIVINE LANCE. long range vs. undead spell (magic+physical with high %).  needs LOS. cannot miss.
  • SKILL (samurai; cooldown).  FLURRY. you channel your ki to make a triple attack against one target.
  • SKILL (samurai, assassin; daily).  WARP.  like shadow shift but any square and super low time cost.
  • SPELL (??) TOXIC CLOUD. high poison impact.  area effect.  no range limitation! (conjured), just LOS needed.
  • SKILL (warlock, archmage.  less so: wizard; daily) DUEL.  you attempt to drain a target of its spell points by investing your own.  your power vs. their power determines the outcome.  a true warlock does not wait for many punches to be thrown.  He wants it settled right away: who is the master?
  • SKILL (assassin; daily) FOUNDATION.  melee range. you prick the target with a specially selected substance, preoccupying the targets immune system and making it much more susceptible to poison (reduce resist by 3/4 but not below 10%), unless the subject is immune to poison (=>99%).  does not last very long and cannot be used often per day.
  • SPELL (druid, geomancer) STORM.  a bit like lightning strike, but hits ALL enemies.  good to clear the battlefield of minions.  very few enemies have strong resistance to lightning.
  • SPELL (geomancer) SHOCK.  an electric charge dedicated to paralyse an enemy. the higher the spell level, the longer the duration.  game changer at high levels as this is a ranged spell you can use to influence how some fights on the battlefield develop, or to stop monsters from advancing too quickly at you.

any suggestions or feedback reply below or email me at dungeonsofchaos @

Chapter upon Chapter …

Have just taken stock of all the bits and pieces I still need to do and conceded two things:

a) once finished it would create a ‘Chapter 2’ that is about 4 times bigger than Chapter 1.

b) I got no chance finishing this in a few weeks.

So I am about to re-define where I will draw the line, I think if Chapter2 has twice the depth and content than Chapter1 then it will please the masses, and waiting much longer for an even bigger release would not actually be a good idea because it means people have put down the game for too long.

So I am now taking the following into consideration when defining Chapter2, with a view to release before the end April:

– includes ability to change SOME classes (where the storyline develops that you encounter the respective guild: warriors, knights, priests for sure, probably also geomancer, exorcist, assassin.  unlikely: warlock, marksman, samurai).  I want class progression to be linked to side-quest achievements so that is why it requires content being built. Half-way through this and about to build the actual user interface for it which should not be too complicated.

– includes class insignia. DONE.

– includes new spells and skills.  Still a fair bit to do on this front.  I am not short on ideas but I want things to be balanced, so am trading carefully.

– more challenging monsters. DONE.

– enough off the track exploring.  DONE for the maps developed so far.  Still need to beef up the northern valley, swamp, frost mines.

– NPC depth and some interesting characters and jokes.  on the back burner.  hope to get this done when all else is finished.

– some meaningful randomised locations, with two being infinite re-creating locations.  for those that like to grind.  Concept is done but they are not built yet.  I want to include a way that these have rare chances of spawning a really challenging location.  just need to find some headspace to design this.

– what will not be included in Chapter2 under this approach is a direct confrontation with the evil forces, that will then be Chapter3.  Maybe I will make it so that they have split up to spread terror and you can kill some of the winged ones in specific settings in Chapter2.

If people want to help me, they could:

– email me with some suggestions on spells and skills.  Always looking for something that is not just brute force but a balanced special feature that adds tactical depth: something powerful but short range, something area effect but not good against all types of enemies.  Something that drains a lot of spell points. Something only useable once or twice a day.  Something that leaves the user/caster with a debut (slow/paralysed/stunned for a while).

– some suggestions for pure stand-alone mini locations/hidden treasures

– funny little villages. I have to build some for the valley and these take time.  Something like the “All the way INN”.

Email me at dungeonsofchaos @ with any suggestions!

And thanks for waiting.  I promise it will be worth it.




Ok, this one is a tough topic.  Balancing.

Can mean many things to many people.  One aspect is: if the game has replay value where you can select different classes, races etc., then it should retain a certain debility/difficulty.  I don’t believe in that concept, rather it actually gives a different (=interesting) game feel if you had experienced an easy game and then you have to think a bit harder playing with more complex characters.  Or you had a tough run and can then enjoy blasting monsters away and exploring everything more easily.  So I am not concerned if someone says it is hard to complete the game with monks and barbarians only.  It may still be interesting to try it.  My main rule is: SAME IS LAME.  And another rule I follow is: I don’t want to claim that I know what exactly it is about my game that is fun.  May be different for everyone.  You can play it in many different ways, for example setting a high or a low difficulty.  OR grinding and exploiting loopholes/spawners etc.

And that leaves me to the second type of Balancing: to make sure a monster is worth twice the XP of another one because it is twice as hard.  This is a type of balancing that I would like to achieve, but find really hard to do.  First of all a monster is hard depending on how you approach it.  You will find the PESTILENT SLIMES in Chapter2 really tough the first time you come across them, but later you know how to deal with them.  STONE GOLEMS are a problem if you have a melee-focussed party, but with a few spell casters or archers that can stay out of reach, you will be fine (eventually).  But if you notice something REALLY out of whack in that regard, please let me know.  I think everyone is mature enough not to exploit something and than complain later that he could, but some balance in how players are rewarded is my goal.

Another type of Balancing is relevant for multiplayer games: there the developer needs to make sure the player does not feel disadvantaged vs. other players due to the choices they made.  IMHO: that is bullshit.  That makes a lot of games LAME.  They try to make up for it by other means but I think that approach is futile.  Choices are only meaningful if they alter the outcome.  If all big choices lead to the same outcome (class choice), and all small choices lead to disastrous outcomes if not made perfectly (min/max-ing), then that is not a game for me.

So please enjoy my game in whatever form you like.  If you just love trawling through the very last corner of every randomly generated orc lair, be my guest, it is there for the taking.  If you love to spend ALL your money on that slightly off-balanced powerful item with the unusually low price, go for it.  I think there are certain elements of the game where your exploits or too-perfect choices can make the fights quite easy, but I think that is fine with me.  You should decide for yourself whether you counter that with a high difficulty setting.

Feedback welcome, let me know how you experience DoC in that regard: any dull stretches of gameplay? or is it particularly pleasing in that you found a way you love to play it?  Leave a comment below, keen to hear your views.

Monster behaviour

So, I think it would be an interesting read if I explained how monster behaviour is configured in DoC.  Apologies if not.

I would not call my monster behaviour routine ‘AI’ because for me ‘intelligence’ would entail that the entity would either make an attempt to define winning vs. loosing behaviour and make preferential choices, or (far beyond that) observe and understand the rules that a fight follows and define experimental strategies.  Computer enemies in most games do neither of these two.  Mine is no exception.

That is simply because half-arsed AI is not impressive or enjoyable at all.  Predictable but unique monster behaviours is however.  You learn how a monster behaves and adapt, preferably as a required step to actually beat it.

So here is how monsters behave in DoC (as at 1.6.4.  Maybe I will expand this later):

Each monster has a starting number of spell points, and a certain extent of ability to regenerate them. For some this is relevant, other monsters don’t use spell points at all.

Each monster then has a unique set of actions (between 2 and 12 is normal), each consisting of:

– the minimum and maximum distance to the closest player, as a condition to determine if an action is considered when it is the monsters turn.

– required pre-condition.  this is also checked to see if the action is ‘available’.  The boss spider for example has an action that spawns a brawler spider, but only if the precondition ‘50% hp’ is met.  So essentially the boss spider spawns an ally when it lost half its hit points. a really good trigger mechanism that most games use for boss monsters for example, makes the fight tougher after initially looking to work out or the player.  ‘placetomove’ is another common precondition used for the ‘advance’ action.  most actions have ‘none’ though.

– spell points required. zero for most actions, but spell casters obviously have spells that manifest themselves as actions, and they can run out of spell points to use these.  There is also a monster action called ‘blood ritual’ which has a negative spell points requirement, effectively meaning that the monster recharges its spell points.

– ‘recharge needed’ and ‘recharge counter at start’ combined are a very important parameter. walking or hitting or shooting takes time, but those basic actions do not have a recharge counter.  any special ability does though.  for example an orc may call for help, effectively spawning another orc or two at the fight arenas edge.  This ability has a ‘recharge needed’ of 700, which equates to about 7 turns.  The ‘counter at start’ is 400 so at the start of the fight the orc is 3 turns away from having this action available to him.  Setting ‘counter’ to 1000001 and ‘at start’ to 1000000 effectively means a monster does something ONCE but never again, and very early in the fight.

– ‘chance if possible’ is the next parameter.  this is very important.  if an action has all its preretirements met (distance, spell points, recharge counter) it is included in the list of available actions at the monster’s turn.  Out of those actions, each has a chance of being chosen, proportionate to its ‘chance’ parameter against all the others. So if I really wanted that skill with a 1000001 recharge counter to be used ONCE and at the very first turn, I would give it a high chance as well.  The “50% HP” action from the boss spider is such an example, when it is available I want it to be used as an absolute priority.

– ‘time required’.  Once the action takes effect, this is a timer to determine when it is again the monsters turn.

The above determines the behaviour in terms of choosing actions.  Actions include:

– moving towards players

– moving away from players

– hitting a target close by

– shooting from a distance (min distance would usually be 2 and max distance would be the range of the attack)

– ‘shooting’ an area effect spell

– blast: hit everyone in a set distance from the caster

– spawn someone, either close to caster, at edge of arena, or close to players

– heal himself or others

– buff himself or allies

– debuff players (cursing)

– write a message to the fight log

– dying

In combination, you can create really unique behaviour. For example in Chapter2, an enemy will summon a lava orb next to the player that explodes a short time after.

The lava orb is a monster with the following actions:

1) message “The strange ball starts to vibrate…” – super high chance to be used, super high recharge with counter filled up (=so not used more than once), so this will be the first action.  time it takes = 100 so the next action is 100 ticks later.

2) blast: fire damage to all <2 away.  super high chance to be used, super high recharge with counter 99 ticks away from being full.  so this 2nd action taken effectively after the message above.  time it takes = zero.  so the orb does another action right after.

3) die.  recharge = 99 ticks away from being used but super low chance to be picked.  only picked because it is the only action left available.

So the above is how a bomb behaves.

More normal monsters are easier to model of course, such as an orc:

– ‘advance’ with 500 chance to move forward a step. used when min distance to next player is 2.

– ‘melee’ if in range 1.

– ‘buff’ to use a rage skill every 400 ticks (recharge).  any such effects has many more parameters of course (what is buffed: accuracy, evasion, damage etc.) and a timer how long it lasts.

I hoped that provided some interesting insight how monster behaviour is created.  Feel free to comment or suggest improvements.