Monolithic

"A legendary parasite attracted to hosts thinking of it. As the cure to this strange disease was simply to find a way to entertain one's mind away from the worm's presence, patients reported greatly increased moods after being cleansed of its influence. Ezezza eventually became aware of its own existence, perishing instantly."

  • Flavour text of Ezezza, the Unthinkable, a Legendary Feral Soul

The Games Foxes Play

(github | view all previous posts | play 0.2 online in browser on itch.io!)

0.3 (including everything related to map generation from last week and this week) will release on itch.io soon after I've fixed some weird interactions with the reincarnation mechanic.

My neurons are fuming and my grey matter has been crushed into a viscous slimy paste. But at last, it is done.

BEHOLD. My brand new, 100% organic, GMO-free random dungeon generator. WITNESS. Fully featured with 2x2 rooms, corridors, dynamic paths that never create isolated areas and prefab vaults. ADMIRE.

If I took a time machine and showed this to myself from May 2022, he would ask, bewildered, "Wow, Onei, how did you become so good at programming?" My esteemed clone, it is all artifice and illusion. For starters, the function that decides where rooms are allowed to spawn in the first place is the exact same as the one that used to choose where to build walls in a given square room. In fact, when I generate a new dungeon, I am generating a room that does not exist with assorted walls and floors. Then, I replace all the floor tiles with rooms, each one containing walls and floors. A dungeon is basically a room built out of rooms. Meta.

Then, with the assistance of a couple of capital crimes against the very concept of programming, I look for sets of 4 1x1 small rooms and replace them with a single 2x2 big room, I turn rooms with exactly 2 neighbours into corridors, and I sprinkle in some pre-defined structures here and there that I talked about more in my last Sharing Saturday. Finally, I place exits on every single possible connection and call it a day.

It is unholy. It is abject. It is vile.

But it works.

Rooms Within Rooms Within Rooms

Naturally, after completing this atrocity, I had the thought any sane man should have in my place: "Why stop there?" Each and every single white pixel of this twisted maze contains one entire dungeon. Considering that the previously demonstrated dungeon map is composed of 9x9 rooms and that the maze is composed of 72x72 pixels, that makes for a grand total of 648x648 rooms' worth of space, or approximately 420 000 rooms. The universe is therefore a room, made out of rooms, which are also made out of rooms. The glorified calculator that serves as my computer would not be very happy at the thought of generating each and every single dust speck of this complex, so dungeons are only generated if the player visits them by exiting from the extremity of a previous white pixel. Notice the red exits leading out of the current dungeon at the eastern and southern extremes of the third screenshot. Northern and southern exits would lead into a black pixel of the maze, so they remain blocked.

Yes, the maze is procedurally generated. No, I didn't make the algorithm for it. I checked the license, don't worry.

The Rivers Will Run Cyan

As an experimental feature, I added a quick pandemic simulator to my maze-world map. Starting from a single room, the Harmonic song flows across the Faith's End complex like a plague, assimilating everything it touches. I've been tossing ideas around for an equivalent to the dreaded hunger clock, with the aim to incite the player to hurry up a little during their exploration. Instead of having the player character growing weaker as their belly empties (which is lame), why not instead have the dungeon itself gradually lose turf to an indiscriminate, all-conquering force and its very strong Collectivist enemies? This concept is still in the design phase, but it would fit extremely well with the game's themes.

Otherwise, I am having some doubts on how I will actually manage enemy encounters. This week, I overhauled the terribly outdated "spawn X enemies where X is the number of cleared rooms+1" function and replaced it with a neat squad system that picks themed assortments of enemies to team up against the player. However, I'm still hesitant on the specifics. Once the rooms hit the 12+ enemies mark, things start to get quite crowded, but I want to continue scaling the difficulty (and the player power level)! Due to TGFP's design, it's really hard to just make things hit harder or tank more hits and call it a day (which is lazy design, anyhow!)

I'm also honestly not so sure about the title of my game. I picked it very early because I was listening to this excellent dark ambient track on that day and thought the name was beautiful and mystical-sounding (especially given the context of the song). In my game's flavour, the Harmony's air elementals enjoy taking the vague shape of fox spirits as they go about their plots of conquest (which are non-violent and full of tricks and traps), so it felt fitting. I am however not a fan of the fact that an (admittedly unpopular) finance self-help book is the first result when looking this title up on a search engine. In truth, none of the candidates I've thrown around have proven as poetic...

Possibly Euclidean Mazes

"A pocket of unreality, void of the concept of void itself. Your gaze fills it with your flawed preconceptions of what nonexistence must be like - to you, it is a sparkling expanse of starry lights, dancing among the nothingness. To try to step within this space would be just like trying to rewind time before the birth of time: impossible."

  • Nonexistent Nullspace description

The Games Foxes Play

(github | view all previous posts | play online in browser on itch.io! - does not feature this week's additions)

TGFP's narrative takes place in a gargantuan, but very monotonous complex of concrete and fluorescent tubes known as Faith's End. Built by no living soul, it is only the product of a primordial force that constantly strives to turn anything basic into complex systems. Left alone, grains of sand turn to pebble, which turn to factories producing deranged, overly complex pieces of engineering that serve zero purpose.

Given this setting, it made quite little sense to build it from a chaotic dungeon generator! I wanted the game's environment to be built out of designed, symetrical and orderly parts, but that coalesce together to form deranged, nonsensical twists and turns where opening a door that leads into a gaping void is just an average day.

To this end, I had to implement a mechanic which many other aspiring roguelike developers have no doubt wrestled with - prefabricated rooms and vaults.

Designed for Maximum Violence

Is it not sumptuous? With this new mechanic (which took surprisingly little time to develop), making new rooms has never been easier. There are now 10 different configurations which the player can find themselves challenged by on their way to face Epsilon, from the very cramped FaithBridge (and its associated Nullspace abyss) to the expansive GrandHall (and its zoomed out view). Some of these, with the "randomflip" tag, will even receive random rotations to vary things up! I could - and will - make many more, but I had something else taking up all my development time.

Making an actual room matrix, and an associated minimap. I know I had this whole cool thing going on about non-euclidean spaces, but at some point, one has to accept that no, it's not a feature - it's a bug.

After paying the considerably high price of reducing all my neurons into a formless grey sludge, I finally achieved this buggy mess that can be brought up by pressing "M". The little purple dot is me. While it certainly works, there are some significant flaws:

  • At the very right of the map, one of the rooms spawned on top of a 2x2 room.

  • 2x2 rooms never fail to overlap on top of adjacent rooms for one extra pixel column/row, as is seen with the top left room. EDIT: Just fixed this! Turns out the drawing size was incorrect the whole time. Only had to change a single number.

Honestly, I'm very confused. I thought 18x18 was just the double of a 9x9 square, but maybe I am completely clueless.

I am rather proud of making 1x1 rooms work perfectly - these mesh seamlessly, never allowing reality-breaking phasing through walls or overlapping exits. Making 2x2s work alongside them is, however, an unspeakable nightmare.

I'm not one hundred percent sure what I'll do yet. I could find a workaround and review my vision, or I could sit down and try to untangle this mess. I know what the right choice is, but I dread it.

Besides this main project, I also delivered some bugfixes here and there (including a hilarious softlock where the "reanimate enemies on death" Soul mixed with the "reincarnates on death until it is the last foe in the room" enemy caused a... spectacular chain reaction). My "minor nitpicks to polish" document is growing so large it will one day devour the galaxy, so I try to sneak in some quick tweaks when I'm not feeling very motivated to tackle a major implementation. I am also testing out the "Play" font kindly suggested by AleatoricConsonance in the last Sharing Saturday. Not completely sold on it yet, but I quite like it and will be giving it a spin as I continue development.

I am a bit tired, but hopeful for the future. I know my objectives are within my ability. I just need to unsheathe my fork and declare war against the spaghetti code monster which unexperienced-past-me has unwittingly constructed.