welcome back to ice site

Puzzles Game Design

The feeling of recursion

Recursive art is basically always very visually instantly appealing and distinctive. It captures feelings like infinite detail, infinite depth, surreal bending of space, unanalyzability to some extent. This is something I've been enchanted by, but that's by no means limited to me.

Recursion
INF

I was inspired to make this article due to a chain of things. A recent 3Blue1Brown video, "How to take the logarithm of an image", shows a piece by M.C. Escher, and how it's actually made is with a 'normal' (unwarped) piece of recursive art that can be mathematically described using a logarithm that warps the image:

Interactive recursive worlds

Inspired by that video, Print Gallery of an Artist was made - by Daniel Linssen, the creator of excellent puzzle games like Leap Year and HopSlide that I have covered on my channel.

This hit the itch front page, and gave a whole new group of people the experience of how it feels to be in a recursive universe. But of course, it's not my first time.

Recursion
Recursion in Patrick's Parabox.

In Patrick's Parabox, a box-pushing game where boxes can contain levels in themselves, you can push boxes into other boxes, and even a level can be inside itself. This is an amazing hook, for me I immediately wanted to know:

How does it feel to play recursive puzzle games? Surreal?

I would say:

  • It connects parts of physical space that are seemingly unintuitive to connect.
  • The adjacent squares of the recursive boxes matter a lot, and less experienced players are not as easily able to see connections and paths made by that.
  • The levels where the key moves involve important bits that are 'offscreen' or small in some way, are hardest to notice.

There is also a special one of 'getting your bearings' which is so interesting, and you definitely feel it more in Print Gallery of an Artist than in Parabox. See, there is one particular level in the 'Reference' section that constantly zooms out:

Recursion
'Reference 12' in Patrick's Parabox. (In Reference 11 it zooms in too!)

In Print Gallery of an Artist, it can often look like there are multiple copies of an enemy, or a collectible, even if you 'know' there's only one. Especially in the fractal geometry it's hard to tell, but also a very strange feel of the fractal geometry is that sometimes the character you're looking at becomes too small or (less interestingly) goes offscreen, and you have to switch what character you're focusing on, as if you should have an eye tracker when broadcasting this game to people.

It sort of messes with the default impulse to be managing multiple characters in a platformer! If there's only one player and you're dodging fireballs, you're safe for 'all' the players on screen.

While you don't quite have the curved fractals and action gameplay in Patrick's Parabox, there is still a part of the same feeling in Parabox where you need to switch what character you are looking at in the two Reference levels with the constant zooming in. A part of me wishes it was more frequent in the game, but that level has apparently caused motion sickness in some.

While writing this, I thought about what other tricks you could do with the camera, and thought you could tie in camera zoomins and zoomouts to entry and exit, even negatively valued ones (where you zoom out at a time you'd normally 'zoom in' for a huge disorientation).

There is also this special moment:

ASCII
'Center 16' in Patrick's Parabox

Some of the playful bonus levels in each world are "ASCII" levels, which present levels in a totally different layout where you see all boxes at once. This also cuts out the recursion visuals, and this feels different in an interesting way. Adjacencies and chains of adjacencies are somewhat less obvious, but some 'misleading' aspects are removed - it makes it clear there aren't multiple players, multiple infinite boxes, etc.

It's just so odd, because there are worlds like "Swap" all about basically turning the recursion stack inside-out, and the surreal visuals make this seem like a very distinct operation (and, it is) but those visuals just don't apply in the ASCII version.

And obviously there is no sense of dizziness, in fact you can press a button to turn off the visual effect in Reference by just pressing the '7' key, though I find it a cognitohazard to tell players this too early or to use it on every level.

That makes me wonder:

Is this sense of dizziness anywhere else?

Anything that involves self-reference seems to dodge attempts to understand it in a simple way. Things like "This sentence is false." seem to annoyingly cleave at your distinctions of truth and lies despite being so simple. But specifically in the attempts to 'think about' a statement like that, to give it a truth value only for it to logically flip to the other one. Some paradoxes even target and defy fuzzy logic, third categories, etc.

But I think the common ground is paradoxes that send you 'in a loop' somehow, like the expected value of the 2 envelopes paradox of switching the same two envelopes nonstop.

The problems can feel like they have a life of their own getting ahead of you.

Learning about recursion for the first time, with things like the recursive definition for Fibonacci numbers (fib(n) = fib(n-1) + fib(n-2)), or even solving equations defined as functions like f(x) = f(x + 1) - 1, requires a certain kind of thinking to get used to, to be fine with a function not having answers unless it calculates a large amount of times before 'bubbling up' to the final answer.

I also feel like trying to think about mathematical induction is recursive-like, where you prove a statement is true for n=1 (or some other base case), then assume n = k is true, then prove for n = k+1. Recursive functions also often have a 'base case' - the Fibonacci numbers do too - and the way that you often morph an assumption to prove the next one, while also assuming the truth value of n = k, it's both unintuitive and recursive-feeling.

Other infinite media

There are games a bit like Patrick's Parabox but are 2D with a continuous grid instead of a rigid one.

Recursion
Game Inside a Game Inside a Game Inside a Game

In these, the player does not 'scale up and down' to perfectly be a 1x1 block, meaning that changing your scale by going through different recursion levels is a mechanic. Jack Lance's INF is also quite similar.

INF
INF

The scaling reminds me of the 3D recursion in Maquette. When small, it takes FOREVER to traverse a big world, and the game ultimately needed to be rigidly locked down in terms of design to not get out of hand. It has mixed reviews for having 3D as a visual setpiece and walking simulator instead of puzzles.

Maquette
Maquette

Things that don't feel like recursion despite being recursion, and vice versa

The game "Recursed" has chests that teleport you to other chests. But because it doesn't really have visuals to show what chest leads where, there is no cool visual quality to this recursion. I think the game really could have used that feature as well as a minimap.

Recursed
Recursed

In addition, just looping does not fully feel like recursion. Programming-wise, many functions implemented with recursion could also be implemented with a loop (which is called iteration). It's kind of cursed that often in recursion examples, the normal looping function is faster and more obvious what's happening.

Visually speaking, looping can give vast and huge feelings too, such as in Manifold Garden, a game with infinite looping worlds:

Manifold Garden
Manifold Garden gif yoinked from wikimedia so I must mention the image is a Creative Commons Attribution-Share Alike 3.0 Unported license usage

I do think Manifold Garden had a feeling of lost potential, despite how visually stunning it is, and I couldn't put my finger on it for a while. It was not quite that the puzzles seemed maybe a bit small-scale and enclosed. I think it is that the dream for these types of games is imagining the vastness, looking at how far away you can go and see and still not reach the end. This implies potential secrets and aberrations within the infinite, and I wonder if there could be more of that. (The secrets in that game kind of go there, I suppose, but not the maingame.)

It is also hard to call a real-life phenomenon 'recursion', but a hall of mirrors, or pointing two mirrors at each other, also has this sense:

The Art of Reflection
The Art of Reflection

Overall, I think what's awesome is to capture the 'big' in some way, whether it's an unbelievably large amount of 'small' beneath you, or just taking a small glance at the 'big' above you. Both in 2D and 3D.

Fractal Factory
Fractal Factory by bcat112a

Small setpieces and other miscellaneous stuff

Ouroboros
The ancient symbol Ouroboros, a dragon that continually consumes itself

I consider "exploring the world while small", or "exploring the world on a different gravity" and such things, incredibly high potential for the feeling of a world being of infinite depth.

Three-Fold Maze
3-Fold Maze

The Stanley Parable also uses recursion on its title screen for a neat effect:

The Stanley Parable
The Stanley Parable's title screen
  • A video, "Universe in a Box" by Buttered Side Down, with a literal "PARABOX" is a short film based on 3D recursion. Playing Parabox you notice some small inconsistencies as to how this would really work, lol
  • Superliminal's finale involves a classic recursive moment of undefined behavior that's given a dramatic ending.
  • In Patrick's Parabox, there is a level near the end of the game where the camera focuses on a place that isn't the player, which is also a bit disorienting.
  • Patrick has released a game called Bubble Sort which is a different take on rooms-in-rooms.
  • Baba's Bababox implements Parabox mechanics in Baba Is You.
  • The custom Lingo map Luodongo has a moment where there are 3 layered castles and you get to experience recursion in it. This is honestly shocking it was made in this engine.
  • The custom Escape Simulator map The Devilish Diorama and The Devilish Diorama 2 are incredibly awesome experiences with recursion. I have a video scheduled on it, stay tuned!
  • I'm Too Big for the Target is a much smaller puzzlescript game where the recursion is 'obvious' after a minute, and very well made.
  • One of the images in this article is from I Made a Game About Recursion (Game Inside a Game Inside a Game Inside a Game).
  • Check my Empty Escape Room video for some 'video' recursion.
  • How much more is there to explore in this genre still? We have had 2D, 3D, warped curved 2D space, I guess we need warped curved 3D space, does Hyperbolica count cause that's just a 'sphere'...
  • Time loop games don't really count unless you can 'travel to a time' and get something back out, probably
  • Fractals probably don't count enough, is there a game where you explore a fractal
  • Can there be recursion in Baba rules? The game in fact has infinite loops, but not recursion...

For even more on this topic, I wrote this as well.


(I suspect there are even more examples of recursion, this site very much needs a comments section, or at least an indicator of community)

check out my work at icely.itch.io