In the mouth of a broad tunnel, they paused to look one more time upon the fair land of Midnight.

Here is something that I have been working on in the background – Tunnels in The Lords of Midnight. It’s not something that is going to be used in the main game, but I am hoping to have a new scenario released later this year, early next at the latest.

For those of you who have read Drew’s novelisation, then the need for tunnels will make sense. For those of you who haven’t, well something for your list…

Normal Tunnels

Now, you’d think that adding tunnels to LoM would be pretty straight forward. It is as you may know from following my posts, the same codebase as Doomdark’s Revenge, having been unified a few years back. However, there are some issues.

Firstly, even though they are the same engine, and use the same data structures etc, the games are built conditionally as separate projects. This means certain part of the engine is not compiled depending on the games. For example, tunnels, mist, AI lords, special objects, are not part of LoM. Regiments, Ice Fear, and Waypoints, are not part of DDR. There are other little things like critters and battles working differently, and small UI changes.

The engine is written in c++ and most of these features are turned on or off using preprocessor macros like this..

            if ( !IsDead() ) {
#if defined(_DDR_)
                flags.Reset ( cf_inbattle|cf_wonbattle|cf_preparesbattle);
#endif
#if defined(_LOM_)
                flags.Reset ( cf_inbattle|cf_wonbattle );
#endif

Some of it is handled with c++ object inheritance.

Some of it is not handled very well. The code base, like many projects has morphed and evolved over the years. I as a 30+ year veteran software developer, understand the vast gulf of academic based code structure, and real world getting it done with deadlines. And it’s no surprise that the engine has many of these pitfalls.

The following piece of code makes sure that two characters tunnel status is the same. ie: These two characters can only see each other if they are both either in, or both out of the tunnel.

#if defined(_DDR_)
            // they both need to be in or out of a tunnel
            if ( c->IsInTunnel() != IsInTunnel() )
                return false;
#endif

The thing you will notice is that the preprocessor check that will include this code is _DDR_ which means, it only gets compiled when I build Doomdark’s Revenge. Ideally this code should either be governed with a _TUNNELS_ feature preprocessor macro or better still, a feature check based on the capabilities of the scenario. So, that was the first thing I had to do and it took a few iterations to get it right.

The landscaping view for DDR is different as it has a header, therefore the tunnel view needed to be modified.

New graphics were used to distinguish the two.

Text had to change. The DDR strings database has ways of describing that a character is in a tunnel, or can see and entrance. LoM did not.

I found a bug on the think page that is in DDR in that it will show you information about a character in a location that does not have the same tunnel status. There were a couple of other UI issues specific to LoM for showing characters or armies in a tunnel. These just come out of different code paths.

Narrow tunnels

You will notice in the above image, a slightly different tunnel view. This is for narrow tunnels. The novel explicitly has Farflame not entering the tunnels when Morkin does even though they are together, and this is because he is too large. This is a story specific plot device, but that makes no sense when we consider the tunnels in DDR. So the change I made to accommodate this was to have normal and narrow tunnels. In this instance Farflame can enter the tunnels, but there are some important areas that he cannot go because they are too narrow, and the game indicates this with the slightly different layout. Narrow tunnels will also be extended to armies, and too many characters in one location.

Something else I have done with the tunnels is to tweak the concept of entrance and exit. In DDR these are always one of four terrain types – Palace, Pit, Gate, and Temple. However using the mapping software you can now override this and mark any location as an exit, an entrance, or both.

Tunnel view in mapping tools

And finally, while I was make changes for the mapping I extended two other features. Firstly impassable mountains. This was added as a rule recently to help make games optionally harder or just different and it was locked to just mountains. However, I have now added a feature to allow any location on the map to be marked as impassable. In this instance it will be used for all the mountains around Ushgarak. This means that the only way to enter the plains of despair is to take Kor and Grarg. The slight pass at Vorgath as been closed off but I am having to think this through a little more because of the consequences to a western attack.

And finally, respawning of things. In DDR critters and things (claws, thorns, springs, etc) regenerate randomly. I am planning on adding this to LoM as a rule, but for the next scenario I am also adding it as a mapping feature so that certain locations can respawn. In this instance I am using it for critters in the tunnels.

Tunnel Exit

There will be more information about the Novel Campaign later as I work my way through it.

The Solstice. Doomdark grows stronger yet. We must act. I know no more.

I’ve been quiet of late. No real reason, at least no more than just life in general. So I figured a quick update is probably in order.

I’ve missed two release schedules. I intended to release a patch every quarter, around the solstice and equinox. Well, I missed the Autumn Equinox release for no other reason than I hadn’t done anything. So I bumped it to a Winter Solstice release… and well… you’ve probably noticed the lack of a release. This means that it will now be bumped to the Vernal Equinox. I’ll try and get on this one… please bear with me…

There will be two Doomdark’s Revenge bug fixes in the release that have already been fixed.

There are currently three features marked for inclusion.

The first one is interesting as it was reported as a bug, but as far as I can see it is actually a problem in the original data. So yes, it is a bug, but one from the original release. I have no issue fixing this as I don’t think it will really have much affect on gameplay.

One other feature that was tentatively going to be in the next release was

Game Difficulty – Easy / Medium / Hard

The reason for the tentative status was purely because it needed more thought than what I added on the ticket, but ultimately I need to start somewhere with it.

Anyway, that’s what I’ve not been doing for the last 6 months…

The dawn did not linger but hurried on its endless journey

3,287 (or 164 score and 7) days have passed since I released the first version of The Lords of Midnight remakes on the Apple Store. Over the next few days, weeks, year I would release both The Lords of Midnight and Doomdark’s Revenge for iOS, OSX,  Android, Amazon Fire, Amazon Underground, Windows, Windows Phone, and Blackberry.

As you all know the choice to continue the remakes was difficult after the loss of Mike, but in the end I felt the need to keep these games in some way alive on modern devices. To that end I chose to keep the game look and feel very similar to the original and just apply a light refresh or paint job.

You will also know of the issues I have had with the SDK that the games are built on. Without going too technical, the games are native c++ but in order to reduce the workload for me, I used a thin amount of an SDK called Marmalade to help facilitate the cross platform support that I needed. But Marmalade got out of the business and I had to move to another SDK, Cocos2d-x, which has taken some time.

About this time last year I almost finished the migration after having bitted at it over the previous few years and I was making really good progress until life kicked in and completely floored me when it came to any personal projects and development. Basically the increase in workload brought about by the Pandemic just made sitting in front of a computer in my spare time – a misery.

I finally started picking up again recently, and here we are…

So I am glad to say that The Lords of Midnight is now available again for iOS, OSX, and Android. Windows will be available just as soon as I work out the best way to distribute it as currently the old versions are still available on GoG. These games are now completely free and will remain so. (I may add other purchasing options later for additional content). Doomdark’s Revenge will follow very shortly. The game is fully running I just need to do a lot more sanity checking.

The frontend of the games have been completely rewritten so some things may feel a little different.

There some known issues… 

  1. There appears to be a random crash bug that I have been chasing down for a while. As far as I can see it has something to do with the graphics rendering of the SDK but as of yet I have not been able to pin point it. I will keeps chasing this down.
  2. Incorrect sizing of filter buttons on mobile
  3. Android back button doesn’t give option to close the game from the main menu

There are some missing features…

  1. The compass has been removed. This will be replaced shortly.
  2. Some of the gestures have not been recreated yet.
    1. Pinch and Zoom on the map
    2. Quick access to the Map from the look screen
    3. Drag to move
  3. Button to revert scale to normal on map screen
  4. Use of haptic feedback on mobile
  5. Next and Previous buttons for desktop on think and select screen
  6. Cursor image on desktop
  7. Escape key usage on desktop
  8. Shortcut keys on desktop

And a few features I wanted to add which I will try to get in soon…

  1. Add filter for ‘Hidden’ on Map and Select screen
  2. Add option to disable ‘Are you sure” for night prompt
  3. Add in game option on Tutorial popups to mute/unmute tutorial

There will likely be a new build in the next few days as I made a couple of changes during the Android release that needs to ripple through to all versions, I just didn’t want to mess with the current release schedule by submitted the latest changes to all variants.

Moving forward I am not 100% sure what approach I am going to take. I am already aware that Cocos seem to have downgraded the importance of their c++ engine as there hasn’t been any updates in the last two years. I’m already starting to move to a new system – this time Unity – I think this might have more future proofing. The only problem is, this becomes a complete rewrite in c#. In the end this opens up much more opportunities for the future direction of the games. It may be that the current versions are kept ticking over as they are as I focus all my energy on rebuilding the new system.

Anyway, apologies for the delay, but I hope you can all enjoy The Lords of Midnight and look forward to Doomdark’s Revenge in the New Year.