Lots of work this week, with 2 main focal points that I want to share for now: the creation of a procedural prison layout, and website related updates

A prison inside a watery cavern
A prison inside a watery cavern

Prison layout

In the beginning I almost overcomplicated the prison layout design, thinking of different types and sizes of cells etc. My partner thankfully reminded me that prisons are one of the most regular structures out there in terms of room sameyness and organisation, so I put in the design that all rooms should have the same size and can be connected on any side, and they should be the same shape too, typically rectangular. This made everything So Much Easier. Because I'm still a big fan of procgen, I needed to design the layout in a way that can be configured for different scenarios. Instead of a pure word salad, here are images and corresponding parameters, in order of importance.

Block size is a 2D quantity that determines how big each cluster will be

Block size: 1x3
Block size: 1x3
Block size: 3x3
Block size: 3x3

Block number is a 2D quantity that determines how many clusters we have in each dimension

Block number: 1x1
Block number: 1x1
Block number: 2x2
Block number: 2x2

Corridor width specifies the width of corridors

Corridor width: 1
Corridor width: 1
Corridor width: 2
Corridor width: 2

Prison area borders can be open or closed, which can be useful depending on the map they are in and requirements.

Open border
Open border
Closed border
Closed border

In some cases I might want to use this layout for a regularly-structured map where each cell is a room. This parameter allows connections to inner rooms and makes this possible.

No inner connections (prison)
No inner connections (prison)
Inner connections allowed (other building)
Inner connections allowed (other building)

Prison contents

Prison cells need prisoners and other stuff, like cobwebs, some skulls from dead previous prisoners, and a bed for prisoners to sleep in. This required a few modifications/improvements to the prefab placement algorithm, that can trickle to everything else, such as running a generator of a particular element a number of times (or none) so that we generate "between 1 and 3 chairs" or "20% chance to generate a skull". I've also shared some more code with the older "sparse feature placement" code, in particular the ability to identify if we're at a corner/wall and make that a constraint, e.g. must be by wall or by corner, etc. So cobwebs are always in corners and beds are always by the wall, not next to the entrance.

Website updates

I've been making slight changes to the website (as you might have noticed), e.g. including a logo in every page and changing the background. I'm still terrible with web dev/design, so this means I know that it's still not looking great but atm I have no idea how to improve it (while still using Jekyll of course). Something about the font, colors and background shapes bugs me.

I've also just realised the existence of Google Search Console, so trying to figure how to use that, create a sitemap, index pages and so on. Stone age stuff I suppose! The reason for this bit of work is that Google would not be able to find the new website even if I put all the terms. Small victories: now it does :D

Next week: revisiting the layout generator, and stress testing! Also prison needs warden(s) and office.