Axioms Shape Reality

"In a realm where sheer belief draws the line between what is and what is not, pride is omnipotence. The Saints were the first to learn this primordial truth."

  • Flavour text of Haughty As The Saints Were, form component

The Games Foxes Play

(complete source code on github | view all previous posts | play 0.4.3 online in browser on itch.io!)

Rough days all around. Without going into too much detail, I work in the research sector, and the culture of trickling down the most grueling tasks to the bottom of the ladder is ever-present. Thankfully, when I wasn't watching video feeds of test chambers for hours and annotating hundreds of samples, I found some time to cook up a little more cyber-arcana:

Axioms Dictate What Is

I am in the process of reworking every single creature to operate according to my new spell-crafting system. This is, in a way, showing the player a simplified view of the code blocks that make them tick! For example, our dedicated Apiarist robots now hold the spell "When a step is taken, on self, apply 1 Paralysis". Before this new feature, each enemy had a special block of code dictating what they did in particular (in the case of Apiarists, it was "skip every other turn"), but now, every little bit of their behaviour is modular and - most importantly - can also be used by the player.

Why do this? Well, I am just salivating at all the doors this opens up. Polymorphing the player into any creature and having it work Nethack-style is now a feasible feature, since every entity is really just a critter with legs to move with, claws to attack with, and a list of cool spells. You might be able to permanently change a creature type's innate spells so they heal you instead. You could soul-swap with an enemy and have them attack you with your own spells that you carefully crafted while you thrash around in their body that gets stunned and confused every other turn. Now THIS is the traditional roguelike spirit I seek!

For clarity, these spells are now named Axioms. Lore-wise, they are an unshakable belief that reality works in a certain way - robots are programmed to think that their body is too bulky to move quickly, so they advance at a snail's pace. The main character's abilities are centered around ideology and identity, so it is only right that they might be able to entrance creatures into believing something entirely different - or be entranced themselves...

This ironically also makes it much easier for me to add new enemies, since all I must do is look at my ever-growing list of spell components, jam a couple that seem funny together, and go for a test run. If I'm happy, I sketch a quick sprite, give it some crispy lore and I'm done.

Hard to show off this feature in a screenshot, since everything mechanically works the same as it used to, but I guess this code looks pretty neat.

Vision Stretches Out From Squares

While I was reading about Path of Achra's awesome launch on Steam, I fell upon an interesting exchange questioning why the game had been made with a 4:3 aspect ratio. This sent me into a reading frenzy about the way games should be displayed, until I eventually came to the harrowing conclusion that my game is impossible to display in glorious fullscreen in its current state.

Following my horror, I then grabbed my big metaphorical axe and butchered up my UI to bits, expanded the screen to majestuous 16:9, and began the rather daunting task of putting everything back together. On the plus side, this gave me much more space to work with, and allowed me to add a miniature (to the right) Axiom equip screen accessible directly at any time. There are reasons why one would want to swap between two Axioms for a certain task, and speeding up the process instead of mashing the keyboard each time is such a huge improvement. It also makes me feel like I added the equivalent of an "Right arm: Steel Gauntlet" equipment display sidebar to my game, which earns bonus True Roguelike™ points.

Additionally, all Souls loaded up for future usage now spin around your casting wheel. Look at them go!

If any readers feel like this new UI has something out of place or should be improved at some location, now is the time.

At the risk of horrifying some readers of the subreddit, I will say that I build my UI by literally saying "draw this symbol at pixels x: 1473 and y: 843" and going at it trial and error style until everything looks centered and pleasant.

So far, I've been going at it pure JavaScript Canvas Vanilla style, but I am starting to get quite fed up about the graphics constantly getting in the way and sucking up my limited development time moving pixels around instead of coding actually fun stuff. Not to mention my CPU fans going brrrrrr every time I open the world map screen due to the hundreds of sprites getting drawn every 15 milliseconds on it. I've been looking into libraries - PixiJS especially, but any one would imply a complete rewrite of my rendering code. Sigh.

Long Days Ahead

I'm really excited about making all this awesome content, but work is getting really demanding with full-time hours. It comes and goes... I've had to relocate because of it and now only have an old laptop to develop on. After weeping at how slow this glorified calculator was, I surrendered to the penguin elitists and changed the OS to Linux Mint - best decision ever. This thing now works like a charm. I won't ever be able to run any of my old games on it, but honestly, that's a good thing. Those who have lost days to bashing pixelated creatures across a grid will understand what I mean.

Strokes on Canvas

"To walk and let the mind wander is a dangerous thing. A thought pulls harder than the rest, one's gait softens into the grace of a Saint, tears turn to bright smiles, and before one knows it, one is no more."

  • Flavour text of Steps Shift The Mind, contingency component

The Games Foxes Play

(complete source code on github | view all previous posts | play 0.4.3 online in browser on itch.io!)

After completing a few quests for the Plane Where Grass Is Touched last week, I was able to free up a lot of time this week to return to my cyber-grimoire. Here are the incantations I have concocted this time:

Strokes on the Canvas of Dreams

A major flaw in the spell crafting system was just how tedious it was to extract exactly the Soul type you wanted for a given recipe. If you needed just one more Unhinged Soul for your spell but it was hidden underneath a pile of 50 Ordered Souls, it meant you had to mash your Q key 51 times. Not exactly engaging gameplay.

I have introduced a new thematic "brush" system - it causes your Soul wheel on the sidebar to become a palette with every Caste represented on it. This is only available in Soul Cage rooms, but it lets the player pick out a "color", and, well, draw. The mouse control is easier (just drag and drop, like Minecraft's crafting), but keyboard is also an option, requiring the player to walk over the cage to place their payload drive-by style.

This UI update comes with many quality-of-life additions related to the spell crafting system - including a complete catalogue at the bottom with every unlocked pattern (and its recipe), and a display predicting the outcome of the crafting recipe (with dynamic highlighting of where each component is found inside your Soul Cage).

Here is a complete clip of me assembling "BEAM-JOLTZAZON-RASEL-GYVJI", an interesting spell combination which fires a laser beam towards one target, spreads to all creatures adjacent to the target, then causes all the affected to:

  1. Get a status effect that will revive them on death as a friendly undead.
  2. Get brutally punched backwards, probably killing them.

Using this combination, clearing this room proves easy!

Thought-Pattern Interference

Another flaw in the spell-crafting algorithm was the possibility of smaller patterns inserting themselves unexpectedly in bigger patterns. This meant that the structure:

  • O O O

Contained simultaneously the patterns:

  • O
  • O O
  • O O O

with each one of these three being an unique spell component. Most of the time, this flaw caused random status effects to appear unprompted in the player's crafted spells, resulting in "interesting" gameplay such as laser beams that make your enemies invincible or placing traps on top of yourself that instantly explode you to bits. In the worst cases, massive patterns could contain 12+ copies of many components, resulting in ridiculous oneshots, nukes and even an infinite loop softlock somewhere in there.

Chaos is fun, but there are limits. I have completely overhauled the pattern locator algorithm - now, if you want a specific pattern, it must be built without any adjacent Souls of the same type interfering. O O O creates only O O O, and nothing else. O O F creates both O O and F. An inattentive player can still craft hilarious suicide spells, but at the very least, it should now never happen to someone who carefully constructs their build.

This does make it more difficult to cram a lot of components in your limited 3x3 Soul Cage, but I have nerfed a couple of patterns to require less Souls to compensate. It will also be a bonus reason to upgrade yourself and get a bigger Cage later when I get around to making that!

Sentries and Husks Surge Back

Finally, some old spells from version 0.2 have found their way back in, adapted and revised to fit the new spell-component system. "Joltzazon", for example, is now a very powerful Mutator that lets spells "spread" across adjacent targets, resulting in amusing effects. Abazon and Rasel have also returned.

I predict that next week will haul me back screaming into the abyss of responsibilities and will devour a significant chunk of my free time. I will still see if I can cook up something for next Saturday, my motivation levels are through the roof! I have some fine ideas cooked up...