Midnight Status Update

This week has seen The Lords of Midnight finally get the 1.12 update across all the stores. That means that OSX and Blackberry players can now enjoy the features that other users have had for nearly 4 months. Sorry about that, the OSX issue came about because I could no longer submit to the App Store, and it has taken this long for Marmalade to fix the issue, and Blackberry was just an oversight – never noticed that I had not updated it.

Doomdark’s Revenge has now hit version 1.2 across all stores. This resolves a number of early issues and brings the remake more inline with the original. There is still some work to do on that, and version 1.3 should be pushed out later this week which will hopefully close off the remaining problematic areas. You can see a full list of upcoming changes here.

I’ll be honest, it has taken me by surprise at the number of issues that crept through the testing process. Looking at it with hindsight, not enough testing occurred that compared it to the original. I have spent a large amount of the last two weeks pouring over the original code looking for subtle things that I had previously missed, in order to try and explain the variances. For example, Shareth’s stronghold is Imiriel, but for the routing AI it get overridden as Glireon. Morkin is actually and AI lord which means he moves. And, Characters will not attempt to recruit another character while at a stronghold.

The OSX version of Midnight and Revenge both have a problem with Mac Book Pro Retina screens. I shall be looking into that. As a work around, place you laptop in one of the smaller virtual resolutions, start the app and then change it to Large Window mode in the options. The change you desktop resolution back.

I thought the War was lost and Midnight doomed.

battle_full_linesI’ve been working my way through the outstanding bug list. One of the areas that seems to cause contention, is battles.

It causes me some problems because the original is actually pretty haphazard where battles are concerned. So I’m going to talk about the battles in a little more depth, just so that you can get an understanding as to why certain things seem to be happening.

Firstly, night processing goes like this…

1. Reset all characters at dawn
2. Give all AI characters their turn
3. Process Battles
4. Place things on map
5. Move Mists
6. Remove things from map at location’s where characters are
7. Check if characters can recruit soldiers from strongholds
8. Re-spawn armies at strongholds
9. Check for important deaths

Secondly, the interesting point here is, characters are given a chance to move BEFORE battles take place. So, if you attack a character, there is a good chance he will move and thus a battle will not take place.

To understand that a little more, let’s look at the AI turn.

The AI character must decide what to do every night. Each character will react to a number of objectives.

1. Goto Liege
2. Goto Foe
3. Goto Object
4. Goto Home
5. Do nothing

If they have a liege, and that liege’s objectives are 1 or 2, then this characters objective also become 1 or 2.

Otherwise, we pick a new objective

When picking a new objective we pick a random number between 1 and 16. If we choose 1 to 5, then these are our objective. Otherwise we continue with our current objective.

So as you can see, there is a 68% chance that we will just continue on with what were we previously doing. Which means that unless you are at a characters stronghold, and his current objective is to go home, then the likelihood, he is moving away from you.

There is only a 6% chance that the character will stay at his current location.

Personally, I am very surprised at these stats, because it makes battles bloody difficult. Unlike The Lords of Midnight where a nearby army would drop everything to attack, or an attacked army would stay until the death, in Doomdark’s Revenge, everything apart from battle seems to be of more interest.

Baby Steps

I have been looking into a couple of issues still plaguing Doomdark’s Revenge game play.

The first one is movement. I have to admit, I dropped the ball on this one. I wrote this code so long ago, that I assumed it was working. Well it isn’t. And there are three issues at play.

The first issue is actually a bug fix.

There are two versions of movement tables, one that the Spectrum used, and one that the c64 used. What these tables do, is decide which terrain the character gets for free. The problem is, the spectrum version had a bug. It didn’t point to the required table, it pointed to random memory. Therefore movement on the Spectrum doesn’t work as intended. I had fixed this bug. Which means, movement on the new version isn’t the same as either the Spectrum version of the C64.

Secondly, The Lords of Midnight movement code is based on leaving the current location. Doomdark’s Revenge is actually based on the location you are moving into. I had this wrong.

And thirdly, if you move into a location with a critter, you take a penalty. However because of the difference in the way I implemented the critters on the map, ie: 0 = NONE, whereas 0xff is NONE in the original. My critter check was always triggering. Thus you always got a penalty.

The three items combined, make for pretty shoddy movement, when compared directly to the original.