Wednesday, February 22, 2012

On Doomdark's Revenge

According to my records today marks 8 years to the day since I released my GBA remake of Doomdark's Revenge. A few people have asked me "are you going to release an Android port of your remake?" - to mark the anniversary the answer is yes! and here it is! [Edit - or rather, there it was. I have removed these remakes at the request of Mike Singleton himself, who is working on his own Android versions]

"Is that Don Quijote?" asked my wife

In addition to an Android port, I've gone back and fixed several show-stopping bugs that were in the GBA remake. The updated GBA version is on my remakes site.
  • Lords artificial intelligence is no longer completely broken
  • Several crash bugs fixed
  • The game is faster (and smaller) thanks to using the right compiler flags
In the Android version I've changed the controls slightly compared to the original LOM remake. In particular, Google has now deprecated the Android menu button. I don't think this means they'll send someone round with a screwdriver to pry it off your old HTC Desire or whatever, but that we developers should stop using it. Up until now I'd always used Menu like the GBA Start button, but seeing this trend I didn't use it here and I've gone back to my LOM remake and removed the use of Menu there too. I don't think anyone will really miss my poor use of the Menu button, it was always a bit of a mystery what it was going to do.

While working on this, I spotted a bug in The War of the Solstice that caused it to crash on versions of Android prior to 2.1. Both remakes share a lot of common Android Java code, so fixing this in one remake also fixed the other. The lazy loading technique described in this blog post makes supporting older versions much less hassle.

In the near future, I am going to update the source code downloads on my GBA remakes site so it reflects the latest versions of everything. One thing at a time.

Back to that AI bug... A keen gamer brought it to my attention back in 2009, but I was busy doing other stuff at the time. Here's what he had to say:
However the AI seems not to work correctly. Using the Spectrum version thelords would usually catch up with their liege or head for their foe or weapon. Using your version there is no Anvildrak, Imgorarg or Kahudrarg heading for Luxor and I have yet to see any pair or group of lords. Instead I've seen several single lords right next to the Frozen Wastes.
At the time I wrote back saying that the bug was probably in the code that decided which way a CPU-controlled lord moves, but I didn't investigate further. Now I fired up GDB and stepped through the AI code. At the same time I also stepped through a suspiciously similar looking bit of Z80 assembly in the original game using fuse's built-in debugger. After comparing notes I immediately saw what the problem was - instead of going towards their targets, my code was sending the lords away from them! What a mess-up, but the fix was simple.

Another "bug" in my remake was a kind of meta-bug. Instead of compiling the code with optimizations on, I had compiled with gcc's defaults. This meant the 2004 remake was much larger and slower than it should have been. The binary came in at over 100kb! This new version is 77kb big - still over twice as much as would have fit in the Speccy's RAM you'll notice - and noticeably faster.

5 comments:

  1. Anonymous12:09 am

    Richard. Sad as it may seem, despite being a massive fan of LoM as a kid it was one of my great gaming disappointments that I never played DDR. I happened to be mucking about with my phone tonight and right before my eyes - DDR is available (in all but name). Thank you! On that note why the change of name for both LoM & DDR?

    ReplyDelete
  2. Thank you so much for this, now I don't have to play through a gba emulator and its even had some bug fixes? awesome stuff. going to download it now.

    ReplyDelete
  3. Anonymous11:41 pm

    Too bad.... I'm a big big fan of Lom and Dr and i missed this one ! I'm so sad. Hope i'll see new Dr soon.

    ReplyDelete
  4. RetroGamer2:39 am

    That "keen player" reporting the AI bug was me. Seems I was a few months too late to download the fixed version. :-(

    Any idea when Mike Singleton's Android version will be ready? And will it be possible to emulate it?

    Sounds rather petty of him to make you take down your GBA version. I bought the ZX Spectrum version fair and square almost 30 years ago, but can't play the Spectrum or DOS version now since they have no auto map.

    ReplyDelete
  5. Anonymous12:34 pm

    Hello,

    I don't want to sound like an inhumane being, but as you probably know, the main objector of publishing this passed away recently. While I fully respect his wish (so he can make his living), now it's kind of pointless, don't you think? So what about allowing the download?

    Also, I'd like to ask you for a favor - if you're doing free retro conversion (which is definitely a great and a kind of "open minded" hobby) for Android, please allow other downloads than from Google Play... Not everybody has access to it (Cheap Tablets without way of hacking it to support GApps suite) and not everybody wants to be Google slave (account + position tracking and all the orwellian stuff). I think both philosophies kind of get along together, don't you think?

    --Z

    ReplyDelete

Note: only a member of this blog may post a comment.