Esoteric Update #272 - Technical Update Strikes Back


So, as it turns out, I got into a bit of a rabbit hole with the functionality I wrote about last week. I got a lot done in that direction, which I understand isn't what I promised to do. However, I've also tried writing, and the results were low-quality, so this might be the best. Ultimately, I got hammered hard at work and had to do something rather than nothing.

So what got done? I started by continuing my work on the keyboard shortcuts. There's now a full-featured system for defining key combos and assigning actions to them which can either run in JS or EsoScript. There's also the capacity to print the list of currently defined keyboard shortcuts.


You might note that this has the full functionality of the right mouse button menu, which is now gone. As I mentioned last week, I don't want any pre-baked JS calls in my engine, and that menu was precisely that. At the moment, I don't feel I need to bring it back at all, but we might decide to bring it back later, this time as an in-engine construction. Removing the right-click menu also allowed me to dispose of some code I didn't like relating to custom menu strip rendering; the code matched the right-click menu to what the game was rendering, even though they used very different renderers. It's good that code is gone because it was too stiff and restrictive. This left only one hard-coded feature: the eye-catch handling.

The eye-catch is an element in the UI (usually displayed as a white swirl, but it might also be absent under some circumstances; really, it's still there, just not visible) that defines where the screen should be scrolled when rendering a new view. I removed it from the engine side; instead, it's now also stored as modular JS loaded into the engine. This doesn't change how the eye-catch works, but it allows its functioning to be redefined and reconfigured, even on a case-by-case basis during the game (which is now how the scrolling in the Index works).

With this, there are no longer any hard-coded behaviours in the engine, apart from the paragraph system. I consider that to be an engine feature, though.

In the process of clearing the above issues, I ended up rewriting part of the exception handling. Nothing major, but I tried to get all exception sources to report errors the same way (when the exception cannot be handled). I'll end up getting back to this from time to time working on the following issues, so I'll just mention something here: I've dug into exception handling for grammar resolution and ended up making some changes to how errors are reported, but decided not to log them, at least for the moment being. There are some places in the game where grammar resolution raises exceptions by design. I think that, in the future, I would like to revisit this issue and remove such situations. Anyway, on to further developments!

I added a pop-up message that some of the new features use. When you copy text, you get informed about it! However, when pasting, I left it out since it seemed obvious enough that you pasted something if the text appeared in the text area.


I've also extended the idea of background colours into a full-on colour map. This isn't a finished feature yet, so let me explain its purpose. Ultimately, the goal is to define a map of colours in the start file, such as background, text, or text-highlight, which are then used by the layout, making the colour scheme parametric/configurable. However, for this to work fully, we also need to work on the CSS, which I've done (a little bit).

I've implemented a CSS rendering solution that combines our grammar language with Sassy CSS. We now define all CSS as an SCSS file that can contain grammatical non-terminals. The system can then re-render the CSS file by inserting data into the SCSS and then parsing that into the final form of the style sheet. That was a bit of a mouthful, but I hope it's clear what this is going for. If you don't particularly like the colours the game uses, you'll be able to change them. Unfortunately, I had to resolve some syntax issues, and this is where the final bit of work comes into play.

I found a pretty severe bug in the implementation of a crucial function. Funnily enough, this bug was wholly hidden from sight (it was raising exceptions that were then handled and resolved), but it caused this often-used function to mill the error handling every time it was run, sometimes dozens of times over. I have a more in-depth explanation of what I messed up on my Discord, and I won't bore you by including it here.

Anyway, I'm not sure what I can get done next week. I'm going on my 3-month vacation soon (to work on the game), but that means I have some rough days before I can get my break.

Get Esoteric ♥ Esoterica

Leave a comment

Log in with itch.io to leave a comment.