Level Analysis: Soulcaster 1

A procedural level builder needs to be able to make fun levels.

It took me a while to get the hang of what is fun to do in the Soulcaster world–when making the first Soulcaster, I probably made about 30 bad levels before I found my footing and made some good ones. In this article I will take a closer look at some of these (the good ones), to see how they are constructed, what experience they offer, and how they might be broken down to be generated procedurally.

One advantage to the pattern-based room generator currently in SC3 is that, worst case, I can just build a large collection of intact levels with some basic parameters, then stitch them together randomly to build the game world. This at least offers the craftsmanship of prefab levels, but kept fresh for each replay. I’m not setting out to make an algorithm that could generate these levels from scratch–that would take way too long. Instead, I’m looking for ways these levels could be broken down into basic elements that could be swapped out, flipped, rotated, inverted, and otherwise manipulated.

Some levels will be only slightly dynamic, while others will have lots of parameters and will be vastly different every time. I think we’ll need a good balance of both of these types to make a solid experience.

Let’s start with the simplest level, the Cellar.

cellarThis is a great example of a room that’s best left intact. It has a few waves of enemies that appear from the barrels, controlled by a combination of floor switches and natural progression by killing foes. Maybe later down the line I could find a way to add dynamic parameters, but that can be put off until alpha or later.

prisonlayoutThis prison layout is something that could be built with patterns pretty easily. The prizes and foes inside the cells would be dynamic.With rotation and flipping, I could make cell blocks of just about any size.

It may even make sense at some point to make their dimensions variable, in case I needed cells that are 3 or 5 tiles wide instead of 4. To do this, I would need to be able to tag certain rows and columns of tiles as “repeating” within the pattern, which would be the ones that would get added as the pattern increases in size. Again, this is a feature I can put off for a while.

wideLevel 2 (where you first get Aeox) is actually just three individual rooms placed side by side. The yellow gate opens when you kill the skeleton (yellow key), and in the next room, the purple gate opens when you kill the rats at the top left (purple key). The third room is really just a place to put a shop and some decoration. In Soulcaster 3, this one level would be split into three individual rooms.

maze

 

Now we’re getting to the interesting stuff. This one has had me scratching my head a bit.

Part of me believes this could be created purely algorithmically, using a maze generator. (The red line shows the path to the exit, and blue lines show the branches you can take.) The real tough part is the proper placement of gates and spawners: the gates need to open in the right order, and the spawners need to activate in an order that makes for an interesting challenge. This is another example of a specialized algorithm that I can tackle later in development.

Another challenge is making a solid level progression within the room (waves of enemies). Not every battle scenario will be like this, because these can be prolonged–but they need to be there. Part of the fun of Soulcaster is surviving a massive onslaught of monsters and thinking on your feet as they appear. For example:

takecoverThe colored walls are actually gates that get destroyed as you progress through the level. When you take cover in a room, you only have so long before the walls disappear and you have to keep moving. This whole layout could be generated procedurally by stamping the rooms onto an open field, then filling in the spaces between them with walls to force a path.

towerdefenseThis is the most basic, tower-defensey level in Soulcaster. You take a central position, and invoke the battle by pressing the blue switch. As you destroy monsters, the next wave advances (some of which come from behind to flank the player). This is another example of something that is best started as a prefab level, with dynamic monsters. Later on I can see about building a maze generator to make stuff like this without a prefab layout.

concentricThis is a great example of a mirror layout (in this case, mirrored along the horizontal axis). The top half is all that needs to be built, and the bottom half derives from it.

The red boxes on the sides are what I consider good candidates for dynamic patterns. There’s an area surrounded by walkable floor, wherein you can put any sort of decorative feature. These could be placed after the layout is mirrored–that way, the basic layout conforms to a mirror, but elements of the level are customized.

castleI became a fan of castle layouts, with an outer curtain and inner sanctum, and in this case a moat and four tower bases. This layout is a prime candidate for two-axis mirroring. Only the top left pattern Q needs to be designed by hand, then it is mirrored across and then downward to build the entire castle. The contents of the inner sanctum and the four towers could then be customized, and decorative patterns could be applied to the outside of the castle (D1, D2). The entrance and exit each need a custom pattern which is independent of the mirror (A1, A2).

Next Steps

The next prototype will just have the ability to place patterns within rooms where they will fit. Once that is working, I’ll experiment with doing a first-pass super layout that includes mirroring, followed by a placement of smaller patterns.

One of the toughest parts of this stage of development is that there are a dozen different things I could be working on. For now, I want to get some good level layouts in place, because that will have the biggest influence on the other game systems moving forward.

Leave a comment

Your email address will not be published. Required fields are marked *