Major Porting Done, Now the Details

Hey Folks! I think(?) all of the major porting tasks are complete as of now. And what's left are a loose collection of non-gameplay stuff. We could be getting close!

A good chunk of today's work was getting the remaining UI stuff sorted out in each UI mode. The battle screen required some fixing in most non-Small UI modes. Odd positions and scaling for sprites. Stuff like that. I finally found the errant green block that was obscuring the top right of Big mode, too. It was the mobile's fly-out background used in the cursor modes UI.

And speaking of, those cursor mode toggles were themselves obscuring other elements, so I had to move the sleep and rest buttons a bit to see everything.

I also finally figured out why Big UI mode occasionally had all its cameras shifted to the right. It was due to missing camera scroll rect adjustments when the cameras changed size in a resolution switch. It only happened when the game started in the smallest width configuration: 4:3 mode, and then switched to something wider. Simply adding those adjustments right when cameras changed size fixed the issue.

I also managed to get the sound files embedded in the game, so they're not separate files sitting out there. This was a contractual obligation requested by Paul back when he provided the audio for game items, so I wanted to make sure that was honored.

As it turns out, it is a simple thing to do this in HaxeFlixel. Just add "embed=true" to where the files are imported. Also true to HaxeFlixel's nature, it wasn't that easy :)

The embed functionality only works on a certain amount of data, so the entire audio payload crashed the build. I ended up having to extract the music files and a few longer wilderness audio loops from the embedded files. Since all of those were authored by either Josh or myself, they need not be embedded. A rare lucky turn of events!

A few more minor fixes, such as restoring double-click in the inventory screens, a null pointer issue when initializing the game, and attack modes resetting during a res change, and that puts is pretty darned close to a working game!

What's left? Well, save files, for one thing.

This new engine doesn't save sharedobject files like the Flash one. And this is good! (No more cookie-cleaning wiping saves.) But the down side is this means old saves will be lost. I'm currently trying to figure out if I can get the engine to load old save files, and if so, I can make it try that first. Then, it can re-save them in the new format, delete the old format, and continue using it from there.

This would require the user manually find their old save and place it in the new app save folder. There's simply no way around this. But since most folks are able to find it with some help from the FAQ, I think this would be okay.

Okay, that is, if I could get it to work. So far, it's failing to load old saves due to an "invalid char" in the unserializer. This might be too deep an error for me to fix easily, so there's a chance the new engine will just have to abandon old engine saves. However, I still seem to be able to load sharedobject files for user preferences, so I want to see if that's just a fluke. Could be the prefs files I'm loading are not compatible with the old engine, and just have the same filenames. We'll see.

After that, though, it's some really minor stuff. Like meta stuff. Changing the name of the app to not say "mobile." Setting up some way for modders to see the loading logs. Maybe a more verbose version label in-game. A file for live news on the title screen separate from the mobile news file. Stuff most people could live with, but would make for a nicer experience.

That, and I haven't really done a long playtest yet. A lot more could pop up in testing.

However, not a bad place to leave it for the weekend. Will we see a new build as soon as the next week or two? A very real possibility!