This code creates a Voronoi Diagram of a low-resolution space, generating an approximation of regional divisions of an overworld map typical of the first Legend of Zelda or Link's Awakening. The white squares are randomly generated "centers".
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
GENS=50 | |
WIDTH=12 | |
HEIGHT=12 | |
declare -a OLD | |
declare -a NEW | |
OLD=( \ |