Success at Last!

I think everything's back up and running again. I managed to get the last few bugs sorted out this afternoon, and my test playthroughs didn't trip any issues. I think it may be stable again!

New Load Game Code

Before I uploaded the new build, though, there was one other thing that needed addressing: handling large save files.

We've already had one intrepid player with almost 75% of the map explored, and the save game failed to load because the process took more than 15 seconds, Flash's limit.

Now that item stacks are composed of full-fledged items, instead of just one item with a multiplier, large stacks can mean lots of items. (E.g. lighter fluid stacks of 99 drops). This only makes the load game issue worse.

In order to prevent anyone's hard work from being lost, I wanted to put something in place to try and prevent that timing out. The short-term solution is to split the load game function into pieces, so Flash can update before 15 seconds passes.

What's more, the load game will now display a message stating what stage of loading it's currently working on. The result should be a more informative loading process, and less timing-out. We can finally see whether the loading game has crashed, or if it's just chugging through lots of data!

In the long term, I may refactor stacks again such that certain types of items have "shallow" stacks. Basically, lighter fluid, ammo, and other items don't need unique data for every item in the stack. So I can try making some items have "shallow" data for stacking, while others have "deep" data (e.g. newspapers or rags).

However, for now, I think that new loading system is working satisfactorily. Tomorrow, if all goes well, I should be able to package a new build. Fingers crossed!

Hope everyone has a good night!


Raverbasher's picture

Awesome! Great news :) Congrats on the results.