I finally got around to making the Scuba Jim map generator actually show me the map it's making, which greatly improved my very painful attempts at generating the underground cave system. I then tried borrowing a Roguelike dungeon generator, and that went horrifically, so I came up with this new thing... it just snakes tunnels around randomly until they run into an existing tunnel or a place they can't go. Many tweaks beyond that were required.
The slowest part of map generation is after it's built the main caves, it goes in and finds huge open areas of rock (because the cave ends up very lopsided, only usually filling half the map or so), and puts in extra tunnels there. You can see in this map, the main cave appeared on the left, and all those more minor tunnels scattered through the right half are the result of this addition. Makes for a pretty nice maze, I think.
This map is actually enormous
. If you think about playing the current Scuba Jim, those two black triangles on top are the entire space you play in (this is cutting off the top 16 tiles, by the way, which is why there's no tiny peak at the top like usual).
Now I guess I need to make some content that goes IN all this space... I am planning to have Sanity become the resource you have to worry about down in the caves (hence the post title), because you'll have Oxygen pretty well conquered by that point, thanks to [spoiler].