Many battles fought again by tongue

Strange day today. Not just because it would have been Mike’s birthday, but because for some reason I found myself fixing a bug in Doomdark’s Revenge. Back in January I had a bug reported to me by Simon Foston, I managed to get some save games from him and just needed to find some time to look at it. Now, it’s taken a little while for me to find that time, but for some reason I looked at it today. It wasn’t a conscious decision, I was just looking through some emails that needed dealing with and noticed Simon’s bug report.
A quick look through the code and with a tip off from Simon’s report, it became apparent that the ghosts of dead lords were continuing to take part in battles. I checked the original code and it looked as if the bug was there too, however, I then found that the isDead check was happening later in the process. Strangely what it means is that battles at a dead lords location are processed as part of a dead characters turn, and not as part of other characters in the location. In my case, I’d missed the later isDead check and therefore the dead lord actually took part in the battle.

 

So, it seemed strange to be working on a bug in Doomdark’s Revenge that included the dearly departed, today of all days. I’m sure Mike had a wry smile..

Related Posts:

This time you’ve got me to help you…

A few months back I received an email from Marmalade Studios. Marmalade is the system I used to give me cross platform support. I pay for a licence yearly which is still covered by the ongoing sales on the long tale of the game. Anyway, the email informed me that Marmalade were pulling out of the Tools business to focus on their own development. They laid out a timetable and final release plan for the current tools but ultimately from March 2017 they will no longer be supporting their toolset. There was an offer to purchase rights to the source code, but as a small indie, that’s not really an option.

This doesn’t affect the current releases, but what it does mean is that any chances of me producing updates in the future have almost certainly been removed. And with every new OS release, the chance of the game not working are increased.

I know I have not been prolific with updates since the release of Doomdark’s Revenge settled. There was so many things I wanted to do, but just haven’t gotten around to. The reality is two fold, as amazing as the sales of the games have been, they are obviously not enough to support me full time, and secondly, the games were written quite frantically in the end and I never regained that sense of purpose after their release; this is not just for these games but for everything that I have been doing creatively.

I’ve been trying recently to tie up another release. The main reason for this is to produce a build with the latest version of Marmalade and get it out there to properly support the latest devices. In theory a new release should keep its visibility in the App Stores for a few more years. As part of this I’ve been slowing adding a couple of features: Discovery Mode, Difficulty Modes, Rationalise the code base between DDR and LOM. etc..

So with all this in mind I have been toying with the following: Uploading the source code to GitHub and making it open-source with the objective of transferring it to another cross platform solution, Cocos2d-x for example. Or, allowing people to port the engine to any other coding languages they like, so it could be used however they like.

The current codebase is written in c++, and thus moving to Cocos2d-x makes sense, but I quite like the idea of porting to c# or swift.

Moving to open source could also allow for the tool chain to be fully developed which would allow for more work to be put into ongoing development of the games.

Anyway, I shall think on this more, but if anyone is interested in getting involved, then drop me a note…

 

 

Related Posts:

In the forest, the trees grew tall and shady and bright flowers carpeted the floor

Screenshot 2016-01-06 23.01.13I finally got round to spending some time converting some Citadel data. On of the issues that I had was that I have the map data in LBM image format. It’s obviously not a great format for the terrain data, but this was given to me by the original programmer and I’m not sure how they were processed for the final game. The other issue is the difference in game styles. This data is for a 3d free roaming map and some of the maps are different sizes. The region map are 128×128, however I can’t believe that the citadel could be played out as a 2d landscaping game, without seriously playing with the time taken to move. Therefore, I decided to make the Citadel map 256×256, this is in keeping with the map that Mike drew up for Eye of the Moon, and therefore as the Bloodmarch was originally going to be the setting for EotM it seems fitting to go with the same size.

Last year I did some work on transferring The Lords of Midnight and Doomdark’s Revenge maps into Tiled. I figured that if I could create a tool chain from that, I could possibly edit the maps for future campaign updates to the games. I did all the work on converting to Tiled and coming up with data formats, but never did any work on the toolchain to get the data back into the game. This is something I still need to do.

With that in mind, I produced a draft Tiled version of the Citadel map which you can download to take a look at. It has layers for Realms and Regions, and then individual layers for each terrain type. The Citadel map was very sparsely populated compared to LoM and DDR, and although the current terrain types account for 19 different terrain, which is actually three more than both LoM and DDR, these terrain really are base landscape terrain. Land, Water, Trees, Mountains, Swamps, etc…. it is lacking anything remotely of interest. There are no Liths, Villages, Hits, etc…

If a game is going to come of the Citadel, this is something that is going to need to be rectified.

LoM and DDR pretty much share the following landscape terrain types: Mountain, Forest, Downs, Lake, Frozen Wastes, Plains, and Hills.

LoM adds: Citadel, Henge, Tower, Village, Keep, Snow Hall, Ruin, Lith, and Cavern, while DDR adds: Gate, Temple, Pit, Palace, Fortress, Hall, Hut, Tower, City, Fountain, and Stones.

The Citadel has landscape types of: Mountains, Craggy Mountains, Forest, Hills, Plains, Land, Valley, Lakeland, Swamp, River, Sea, Bay, Lake, Foothills, Isle, and Downs, and adds: Castle.

As you can see, there isn’t a great deal of variety in those none landscape terrains. Citadel, City, and Castle pretty much replace each other, as do keep and fortress. I seem to recall that Maranor is the Dark Citadel, but I am not aware of any cities.

So, apart from Snow Hall, I see no reason why the additional LoM and DDR terrain types could not be used within a Citadel scenario.

The question then becomes, should there be any new terrains?

My first process is to make sure the Tiled map all holds together. I needs a little tidying up which will need to be a visual process. I’m not sure if there were problems with the original, but I noticed things like trees in the sea. I never got that far in the game, so I don’t know if there were indeed trees in shallow water on the coast line, but a few things like that should probably be ironed out.

At this stage I would like to get some Terrain graphics so that I could drop the map into the engine, and start walking around. There are some issues here, as The Citadel introduces water in a way that LoM and DDR didn’t, so there will need to be engine changes to handle that.

Once a clean version of the map is available, the next stage would be to hand populate the map with the other terrain types. I don’t see this being a quick exercise because I think a lot of thought will need to go into this process.

Only at that stage, will I be anywhere near thinking about an ACTUAL game. There is a lot of underlying work do consider with how the game should work, how the AI in the original works etc. Without help this will also be a lengthy process.

So basically, don’t hold your breath, but slowly slowly catchy monkey…

Related Posts:

We must not think that any task is hopeless…

t_tower0It’s been mentioned to me recently that it would be nice to have modding functionality for The Lords of Midnight. Opening the engine up was something I always wanted to do but I’m not sure to what level this needs to happen. Therefore if there is anyone out there who would be interested in modding LOM or using the engine, drop me an email, and we can discuss what approach to follow to make this happen.

Related Posts:

We must find friends as well as enemies…

A new bug came to light in Doomdark’s Revenge. I had a report of a crash bug that occurs after 138 days, that’s one hundred, one score, and eighteen days since the Moonprince rode forth into the Icemark.

The problem appeared to be that an AI character’s liege was getting set to himself. This causes a problem in the AI logic for a character choosing to follow their liege. The AI goes something like this…

I want to follow my liege, but my liege is dead, so I need to follow my liege’s liege and this character will become my new liege. The code ripples up the liege tree until it finds someone to follow, or bails and decides to hunt down Luxor instead. When the bug occurs it follows the tree and finds a liege who is dead but they are also their own liege, and thus we get stuck in an infinite loop.

Once I found this as the source of the crash, I needed to work out WHY it occurs.

There are only two places where the liege can change, the aforementioned follow liege routine, and being recruited.

I stuck some debug info on both cases and set the game to run on automatic to see if the issue triggered, and it did.

Here is the scenario…

Anvarorn starts with Fangrorn being his liege. Fangrorn’s liege is Shareth. Fangrorn gets recruited by Anvortheon the Barbarian, and thus his loyalty changes to the barbarians, and his new liege becomes Anvortheon. Anvarorn decides to follow his Liege, who is still Fangrorn. When he gets to the same location as him he notices that they are not the same loyalty and thus tries to recruit him. He succeeds. Thus Fangrorn’s liege becomes Anvarorn. So we now have a circular liege issue. This becomes a problem if Fangrorn dies, because in this instance Anvarorn decides to follow his liege, finds that his liege is dead so takes his liege’s liege as his new liege and therefore becomes his own liege!

I went back and checked the original code, and this issue can happen. The only place you would notice it would be on one of the description screens where it would say, Anvarorn’s liege is Anvarorn – or words to that affect. At worst the character would end up following themselves and end up not moving. This is something that has been mentioned as possibly happening in the current version.

When I implemented the liege tree walk, I did just that, I implemented it as a walk up the tree, and because of the circular issue, a dead lord who is their own liege will create a circular loop if they are someone else’s liege. The original code doesn’t do that, it only takes the next liege up the stack and therefore slowly makes its way up the liege tree over a number of nights. Thus no infinite loop.

This would possibly occur with characters following their foe. If their foe is dead it walks the liege tree of the foe to find the next foe.

Fix to follow soon…

Related Posts:

To Luxor, everything now grew clear

Clumping together...I’ve spent some more time looking at the AI for Doomdark’s Revenge, trying to work out why it doesn’t quite appear to be playing like the original. One thing I noticed is that I have completely misunderstood the recruiting logic when it comes to Loyalty and Treachery. I made changes in the last version, but I am going to need to revert them.

The approach algorithm

  • compare the the attributes of the lords and looking for matches gain +1 for each match.
  • If the character being approached is not loyal then +1
  • If the character being approached is treacherous then * 2
  • if the recruiting character is the liege of the character being approached then +3
  • If the recruiting character carries a crown of persuasion then +2
  • If the score is greater than 3 then the approach will succeed.

The basic concept that I have misunderstood is: Loyal characters are less likely to be recruited away form their current liege and un-loyal characters are more likely, therefore the algorithm gets a +1 for none loyal characters. And that treacherous characters are more likely to leave and thus the *2

The next thing I have missed is the lords following the objectives of their lieges.

It works like this.

If the lord has a liege and that liege is following their liege or their foe, then we must follow our liege. Otherwise pick a new objective.

There is a 32% chance that we will pick a new objective. Although that should be 25% because we could pick the objective we already have. That leaves a 68%/75% chance that we continue doing what they were already doing.

The problem for me is the first check. If we use Shareth as an example. She has a 12.5% chance that she will choose to follow either her foe or leader. As she has no leader she reverts to Luxor, which is her foe. So she has a 12.5% chance that she will follow Luxor. All the lords that follow her now have a 100% chance of following Shareth, and this ripples all the way down the stack of lords. Which at the start of the game means that 47 Icelords will disregard what they are doing and follow her.

The mistake I had made is that I had made the following lords take the objectives of their liege when their liege was following their liege or foe. What this means is that when the liege is following their foe the lord follows their own foe. So using Shareth again as the example, when she is following her liege ( Luxor by default ) then all her minions will head to her location, but when she is following her foe ( Luxor ), then all her minions are heading to their foe and not to her location. So as an example, Imgaril the Icelord would be heading to Imgorthand the Fey, who, is likely the the other direction of Shareth.

Hopefully this fix should make the game more like the original, but it bothers me that it is a flawed AI. I ran the game for the first ten days, up until the first battle took place, I ran it on the emulator too to compare notes. Here is what Shareth did over those days.

  1. Head Home
  2. Head Home
  3. Head Home
  4. Follow Luxor
  5. Head Home
  6. Follow Luxor
  7. Follow Luxor
  8. Follow Luxor
  9. Search for object
  10. Head home

Now Talormane does this

  1. Head Home
  2. Head Home
  3. Search for object
  4. Search for object
  5. Follow Lorelorn
  6. Follow Lorelorn
  7. Follow Lorelorn
  8. Follow Lorelorn
  9. Follow Lorelorn
  10. Follow Asorthane

The reason for the delayed follow on day 4 is because Talormane is following Lorelorn who is following Shareth, but Lorelorn is lower in the processing order than Talormane, and thus Talormane doesn’t know that Lorelorn is going to follow Shareth in that turn.

The final thing that I changed was that there is a 6.25% chance that the change of objective will be DO NOTHING. This is especially important for being in a battle with someone who is not the lords foe, because it means that without this the lord will always leave the battlefield. The mistake I had made was that I persisted the do nothing as an objective, i.e.. The lords objective becomes do nothing. But it shouldn’t, it should stay the same as the previous objective, and this turn that objective is ignored.

Going back to Shareth. If she chose to DO NOTHING then her objective would no longer be follow liege or foe, which means that her followers would be able to perform whichever objective they chose. However, if her previous objective had have been follow liege or foe, then her followers should still be heading towards her when she chooses to do nothing. This would have the affect of allowing them to catch up on her.

Related Posts:

Lords of Midnight – Video Footage

Ok, sorry it’s taken so long… but here is a bit of video showing the app running on an actual device. Some caveats…

1. this was taken by my daughter using my iPhone, therefore the quality is poor. But then it wasn’t about showing you the graphics! 🙂 – I will try and do a proper one later. But it may just be that screencasts from the simulator will be better in the future.

2. none of this is final. Placeholder graphics, placeholder ui, placeholder placeholders…

3. this is the first time I have run in on the hardware for some time. I have been through a number of Marmalade SDK changes in that time. This was one of the reasons why it has taken so long – I couldn’t get the deploy to work!

Subsequently, there are a couple of issues. The main one that dragging the main view around doesn’t work, thus the default to click on the left and right side of the screen.

Also, the character selection screen was mid working. So all that you could see was dragging one lord around, with his grouping circle on!

Related Posts:

Lords of Midnight – Video Footage

I’ve been giving some thought to releasing some screenshots of LOM iOS. However, I can’t really see much point. Any screenshots using the current graphics will just show an image of a game running in a development box on my Mac. A game that won’t look to interesting at this stage, because you won’t be able to see any of the intended graphical enhancements. I also have some video footage of the game running that I have used to show some people how the mechanics for the landscaping works. It would also suffer the same issues.

That said, it occurred to me this morning, that maybe what I should do is release some video of me playing the game on my iPad. That would at least show that the game is actually real and not some vaporware concept.

I’m going spend another day thinking about it, and then I might release something over the weekend!

Related Posts:

Lords of Midnight – 1 Year Update

Ok, so I never thought I’d be writing this post. To be honest, I thought I’d be done by now.

It’s 12 months since I first had a discussion about releasing Lords of Midnight for the iPhone and iPad with Mike Singleton. At lot has happened in that year, but unfortunately not a lot on the project.

The delay in what should be a simple project, comes purely down to lack of time. I lost a lot of steam over last year for a number of reasons. There were both technical and personal reasons from my side and Mike had his own health issues that needed dealing with. Between the two of us, the project just fell by the wayside. However, we’ve discussed this at length since the turn of the year, and the next few months should hopefully see a big turn around.

Let me first bring you up to date on what has happened.

The full TME engine was ported to the Airplay ( now Marmalade ) SDK. This allows for the engine to run and target many mobile platforms. Various different libraries were developed to allow much of the UI to happen. And most of the screens that LOM requires have been produced.

The game is fully playable. And I had indeed played much of it on my iPad.

The process now is tying up all the little things required while playing the game, adding a few new features, and then the presentation. The later being no a small issue.

So hopefully, what that means is, there is no reason why the game shouldn’t happen. Everything is in place. It’s just a matter of joining all the dots.

One of the things that I played around a lot with toward the end of last year, was the panoramic view, and scrolling it around with your fingers. Trying to get the process looking and working nice was a challenge. But I think I have a good, if not perfect implementation.

Over the last few nights I’ve been working on the in game map. That should be finished in a functional way by the end of this week. The map auto maps. It works by considering all the locations in your view and then deciding how much you know about that location. So for example, that tower in the distance that you can see, will be added to the map, although you won’t know the name until you are one location away, but that lake sat in the middle of the forest, won’t be. Enemies that you have seen are also placed on the map, for a while. For example, if any one of your lords sees an army in the distance, the army is placed on the map. But they only remain there while one of your lords can see them. After a number of days passing without your lords seeing the army, they are removed from the map.

Currently you can scroll around the map. But I need to put all the niceties that will make the map fully functional.

More soon…

Related Posts:

Lords of Midnight – iOS

Thought I’d post an update for LOM. I realise that it’s been over 2 months since I last had anything to say on the subject.

Firstly, it’s been a busy few months for both Mike and myself. Mine work related and Mike’s more personal. That combined with a little bit of sidetracking on Eye of the Moon.

Two of the issues with this project is time and getting it right. Neither of us are working on project full time and it’s very easy to lose a week before you know it, just because you were overly tired or didn’t feel like sitting in front of a computer. I’m sure that winter is the best time to do development and not in the summer.

The getting it right aspect is about thinking about the project more than actually doing it. Over the last 2 months I’ve been going round in circles about the graphics of the game. I’ve been thinking about a number of different approaches that we have considered for the look and feel, and the way the user interface will work.

The original LOM had a very distinctive look and feel. Simple, but very affective. Somehow with the very powerful modern technology, we have to achieve the same result. I sat down recently and gave some thoughts to the way LOM was going to look, and was not happy. I’ve had firm ideas about the direction of the graphics for a long time. Mike brought new ideas to the party when we start discussing the new game. And in general we had a consensus about the way forward. But then I started to doubt… I kept thinking about Jaws. Jaws works because the brilliant robotic sharks that Spielberg was going to show off all over the place, didn’t work. In the end he had to work around them, utilising them sparingly. The end result, much more suspense to the film.

For LOM, the shark was the graphics. Mike wrung an awful lot from the spectrum, but in the end, the setting of the story was defined by the minimalist graphics – a world full of white snow! So, as you start to up the quality of the graphics you are moving further into working shark territory. LOM was stylistic and I feel it has to remain so. Simple and stylistic.

I discussed this with a few people and then went back to Mike in order to tell him that I thought we were the wrong people to be thinking about the graphics. And that if we continued down the path we were following, I felt we were going to make a mistake. Mike agreed.

So, last week I had a meeting with an artist. Fergus McNeil ( some of you may remember his 8 bit days with Delta4 ) and asked him to take over artistic control of the project. I’ll keep you posted with anything I can on the visuals.

In the mean time. Tonight I am back at the computer – coding!

Related Posts: