Wednesday, January 3, 2024

Panels, Information and Interface

The holiday break has been rather kind to my coding time, and I've used that time well to really dig into code on two fronts. Firstly, continuing on with the development of the interface, so I've managed to get great forward gains on the various information panels and when they should show up/hide/change. I ran into a bit of goofball issues when the device went into landscape mode, as the layout I'd designed just wasn't able to do what I wanted.

So, a good bit of android layout redesign and much, much frustration in testing, and finally I managed to get what I wanted. Fun Fact: If an android view is off the screen, using "wrap content" as the height makes it infinitely tall - so a few single lines of text that were off the screen had me scratching my head four literally hours trying to work out why things weren't working. Also, I called it a "Fun Fact" but there's another F-word that comes to mind.

But... the big one... I've resolved interface speed-walking and rubber-banding issues with movement. The game now runs delightfully and the movement pace is independent of framerate. I'd tried to get tricky with it, and match up two threads, and it sort-of-kind-of should-have worked.... but didn't. And it wasn't till I had some friends over and was showing it to one of them, and it was running like a complete mongrel that I put that onto my plate to fix. Turns out syncing two application threads together, and having them line up, and then control movement is a "bad idea". Anyhow. Smooth sailing (walking) now.

Oh, and to make this a four-in-one update, I've also managed to wrap up the game text-output nicely so that the game can output messages as needed, either in combat, or out of it, and they stay for an appropriate amount of time, the fade off and disappear off the screen. You'll be able to scroll through what's there before it fades off the screen, but the code nicely handles removing them to keep things clean, and that journal also nicely fills in the space between the two sections of screen that are fixed in size.


No comments:

Post a Comment

Character and Item Stats

It feels like I've renamed a thousand thousand properties in classes, updated a myriad of methods across the database, the editor and th...