A downloadable game for Windows

About the game

Cavern Collapse is a unique rogue-like precision platformer that allows you to collaborate with the level generation algorithm through a level editor. 

  • Travel through five unique stages each run to reach the hidden treasure at the bottom of the cavern.
  • Practice your speed and precision to reach new high scores.
  • Tutorials for gameplay/editor are included on the main menu and editor screen respectively, in the form of .PDFs which open externally.

 

Technical details

Algorithm

Cavern Collapse utilises the Wave Function Collapse algorithm to generate it's stages, which analyses premade examples to produce locally similar output. The level actually takes 30 different steps to generate, with much of it being polishing and verification.

The Wave Function Collapse implementation uses a weighted union comparison to construct the tile ruleset, meaning more frequent tile combinations appear more often in the end result.

Editor

The sample editor is simply an interface to Unity's Tilemap system, and the intelligent tiles are done custom using a bitmask system I made. Samples are stored in JSON format and the ruleset is constructed while levels are being generated in real time.

Generation Steps

On a macro level, the stages are generated by building a sequence of rooms from top to bottom like Spelunky, then reserving a critical path within each room from left to right. Entrances are made between dropdown and landing rooms in the sequence and then a row of blank internal walls are placed around the border of the map and along the bottom of each room as a starting point for the WFC algorithm to grow from. 

The algorithm is completed in 4 different passes, solid walls, platforms/ladders, spikes/coins and finally, decorations like plants and signs. Polishing happens after each pass and finally some small details are adjusted, such as ensuring all signs point towards the direction of progression in the stage. 

Verification steps are also performed to ensure all coins are reachable and nothing is blocked by the placement of spikes, which is accomplished using a single pass of a weighted Dijkstra function, in which spikes are given a weight of 100, walls are non-traversable and all other types have a weight of 1.

 

Credits

  • Featuring 6 amazing experimental/atmospheric songs from Magnofon's album Terrarium (used with permission).
  • Font and original pixel art based on assets by KenneyNL.
  • Programming, design and art modifications by me.


This game was developed entirely in 6 weeks.

Download

Download
CavernCollapse.zip 74 MB

Install instructions

Download and extract the .ZIP file, before running the .EXE file inside.

Comments

Log in with itch.io to leave a comment.

(+1)

Very well polished; Good work!

(+1)

So much personality in this little game, can't wait to see it go far!

(+1)

Seems like a really cool idea...it's a little disappointing that this is *just* the level editor, because you can't get a feel for the game or the way that the algorithm will try to put them together (or something). Hopefully that will be added soon though. Another thing I just thought of: how are we supposed to get these levels that we've created over to you? This looks VERY intriguing and I am very excited to see where this goes next. Keep it up!

(+1)

Hi, and thank you for showing interest in the project! This build was uploaded for a few people at my uni to test early in development. I'm almost finished getting the level generation done and it's coming along really well. The next few weeks will be spent on making other gameplay related things. If you'd like to contribute to the default dataset, feel free to send them to me in a zip file at darcy.matheson10@gmail.com and I'll check them out.

As a little bonus, here's a small map generated by the algorithm using 26 samples. The critical path is marked in red and all coins are reachable from this path as well.