Saturday, June 24, 2023

Order of Operations

I'm calling it an evening for tonight, and I'm leaving the app in a state I don't like to leave things in overnight, but my brain has run out of smart-juice to make it all function nicely - so it's taking a sleep in a "doesn't run properly" state.

I have been working on the code for realms, and encounters along with the adjacent bits and bobs. The issue is that I've been calling things asynchronously, which is great for an app really, as it lets things happen in their own pace nicely, but I've come to a state where I need things to happen sequentially and that's not playing nicely. I can't properly load a realm until the possible encounters are loaded. I can't load those until the animation objects are loaded. There more along this thread, but you get the idea - and this is causing really consistent crashes in the app as things try to load and function out of sequence.

The solution is to re-write a bunch of the logic that is processed at the start so that when the game fires up, it loads all the "base" data first, setting all the right data structures to hold the library of information, then start to process the actual world for the player. I reckon I'm almost there, but I just don't have enough left in the tank to finish it up - the code I wrote to wait till everything was loaded up before enabling the "Launch Party" button along with other things needs updating, and it's been a long line of Fix issue A, find Issue B, fix Issue B, find Issue C and so on.

So... perhaps tomorrow?

No comments:

Post a Comment

Sometimes you do the same thing really well. Twice.

And each time, you do it for the first time. So, lets start with some back story here. While I was doing all the recent changes to the code ...