I wanted to create a random level generation system for Fool's End Daily Challenges. This mode randomly generated one level per day for all users to play (the level is the same for all users).
I used the Spelunky method, which involves diving the game level into smaller rectangles, called rooms. Each room is then filled with what appears to be random contents, but is actually selected (mostly randomly from) a manually created list of room types, all with predetermined contents layed out.
Each room is made up of 16x16px tiles, laid out 8 rows by 10 columns. Each tile's individual contents are predefined as letters or digits, so that when the script for building rooms runs it designates the string as a tile. For instance, I use 0 to designate an empty tile, 1 for a dirt tile, 2 for rock.
The individual tile types also present an opportunity for baked in randomness too. Eg. "3" gives a 50% chance of rock 50% chance of empty.
EXPLAIN the path guidance system
EXPLAIN chunks
EXPLAIN the seed system
EXPLAIN chunks
EXPLAIN the seed system