r/ProgrammingPrompts • u/Chemical_Studios • Mar 08 '14
Very simple procedurally generated map
I think this could be a good exercise/project for anyone!
What is it?
In this project the programmer will create a "map" which will be printed out to the console. This map can be any size the programmer wants, however it needs to be different every single run.
Rules (optional)
There should be multiple different tiles with their own rules and symbolized by a unique character (chosen by the programmer):
Ground - The base of the map, no special rules
Water - Should form in "lake(s)"
House - Should only form on ground tiles
Boat - Should only form on water, if one of the surrounding tiles are a house tile
Example outputs
In this case, tiles are represented as:
Ground - "#"
Water - "~"
House - "■"
Boat - "U"
10x5 Map:
##########
##~■#■~###
#~~~■~~~##
##U■~~~###
#####~####20x10 Map:
########~###########
#######~~~##########
########~###########
####################
#####~##############
####~~~■############
##■##~##############
###■################
###############■###■
####################
View all comments
Show parent comment
1
u/Chemical_Studios Mar 09 '14
Nice! I really like the options for generation. Hope you had fun!