So… Caves

Yes, caves. Origianl. No.

Anyways, I have a cave generation system done. Really simple, but working. Right now it fills a square with three types of terrain: Ground, Wall and Solid Wall. Walls can be destroyed leading to other parts of the cave. Eventually, there will be “holes” which lead to another caves, and so on. The deeper you are, the harder it gets. Destroying walls can give you minerals or metals of different kinds. At the end (level 16 or something like that), a big treasure awaits. Your scare is how much everything you have is worth. Or something like this, maybe.

Here is what the cave generator outputs as a 50×50 cave. Dots are ground, # are solid walls, % ar destroyable walls:

##################################################
 #######%%##%%###%%%%######%%%#########%%##########
 ######%%%%%%%%%%%%%%%####%%%%%%%#####%%%%%%%%%####
 ######%%%%%%%%%%%%%%%###%%%%%%%%%####%%%%%%%%%%###
 ######%%%%%%%%%%%%%%%###%%%%%%%%%####%%%%%%%%%%###
 #####%%%%%%%....%%%%%####%%%%%%%%%##%%%%%%%%%%####
 ####%%%%%%%.......%%%####%%%%%%%%%%%%%%%%%%%%%####
 ###%%%%%%%%........%%#####%%%%%%%%%%%%...%%%%%####
 ##%%%%%%%%%%........%#####%%%%%%%%%%%.....%%%%%###
 ##%%%%%%%%%%%.......#####%%%%%%%%%%%%.....%%%%%%##
 ##%%%%%%%%%%%%%....%####%%%%%%%%%%%%%.....%%%%%%%#
 ##%%%%%%%%%%%%%%..%%####%%%%%%%%%%%%%%.....%%%%%%#
 ##%%%%%%%%%%%%%%%%%%#####%%%%%%%%%%%%%%.....%%%%##
 ##%%%%%%%%%%%%%%%%%%%####%%%%%%%%%%%%%%......%%%##
 ##%%%%%%%%%..%%%%%%%%%####%%%%%%%%%%%%.......%%###
 #%%%%%%%%%........%%%%%#####%%%%%%%%%%......%%####
 #%%%%%%%%%.........%%%%%#####%%%%%%%%%%....%%%####
 #%%%%%%%%%.........%%%%%#####%%%%%%%%%%%%%%%%%%###
 #%%%%%%%%%%........%%%%%####%%%%%%%%%%%%%%%%%%%%##
 ##%%%%%%%%%%......%%%%%%%##%%%%%%%%%%%%%%%%%%%%%##
 ##%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
 ##%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
 ##%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
 #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
 #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
 #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
 ##%%%%%%%%%%##%%%%%%%%%%%%%%%%%%%%%%%%%%%%###%%%##
 ##%%%%%%%%%####%%%%%%%%%%%%%%%%%%%%%%..%%#####%%##
 ##%%%%%%%%%####%%%%%%%%%%%%%%%%%%%%%%%..%#####%%##
 ##%%%%%%%%####%%%%%%%%%%%%%%%%..%%%%%%...%####%%%#
 #%%%%%%%%#####%%%%%%%%%%%%%%%....%%%%.....%##%%%%#
 #%%%%%%%%####%%%%%%%%%%%%%%%%.....%%......%%%%%%%#
 #%%%%%%%####%%%%%%%%%%%%%%%%%............%%%%%%%##
 ##%%%%%%###%%%%%%%%%%%%%%%%%%..........%%%%%%%%%##
 ###%%%%%%#%%%%%%%%%%%%%%%%%%%%.....%%%%%%%%%%%%%##
 ####%%%%%%%%%...%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%##
 ####%%%%%%%......%%%%%%%%....%%%%%%%%%%%%%%%%%%%##
 ###%%%%%%%........%%%%%.......%%%%%%%%%%%%%%%%%%##
 ##%%%%%%%%....................%%%%%%%%%%%%%%%%%%##
 ##%%%%%%%%...................%%%%%%%%%%%%%%%%%%%##
 ##%%%%%%%%%................%%%%%%%%%%%%%%%%%%%%%%#
 ##%%%%%%%%%%........%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
 ##%%..%%%%%%%......%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
 #%%....%%%%%%%....%%%%%..%%%%%%%%%%%%%%%%%%%%%%%%#
 #%%....%%%%%%%%..%%%%%.....%%%%%%%%%%%%%%%%%%%%%%#
 ##%%..%%%%%%%%%%%%%%%%......%%%%%%%%%%%%%%%%%%%%%#
 ##%%%%##%%%%%%%%%%%%%%......%%%%%%%%%%%%%%%%%%%%##
 ###%%####%%%%%%%%%%###%....%%%%%%%%%%%%%%%%%%%%###
 #############%%%%%#####%%%###%%###################
 ##################################################
 

That’s all for now. Let’s do some actual gaming code.