Esoteric Update #299 - Hooke's Law


Ok, this was a really productive week, and I'm feeling pretty optimistic about using these mechanics in various places in the game. It's a shame that it's kinda difficult to present what I've been working on.

Tadah!


Yeah, it's basically impossible to convey in a screenshot because it just looks like a static collection of rectangles.

So, lemme elaborate.

If you've been following the recent post we've been making, we are working on one of the two antagonists for the test adventure, which is (and yeah, I said I'll be dropping spoilers for what the test adventure is about) a sentient book. To represent some aspects of this book, we've been developing some mechanics to make interactions with the book more interesting. One of these mechanics revolves around suggestions and the influence the book has over the player character while it is held in inventory, manifesting through nudges of the mouse in various directions.

We already had a working test version of this, which used statically written JavaScript. But that didn't quite satisfy our use cases, so Bear tried to write up a system for dynamically generating and inserting JS into a rendered view. This worked fine, but I modified it a bit to work even better, largely by removing the need to check if variables are already defined.

Anyway, the current implementation is based on the above. It allows any arbitrary number of "gravity nodes" (let's call them) to be inserted into the UI, which then affect the mouse. The system is very, extremely customisable, so it allows for a lot of different applications. For example, for your mouse to be repelled from a specific option in the menu, or to be drawn from it, or for even very complicated patterns of forces when you are trying to navigate some kind of... "visual basilisk pattern", as it might be called here and there.

As an interesting side note, this actually involves the game engine writing JS code (based on templates) on the fly, as there is a point where it's easier to generate code than write code that can service every possible case.

I also extended this idea into a related implementation for zones that can trigger code. It's essential to some of the visual basilisk concepts that the patterns can fire off code based on some defined zones that can be a bit more complicated than what HTML allows for by default. (This applies mainly to boolean combinations of complex shapes.)

 I've also been working on some patterns for use in gameplay. It's stuff that will most definitely need some testing to mature properly.

Unfortunately, I'm still in the middle of hooking it up to some other code to make sure it can 100% work with various modes of viewing a book (primarily HO, but also to be able to switch between HO, UV/normal light). I hope we can make some engaging, diegetic gameplay hooks out of these new additions.

Get Esoteric ♥ Esoterica

Leave a comment

Log in with itch.io to leave a comment.