Development Progress Report, week 18

Much progress this week. The SDL porting is essentially complete, and the code now also builds and runs on 64-bit Linux!

A whole lot of the code, and the drawing/rendering logic is a whole lot cleaner than it was, though there’s more that can be done there.

I’ve filed some bugs on my planning board – all of which are just cosmetic, mostly having to do with the partial refit of the drawing/rendering logic. A popup that doesn’t appear in one mode. A popup that fails to expire when its timer goes off in another mode. Minor stuff.

Three of the six bugs were closed within minutes after me adding them to my planning board.

One bug greatly vexes me. Text isn’t word-wrapped properly in the footnote popup, but instead runs off the edge. This only happens in the Linux build, and the code that handles that is identical to the Windows build (which wraps the text properly). Additionally, text correctly wraps to fit in its appointed rectangles everywhere elseusing the same code and functions.

This suggests that I actually have a deeper issue hiding in my word-wrapping code somewhere, but I have yet to actually find it, because I’ve only got the one manifestation of the issue to work with. If it was more broken it would be easier to spot, and then likely trivial to fix.

Porting had some issues with binary-incompatibilities of wchar_t between Visual Studio and g++, but that was largely to be expected. While -fshort-wchar should have fixed that, I had codecvt stuff choke and throw exceptions when I used it. The solution was to make sure that save-files and story-files use UTF-8. UTF-8 is your binary-compatible solution across platforms for unicode strings (and more compact). That said, UTF-16 is faster when you’re actually working on strings that you’ve loaded. UTF-32 would be fastest of all, and that’s probably what g++ is actually using (I confess, I’ve not checked).

There’s still a few pre-SDL features that haven’t made it yet. I haven’t reworked the audio-subsystem yet, but I’ll likely work on that soon, and I can’t rely on a few gimmicks like platform-specific file-selectors. I’ll probably end up coding my own save/load user-interfaces, and an options screen to replace what the menu bar used to do.

I did replace the Windows List-Box control with a cobbled-together group of widgets, so selecting a character works. It’s kind of ugly, but it will likely only take a bit of adjustment and a little graphical glitz to make that look better again.

I’ll also have to think about fonts. I use two of the Cambria fonts and one of the Segoe fonts, which work very nicely, but they belong to Windows, and I’ll need font-files that I can redistribute with the game. That’s

I don’t anticipate making another alpha build quite yet. There’s now a bunch of shared libraries and fonts and whatnot, and I’m thinking a proper installer is required before the next alpha. Linux users can probably make do with just a tar and can figure things out on their own, but feedback from some Windows testers suggests that they need a couple of the installation steps simplified.

Overall, it feels like it has been a very successful week!