Midnight home - Later Entries
Released version 0.09 which has time-limited movement and the Night... menu option. Version 0.08 was not visibly different from 0.07, so I decided not to release it. It involved more messing around with the landscaping code, which now bears very little resemblance to Chris Wild's code that formed the basis of version 0.01, and I also changed the handling of the shield graphics to work the same as the terrain graphics, since that seemed to be more efficient.
I have mixed feelings about the new version. The darkness is achieved by messing with the palettes, which has a couple of undesirable side-effects. It now requires the BackdropGC wallpaper hack (and presumably others like it) to be disabled, and it also doesn't work quite right on greyscale devices. Both cases actually exhibit the same symptoms: the terrain graphics do not change colour, and therefore look pretty ugly on a black background. Since part of the reason for changing the nature of the night display from the Spectrum version (black ground, blue sky) was to improve the contrast for greyscale devices, I can't really count it a huge success, and might have to rethink.
I really don't think I can afford to store another set of terrain graphics for night, and there will also be foreground graphics to think of, too. This is the downside of switching to bitmaps, of course, and one of the things I was concerned about below.
On the plus side, though, I have at last managed to add some more game logic, after messing around with graphics for the last several releases. I don't think the game itself is really going to pose any problems for me. It's just a matter of trying to ensure that I remember to include everything and copy all of the calculations correctly. The remaining headaches are really all still PalmOS issues to do with graphics and UI. At some point I'm going to have to add more controls to the screen, which means I'll probably have to lose the current movement control method, unless I can delineate the active areas clearly. I'm also not really looking forward to the save game management screen and the map screen, although they might not turn out to be too bad.
I'm going have to start a new page for this diary soon, too.
Another stealth release to fix some silly problems with the greyscale version. Far too silly for me to admit what they were. Well, okay, I wasn't actually putting the system into greyscale mode, and the graphics weren't working too well in 1-bit mode.
There are no other changes to this version, other than a few additions to the data file which aren't yet implemented in the game, so there's no need to upgrade if you're playing the colour version. I decided to release this one now because I won't get another chance to look at it for a few days.
Well, I had the week off work, and was intending to get some more features into the game, but due to all kinds of laziness and distraction, and the fact that I have been called in to work tomorrow, I haven't done nearly as much as I had hoped. And it looks like I'm going to have to revisit the landscaping code again, so I might even be going backwards.
I have released version 0.06, which features bitmapped scenery rather than manually-drawn spectrum-style scenery, and it does seem a little faster to me, although it could be my imagination. I have, however, noticed some fairly severe fish-eye effects going on (which I think might even be in the original, although I have exaggerated the effect with my scaling changes), and I think I'm going to bite the bullet and recalculate all my screen positions to be a bit more accurate, and to make sure that straight lines remain straight. I think I'm going to have to rework the graphic storage, too, since I am running into some size constraints with the current version, and I have to assume that the high-res version (or a more colorful low-res version) will exceed the capacity.
So this version has been one step forward, two steps back, but I do feel more comfortable with a lot of the design, and therefore more confident about changing bits of it. The current graphics were based on those extracted by Peter Armstrong for his Amiga (I think) version of the game, and he also supplied his own landscaping code, which I might be able to adapt, so thanks for that, Peter.
Version 0.05 is now ready for download on the main page, complete with shield graphics and a character selection screen, as well as rejigged menus (most of which still don't work). This version probably covers the last serious PalmOS issues I needed to resolve to be sure that I could do the whole game, so I'm pretty happy with it. You might also notice that the sky has got a bit darker again.
The shields are the first major chunk of data that I have completely revised, rather than trying to use the original Spectrum binary. The shields in the Speccy version are just too large to use on the Palm, and since I'm not restricted by the Spectrum's quirky colour handling, I decided just to redraw them all as 24x24 bitmaps. Redraw them all quite badly, but what can you do with 24x24 pixels? Well, okay, there's room for improvement, but they'll do for now.
A side effect of this is that my version is now larger than the Spectrum version, which is another landmark of some sort. Probably.
In fact, I am now thinking of moving away from my original purist vision a little, and maybe overhauling the graphics more substantially (although I like the sharpness of the line-art style). I was already planning to try using bitmaps for the landscape, to see if it solves the speed issues, and once I do that I can maybe think about getting everything redrawn. Using bitmaps might introduce its own problems, when the landscape needs to be recoloured for night, for instance, so there are a few more things to think about. I have always been aiming for a pluggable data module anyway (in order to support high-res, and maybe greyscale), so maybe I can cover a variety of bases.
Doesn't yet include the lord selection, but does now display the name and description (with space for the shield). I decided to put this version up now because it all seems to work and I don't know when I'll get back to it.
I also decided to brighten up the background a bit, having noticed the discrepancy between the two screenshots below, but I think it might now be too light. If my understanding of the Spectrum colours is correct, then it is still darker than the original, but it looks a bit bright to me. I'll see how it looks on a real Palm. I must try to check it on a greyscale device, too, since the brighter blue might be losing too much contrast.
Started the Diary page. I'm about 5 months into the project now and, sadly, I think this probably is typical of the speed at which I work, so I hope no-one's holding their breath for the finished article.
OK, I'm exaggerating a bit, that's 5 months with 3 months off. The current incarnation was really started the first weekend in January, only 3 weeks ago.
So anyway, a bit about the latest version before I get onto the historical and design stuff, in case I run out of time and decide to do it later. Since I got the initial version up and running, I've made changes in three major areas: the display, the data and the game logic.
First, the display. I've moved the drawing to an offscreen buffer, in the hope that this would speed things up (and to stop it looking so weird). Didn't really have too much of an effect on the speed, though. It could just be that the drawing APIs are too slow for my purposes, or maybe I am going to have to switch to bitmap graphics, rather than trying to stick with the original Spectrum binary data format. I don't know. I'll figure it out later.
I've also decided to lose the title bar. The menus still work from the silkscreen button, and I think I'm going to need the real estate when I start displaying the text.
The last display-related change is the scale. The Palm screen is not much more than half the width of the Spectrum screen, and since the original graphics were still being shown at Spectrum size, we were only getting 5/8 of the field-of-view. I'm not sure how much this would really affect game-play, but I really want to get as close as I can to the original, so I had to scale everything down a bit. What I did was to drop the largest size of each graphic, and go to the next smaller size in each case (except the smallest, which I left alone). I then reduced the horizontal spacing to about 70% of its former size, which should (if I've done my sums right) give about 90% of the original field of view.
I may yet do some vertical compression, too, but it looks okay to me as it is.
Second, the data. I've added a lot more of it, for starters. Much of it is simply cut straight out of the Spectrum version. I use John Walker's xd utility to get a hexdump of the spectrum binary, then cut out the relevant bytes and use xd again to turn them back into binary. Then I use my own customisation of pdbmake (also from John Walker's site), which I've innovatively named pdbmaker, and which I will probably make available when I get the time to do a page for it, to put the binary files together into a PalmOS PDB.
The initial release pretty much only had the map and the terrain graphics in the data file. This version has the string tokens, the area map, the lords, DoomDark's armies, the garrisons and a couple of index tables that I moved out of the executable to give a bit more flexibility. And maybe one or two other things that have slipped my mind.
So anyway, the third main area of change was the game logic. I was really hoping, for this release, to get the text working, since that's the next obvious thing to display after the scenery. "LUXOR THE MOONPRINCE. He Stands at the Tower of the Moon looking East towards the Forest of Shadows" or whatever. The area part should not have been too much trouble, but I realised that I needed to get the Lord data working in order to set up the character name correctly (even though you can't actually change character yet). This meant that I needed to read and write the currently-selected Lord to and from the data array.
A quirk of PalmOS is that you don't really distinguish between heap and files. The "files" are effectively heap memory - they are in RAM, and you write to them in place. I didn't want to overwrite the initial data (which is, in fact, what Cartesium does with its bitmap resources), stored in midnight.pdb, so I decided to copy the changeable data (the bits which make up the savegame in the original) to an autosave file and edit it there. A little extra code to read the autosave at the start, and I now have most of the framework for saved games and for the Lord selection, which I might now add much earlier than I expected.
For the next version, then, I hope to have the on-screen descriptions and the character selection working. I doubt I'll have the shields done - I don't think I'll be able to keep the original spectrum data for these, they're just too big - and I'm still not sure what to do about the custom font, but the text should be there in the PalmOS default font.
And I think that's enough for today.