Monday, July 25, 2011

Another War of the Solstice update

Despite my prediction, it actually took 2 comments to get the infamous "this game crashes my HTC Desire". The good news is that I've uploaded a new version that may fix the problem.

You can read about the fixes on the Market, the biggy was a couple of buffer overflows that caused random crashes. Once again, valgrind and some carefully crafted unit tests to the rescue. The trick to embedded coding is to get the code running on a real PC :-)

There's a new feature that's inspired by a pretty novel feature in the original Lords of Midnight - a screen shot record! On the original LOM, you could print out the current screen. I bet nobody actually did that though, as you needed a Speccy printer which were rarer than hens' teeth. Anyway, on this Android version pressing volume up or down at any time captures the current screen and saves it to the SD card. Then you can view the screens in your "Gallery" application.

I've also been practicing and finally beat the game with a carefully planned "Ultimate Victory", defeating Doomdark by taking Ushgarak and destroying the Ice Crown in the same game! To celebrate I added in the text for this, which was never contemplated in the original game. It's probably a bit of a let down after an epic 90-day war of attrition, so don't get too excited.

Next up, summer hols permitting, I'm working on "3D Space Game" to fix the crashes there too. I've got it crashing on my phone now, which is half the battle. I get the feeling I'm making some nasty assumptions about video ram because the crashes are inexplicable and "trace-less".

Wednesday, July 06, 2011

Updates to The War of the Solstice

I've uploaded a bug fix version of The War of the Solstice (my [edit - no-longer-available] remake of "The Lords of Midnight") to the Android Market. This adds a way to exit the game, both returning to the title screen and from there actually quitting the game completely so it no longer runs. There are also a bunch of bug fixes.
  • Fix minor Lord-under-control bug when Luxor is killed and the Moonring lost. Previously if Luxor was killed at night while you controlled another lord, you would still be able to control that lord the next day despite the loss of the moonring. This bug may actually have been in the Speccy original too, seems that way from looking at the z80 code.
  • Added fading transition between some screens - this was always in the GBA version, but I never got round to implementing it on Android
  • There was no way to just "think" before on the Android version, so I've changed touch-text-on-look-view to "think". Think is really just when you want to get a more detailed view of what is at a location without using up the location's seekable object/event. So if you're at a town, you don't rest if you just hit the text, whereas before you would use up the town's ability to let you rest if you first used "seek".
  • Fix sometimes corrupt gfx on the left side of the screen when panning left/right. This was a hangover from the GBA port, I miscalculated the offset for the screen scrolling by one block.
  • Better screen repaint for less CPU use. Now it does less work if you stay in the same place, only using CPU when it has to. It still isn't the lowest it can go, but it is much better now.
  • Fixed textual representation of all numeric values. This was a real mess up. Let's just say I wasn't careful enough with my use of C preprocessor macros and leave it at that. This meant that before instead of 10 saying "ten" it said "no". As in "Luxur has no warriors". All other numbers were a factor of 100 out. The actual values were correct though, it was just the representation that was messed up.
  • Fixed white rectangle shield bug after pause/resume. This is an Android platform thing and had been the bane of my Androidy coding existence. I'm not sure I've really fixed it 100%, but it does seem to work on my phone (so you can all come round and use that... yeah right)
  • Added Exit Game option, Back on title screen quits. Now you don't have to use an app-killer (which are pointless anyway, but whatever). Also if you get completely stuck, or are going for a Morkin win and he gets himself killed it's much easier to restart.
There's also hardware keyboard support in this version. It mimics the Spectrum setup 100%, so now all those letters and numbers on the menus make sense. I've only tested this on an emulator though, so expect it to break horribly on the real deal. For the record, as well as the aforementioned menu shortcuts here are the keyboard controls:
Q - move forwards
R - think
T - choose
E - look
U - night
S - save
D - load
1-8  - change to face direction 1:N,2:NE,3:E,4:SE,5:S,6:SW,7:W,8:NW 
That is all, hope you like it. I've been playing this one quite a bit and despite knowing all there is to know about the game, I'm still crap at it! :-)