Esoteric Update #277 - Summer Cleaning, Captures, Spiders


As some of you might know, we had a bit of a situation on the server last week that just left me... well, let's say, not wanting to stick around. It still often shocks me that people can keep yapping without ever stopping to wonder why the other person isn't responding as they were expecting. It's sadly not something that happened once or twice; in fact, it just feels like something that keeps happening. In general, it's disheartening how many of the interactions I get on Discord end up being degenerate. I'm not presenting this as, IDK, something I'm asking anyone to do for me. But as a general thing, if you want to interact with someone like you know or understand them, at least try to know or understand that person. When someone is clearly not ok with what you are saying, maybe just... I don't know, this will be wild but... ask?

Anyway, update. I noticed Bear did go over most of the things I did last week, so I won't go over any of that again. However, I have much to say about this week, so that might be for the best.

Firstly, I've been writing and tinkering with things for the adventure (some pretty heavy stuff regarding room generation, efficient CSP strategies for generating paths through a location efficiently, and some other tricks I'll mention a bit further down the line here), but I also did a lot of work on the engine. Why? Well, I was experiencing a problem with something I was trying to do, a little visual glitch, and I decided to look into it. The investigation led me deeper into the engine than I've bothered to look in a while and led me to refactor the whole thing.

Now, that's not as bad as you might think. Most of the code wasn't something I wanted to touch (it was good), but I did go through some of the oldest bits of code and re-wrote some things to be less needlessly verbose, corrected some mistakes, and extended some functionality. I resorted all the tokens in the parsers, changed the formatting of classes to match each other more closely, and partialled the biggest file into two smaller ones. This did reduce the number of lines in the engine by several hundred, but only in the textual, not the logical sense.


I have some statistics for you if you would like to know. The engine comprises about 60 files containing over 20,000 lines of code, amounting to 7,500 logical lines. This is just the engine, though; there are also the libraries, which I didn't bother investigating this time, and about 300,000 lines of mixed data and code representing the actual game (as implemented on the engine). And, since someone did ask once, there are about 700 if statements in the engine and 250 else statements, resulting in 63 else ifs. There are also 67 switch statements, over 200 for statements, almost 150 foreach statements, and a measly 25 (do) whiles.

Anyway, the whole thing took two days, but the engine feels refreshed now, and certain things (API implementations) are easier to find. In the process, around a dozen errors that were not particularly important but aesthetically noticeable were fixed.

Secondly, I extended the syntax for grammatical non-terminals so that selectors may now accept code as a source. This then integrates with a few other features and generally just makes some things easier to handle. I should have done this much sooner.

Thirdly, I extended the engine with a new functionality called modules, which allows code to be imported into existing states. The implementation can lead to problems if the modules are not set up correctly, but its functionality is too valuable to miss out on. It's programming; you will crash something if you don't properly consider what you are doing. Fortunately, the rules for using the module token are pretty straightforward.

Fourthly, I did some work with captures. Now, you might be completely unaware of what this is - it's a method that lets you save a "textual screenshot" of your game by writing the view's content into an HTML file. This file is equipped with everything needed to render the content of the view, which means that you can then send it to someone, and they can view it without needing to have the game (or the exact version you might have set up for yourself). The downside is that the snapshot is ~1MB in size. So it is... well... picture-sized. The functionality is also constructed based on the JS integration I worked on recently.



You can activate it from here. Doing so will inform you that the capture has started. Clicking it again finishes the capture process and saves the HTML file to the user/captures folder.


The file looks like this when opened in a browser. There might be some CSS compatibility issues, but I'll try to resolve them once I know what they might be.

Fifthly, a concept was floating around concerning items that have effects when examined (which is, please keep in mind, a mouse-over action) for a good while. However, we didn't have any sane way to implement it until the new JS integration was implemented. But now we're capable of working on this. I did post some details about this on the Discord server, but here's an abridged version.

PC investigates a container while a hostile creature is nearby. PC sees a spider (mouse over spider "item"). PC makes a check to control her emotions and fails it (should have had higher Emotion Control), making a loud "eep!" noise. Monster notices, and the PC gets a game over.

This is not the extent of it; this is a single example of how it will integrate into the game. It can also be used to set variables when an object is looked at, which would be the boring and yet most essential use of the feature. Much less interesting than having to deal with spiders.

I'll finish here because this is getting lengthy, and I have no other "big" things to point out. After all, I won't slap you with a list of fixed errors or UI tweaks. Despite the weather and my pain management not holding up well, I have managed to get a lot done, and I'm happy with that. Hopefully, next week will go just as well. I still have almost two months off from work, so I hope to use that.

Get Esoteric ♥ Esoterica

Leave a comment

Log in with itch.io to leave a comment.