How I made the Library of Blabber - Part 1: The Outline

For a long time, I've wanted to write about my procedural generation project, Library of Blabber. With PROCJAM 2017 approaching, I thought it's the perfect occasion to finally talk a bit about it's background, the development, the design, the challenges and it's legacy. As it was just a really long essay, I decided to chop it up into multiple parts, and publish each part in following days.

SPOILER WARNING: Before continuing, if you haven't, I strongly advise you to play it first, since the post, obviously, contains spoilers. The game is on itch, and it's free!. Just remember to return to reading this post and don't end up exploring for eternity.. ... ..

In short, Library of Blabber is a game where you walk around and explore books with procedurally generated texts in an infinite library. Although well, I would personally prefer not to call it a 'game', since there isn't any clear goal.

I have actually discovered the idea about the library in a VSauce video, where he mentions the Jorge Luis Borges story "The Library of Babel" and the idea of an infinite library that contains every work of every author that was ever written, and ever will be written. He also added that you can actually explore this library yourself, online, with by Johnatan Basile. The moment I heard that, it sparked my interest in Borges, and consequently, I read the original story, together with a few other of his short stories. And as with every possible thing that enters my ear, I thought silently 'well, this could be a cool game experience', and as with every thing that I think of in this way, I didn't seriously consider actually making it.


A few weeks later, I found out that Procedural Game Jam is happening! I thought, well, wow, I could make something like the Library of Babel! I really wanted primarily to make something that would really feel seamlessly infinite for quite some time, and this was the perfect opportunity to combine those ideas.

I laid on a bed (or.. maybe I went to the toilet, my second think-place, I don't actually remember) and violently started visualizing the project. As in every about-to-start-design-a-new-game process, there's a storm in my brain for about 10 minutes until something actually useful comes out. So, after those 10 minutes, I came up with a few important plan-points:

The Outline

The first thing, obviously, is that the library needs to be infinite. Since the story describes identical chambers and corridors, I decided right away to simply have the chambers as static models, and then wrap the players' 'local' position as they move from chamber to chamber, while adding a 'global' coordinate that corresponds to the chamber coordinate the player is at.

Now, since we have that 'global' coordinate, I thought it would be nice to have a system where every book will be the same no matter who plays it when on which machine. In a way, it would be a 'multiplayer singleplayer'. You could go to one book, write down it's chamber's coordinate, wall, shelf, and the other person, maybe on the other side of Earth, would find exactly the same book at that 'address'. I used to call this attribute 'returnability', as in, when you go far away, and come back to the same location, you will find the same thing. But it's a bit of a ridiculous term, and unless you explain it, people don't readily understand it.  So nowadays I prefer calling this 'persistence'.. Although persistence can also be confused with a lot of other things.

The third thing I outlined, is a seamless experience. No cuts, no loading screens. I believe that seamlessness is the only way to truly perceive how big something is. Especially when it is magnitudes of scales of difference. Seeing a letter on a page in every book, then closing it with a smooth and juicy animation and sound, and then running through the halls while looking at an infinite point in the distance, then turning to a random book and opening it to to an arbitrary page. It just had to be this way.

This is the feeling I had when, as a huge fan of atlases, I discovered Google Earth for the first time. Being able to zoom in seamlessly into every nook and cranny of the planet, and then zoom out to see the entire planet. Every atlas I ever looked at faded away in significance.

One more important thing for me was to have the book titles visible. A library experience is simply not a library experience if you don't decide to stroll among the shelves, glance over the books, and on every that-is-such-a-bollocks title imagine what could it possibly contain. Is it an essay? A biography? A self help book? A collection of poems? I felt that titles on books are something that is lacking in other games I played. As an example, in Thief (one of my favourite childhood games btw. Be advized: I will talk a lot about it on this blog), if an object is supposed to have a title, it will display a message on screen when interacted with. However, I knew that the reason most games did this is simply for memory/performance reasons, rendering so many text meshes at once is really performance intensive. I thought we are well pass that era and we can finally do it properly in a modern game. Howeeeveeer, I was actually SLIGHTLY wrong about that.. This is something I will talk about more extensively in a later part. But it simply was too important not to implement.

So in short, I had 4 words to begin with: infinitepersistent, seamless and .. titles

The Geometry

initial layout sketches, jumbled up with some other unrelated scribbles

In my first brain-storm visualization, it was pretty clear that I wanted to have a medieval castle look. Reading the story, I couldn't unsee the hidden library from The Name of the Rose. A few other, more modern designs crossed my mind, but as an admirer of stone cathedral ceilings and a former architecture student, I thought this would be the right amount of challenge. I took a look at a several polygonal medieval towers, and especially at Castel del Monte in Apulia, where The Name of the Rose was actually shot.

Now, with the vague idea of the style I want the library to have, I went back to the original story to find out more about the geometry of the library. In the first paragraph, Borges mentions:

" The universe (which others call the Library) is composed of an indefinite and perhaps infinite number of hexagonal galleries, with vast air shafts between, surrounded by very low railings. From any of the hexagons one can see, interminably, the upper and lower floors. The distribution of the galleries is invariable. Twenty shelves, five long shelves per side, cover all the sides except two; their height, which is the distance from floor to ceiling, scarcely exceeds that of a normal librarian. "

Now, ok, it all makes sense, I was starting to sketch the hexagons..

" ..One of the free sides leads to a narrow hallway which opens onto another gallery, identical to the first and to all the rest. "

Now, this is where I hit the wall, literally, "if only one side of a chamber is connected to another chamber using a corridor, they can't really connect to any other chamber... right?" I thought.

"(...) Also through here passes a spiral stairway, which sinks abysmally and soars upwards to remote distances. "

Well, ok I thought, the spiral staircase will connect the two corridors vertically, but that still means you can only reach chambers around the vertical axes of corridors.

I turned to paper and after a lot of tries and sketches to find out with what Borges actually meant, I've decided to go with something that makes more sense, but still in some elements follow the original.

The corridors would instead connect to 4 hexagonal chambers, which would have 2 exits to corridors and 4 walls of books. Instead of having chambers in true hexagonal pattern, chambers and corridors alternate their positions in a chessboard pattern. Therefore, the hexagonal chambers would not directly touch walls of other chambers, but have some empty space in between.

final layout of the library

On a much later read, I had realized that I probably misinterpreted 'free' in the text as 'free from shelves', rather than 'free from walls'. Which would mean that the 'vast air shafts' then could be actually hexagonal and chamber-sized. But by then, the game art was already complete.

Now, you see, the library in the story is actually sprawling in 3 dimensions, with infinite floors. And, as a consequence there is no natural light coming in, as the story mentions:

" Light is provided by some spherical fruit which bear the name of lamps. There are two, transversally placed, in each hexagon. The light they emit is insufficient, incessant. "

This has really clashed with my vision of a tower-looking hexagonal chambers with sunlight striking in, and with the jam's limited time, I just simply decided to cut the infinite floors. This decision has actually just solved a lot of possible problems: no need to design, model, and manage player physics for the staircase (since player movement is now completely on a flat plane), no need to make sure you can see 'infinity' in the vertical axis too, no need to generate at least a 50% more books at one time. All this has proven to be on-point, I would probably not have finished the game in a week if I had worked on the 'verticality'.

That ends this part, and thank you for reading! In the next chapter, I will talk about blocking out the library, implementing the player wrapping and creating the illusion of infinity.