Foundations of Truth Reassembled

"When a new thoughtform births, it already prods at the world around it before its first breath, latching onto symbols and patterns. Such primordial ideas are a delicacy among the upper castes."

  • flavour text introducing the player to the Feral caste

The Games Foxes Play

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

All this mind-numbing UI work was starting to take its toll. Last weekend, I was feeling so, so burnt out from all those pesky dancing pixels all over my screen trolling me and refusing to know their place.

I even played some Cogmind for, ahem, game development research purposes, yes. I got to Access-1 for the first time! (and promptly got clapped). Above all, I couldn't stop being amazed at all the little touches to make the UI feel more computer-like - all of that must have taken months.

Reassemble the Foundations of Truth

Something very ironic about my "research web" is how much it helps me develop my game. Every time I am wondering what to work on next, I just play my game filling it out until I hit a void of incomplete content preventing me from progressing in it. Then, I fill in the gap with Content™ and proceed to the next node. It really makes me feel like I am learning the arts of soul-weaving alongside my protagonist.

This time, the aforementioned gap required me to redirect my current focus towards a more fun part of programming than UI design: awesome spells. First things first, all of the 6 starter spells offered to the player were still running on the old system - just a big block of code working through arbitrary effects. This is simply unacceptable: I must show new players a glimpse of all the reality-shattering incantations they might be able to build with some creativity.

I removed all of that chaff. For context, my game revolves around crafting spells out of components like "select all targets near walls", "on all targets, apply a status effect" or "when a step is taken, automatically cast this spell". I expected to just slap together some of the components I had already made to give 6 examples of cool combos and call it a day.

Of course, I ended up remaking a huge chunk of my magic system in the process. It was simply inevitable. Such is the Onei way.

Before, the 4 categories of spell components (Contingencies, Forms, Mutators and Functions) were tangled in a whole package of obscure, arbitrary and hard-coded rules. To make this system even more chaotic flexible, I have completely done away with all these weird requirements. Each spell is now just an ordered list of components!

If I make "EGO, CLICK, EGO, PLUSCROSS, HARM", it will always have the same effect:

  • EGO: Select the tile you are standing on.
  • CLICK: Set down a trap on all selected tiles (in this case, just one). Push all following components in that trap's mechanism, then stop the spell.

So, the spell just plops down a trap under your feet with "EGO, PLUSCROSS, HARM" on it, and that's it. But what happens when something actually steps on it?

  • EGO: Select the trap tile.
  • PLUSCROSS: Also select all tiles in a cross formation, like firing a laser beam in all 4 cardinal directions.
  • HARM: Deal damage to all entities in selected tiles.

So, not only does the trap damage the one who steps on it, it also explodes and deals significant collateral damage!

What I just described is the Artistic starter spell (or "Axiom", as they are called in game). I have made 5 others, all with their own themed sequences. Let me show you the Feral one:

deep breath - "EGO", "TRAIL", "BLINK", "SPREAD", "IGNORECASTER", "HARM".

Let's work this through step by step.

  • EGO: Select the tile you are standing on.
  • TRAIL: From now on, all entities on selected tiles will leave behind a "trail" that selects tiles as they move.
  • BLINK: On all selected tiles (in this case, just you), the entity there dashes in the direction of its last move.
  • The player dashes, and TRAIL is triggered, selecting all tiles they pass through.
  • SPREAD: All selected tiles spread out to all adjacent tiles, selecting them as well.
  • IGNORECASTER: From now on, the caster of this Axiom will not be affected by any effects of this Axiom.
  • HARM: All entities on selected tiles take damage (except the caster, due to IGNORECASTER).

Simply put, dash, then strike all creatures near the dash!

Here's how both of these spells look in game!

There are now 30 different Axiom components (named "Praxes" in game) available for mix-and-matching, with many more already designed and coming along. So many exciting contraptions await...! I've already started reworking the spell crafting room with a whole new algorithm, but that is unfinished and will be featured in next week's post.

Thick Smoke Shrouds Understanding

I'm aware that all of this is pretty dense. I don't expect everyone to enjoy this type of gameplay, but I personally like it and I am making this game for myself first and foremost. However, I do understand that 3 trillion Axioms constantly firing over the place could become a clarity problem. The enemies have them too, after all.

I've noticed that many roguelikes operate with an "animation queue" - on your screen, you see the player fire their spell, then the spell travelling across the screen, then things exploding, then very unpleased archers firing back a volley at the player. In TGFP, right now, everything happens simultaneously, which does not aid comprehension in the slightest.

However, Rift Wizard has an animation queue and its turns can last upwards of 15 seconds just because of it. I always played it on "XtraSpeed" mode where everything was instant.

For a compromise, I think I might add an option like this in my game, but also make it so entering a keypress while the animations are executing would instantly skip them and proceed to the next turn. I would show the tiles getting selected one-by-one by each component, then the effects occuring, and so on...

Well. Later. I don't want to touch the front-end code for a little while. In a perfect world, my game would be beamed directly into the player's consciousness without petty needs for "graphics" or "interface", but as I am shackled by my frail corporeal form, I suppose I must make do with making shiny buttons.

What an unfortunate fate.

Ignorance Turned Thin Mist

"A ruin is the final state of an idea - the data has crystallized into matter, latched itself into the material like a tick - and once all the praise has been drained out, it leaves itself at the mercy of passing hours."

  • flavour text of Souvenirs Hauled from Bygone Eras, tutorial node

The Games Foxes Play

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

I have cloned my source code to Codeberg, because as they say, when it comes to backups - one is zero and two is one. Learned that the hard way recently after I casually deleted the backup of my giga-huge DCSS Felid guide a week before the DCSS wiki went splat. It's back now, but that was a bit too close for comfort.

Dissipate the Mists of Ignorance

The research screen remake continues, and now looks snazzier than it ever was before. Animated tab selectors, removal of annoying scrolling, and sprawling skill trees!

In the original version, the code determining the unlock order and prerequisites was a simple database:

    "Vision" : ["Seed","Cage"],
    "Seed" : ["Herald"], ..etc..
}

However, writing all of these connections was becoming extremely tedious with the sheer amount of nodes available. Instead, there is now a simple algorithm to make an imaginary liquid "flow" through the connectors and unlock everything it touches!

On the sidebar, the dynamic description and flavour text box has also been reworked. Just making the colored text work again took over 10 hours. It is bewildering to me how hard such a simple feature is - and the only library I found online is rather unpopular, has a trillion dependencies and is also only available for a deprecated version of my rendering library (PIXI.js). This is the kind of thing that makes me salivate at Rust programmers - when they have a crate, it rarely goes out of date, because it is simply finished. And also, they don't have to deal with the 200 IQ feature that is:

  • measureText("rogue") = 24 pixels
  • measureText("rogue ") = 24 pixels
  • measureText(" rogue") = 28 pixels

I have a question. For the JS gods. Why?

In the end, my final implementation is very sad. It literally writes the text normally all in a single color, then locates all words from a "special words list" and places new Text elements on top with a different color. This basically means that I can't ever have bold text without messing everything up. Oh well.

There is also a mysterious cyan variant of the "liquid flow" unlocking algorithm, which spreads very rapidly across the entire network and unveils truths as if they had been obvious since the very beginning of our protagonist's journey. I hope to build an entire core mechanic around this peculiar infection - and I believe the moment where it finally gets translated from my design document into code will be the big turning point between an amateurish experiment and an actually promising potential game. Over a year later, about time.

Arcane Researchers Toil Alone

I've come to find out that solo game development is very much based on intrinsic motivation. People can give you a thumbs up after you show off a neat screenshot, but there's never really an ear that's willing to hear you unload your entire thought-stream for obvious reasons (this is not a complaint, I certaintly do not want to hear any unregulated thought-streams myself). The process of making the thing in itself requires one to be obsessed with the subject matter to avoid giving up. If I wasn't so attached to the concept and to the characters of this little glyphic imaginary universe, these posts would have dried out long ago. I understand why duo-development projects are quite often more successful... Though the more minds go into the creation of a product, the more diluted it risks becoming. "Dans les petits pots, les meilleurs onguents" (In the smallest jars come the best ointments), as they say in my homeland.

I generally try to read the other posts in this thread every Saturday, though I tend to have trouble parsing the tech-tongued incantations some users here particularly enjoy. I'm just glad to have an anchor to tie myself to every week, even though it might just be a kind of placebo.