We're Getting There...

Hey Folks! Making progress on restoring mods today.

When I started this morning, the game would crash upon trying to load Kaaven's "Mod of Doom." Usually as a result of trying to load a null, blank, or invalid ID from the mod system. I think a bug was introduced in the remapping code when it was converted from Flash to Haxe, which basically caused all IDs to remap to "0" in mods. Which, apart from not loading the correct data, also caused an index out of range error in most arrays (which assume in-game IDs of 1 or greater).

Once I had that sorted out, the game could load the mod, but all images were replaced by the big red "X" (missing image). For most of the afternoon, this was my focus.

The issue here was due to the way the new engine handles images. Previously, the game would load all images first, store them in memory, then load mods that point to those images. The new engine loads images as-needed, though, so I had to do a bit of preparation before mods loaded. Mainly, to load the img directory (if available), and record all of the images available for that mod. Then, store the path where each of those images could be found.

Once that was done, the game once again could load the appropriate image for each item (and other asset). In theory, anyway.

As you can see in today's image, that's not totally true. We see Kaaven's starting suitcase item, seemingly complete with description, contents, and other stats. But all of the images are Flixel icons. Note that these are not big red "X" sprites. My first hunch is that the game tried to load a bitmap from the wrong file location, or that the bitmap conversion failed. I'll have to look into that tomorrow.

Still, not bad! Today felt like an appropriate amount of progress for the effort, so I'm not too upset.

Comments

Rovlad's picture
Rovlad

I wonder if the image loading thing you've been battling with for the past week is inherent to Flixel or is it because of the way NS was designed in the Flash first? Because that sounds like a pretty serious issue if it's the former, and should probably be fixed on the language level.

Anyway, great to know you're still updating your original game. Just an idea to throw out there since you're delving into UI, unless it's too much to ask: make a full screen overlay for sneaking and running, like "concealed" status in XCOM 2 (see the tinting on the screen edges in https://guides.gamepressure.com/xcom2/gfx/word/7496456.jpg for example). Or some other way to communicate to the player that they have a different movement mode on, like a "sneaky" icon in the upper part of the screen (in the example image that's those hooded guys on the top).

I've lost count on how many occasions I forgot to turn sneaking off after sleeping. Might be just a pet peeve of mine though so it's cool if you don't think it's necessary.

dcfedor's picture
dcfedor

Hard to tell so far. There are a few possibilities, and each is a bit different.

I did struggle a lot initially with OpenFL's asset caching, but I'm starting to figure it out now. Importantly, I've learned how to load arbitrary files not part of the compile-time assets.

Haxe has the usual sys.io.* library you'd expect. It was just ignored in favor of OpenFL's Assets.Get* methods in NS mobile, since they come with several useful features for memory optimization. But I'll have to poke around a bit more to know exactly what's failing here.

As for the overlay suggestion, I like it. I've also made that mistake a few times, so it's easy to miss.

Making such a change wouldn't be too hard on PC, but I dread having to test and release another mobile patch to keep parity :)

Dan Fedor - Founder, Blue Bottle Games

Rovlad's picture
Rovlad

Well that's just the most glaring omission in the UI I can think of. If even you made this mistake, then it probably should be addressed. I thought I was the only one who kept forgetting to turn sneaking off, to be honest.

Totally offtopic: remember when people would use the medallion as tinder for the fire without knowing it? :D And then killing Merga Wraith which wasn't supposed to be killable. And then you made it into a full blown encounter in another dimension. And if I might add, that might be the best thing you've written, and it was an afterthought!

This is why I liked NEO Scavenger so much! You weren't constrained by publishers (which is a very basic way to think about indie development, but nevertheless), did anything you wanted and the game came out more or less fantastic. At least for those of us who enjoy a good story.

dcfedor's picture
dcfedor

Thanks! And that is definitely one of the cooler things about being an indie. No approval process, and the ability to "yes! and..." with the game's fans.

Of course, that's as much a danger as a freedom. Sometimes I end up wasting time on things I shouldn't be :)

But I think it's a net benefit. Particularly since the game tends to evolve with players, instead of in isolation from them.

Dan Fedor - Founder, Blue Bottle Games