Please download the map generator and use it to make cool things or just study/improve the mechanics. You could make a game which randomly spawns NPCs, monsters, and treasure around the land. You could make character movement speed change depending on the type of terrain the character is walking on. Add mountains and allow flying creatures to cross them faster than walking ones. The possibilities are endless :). The map generator is a bit slow. Depending on your computer, it may take a while to generate new maps. You can also make larger maps by decreasing the tile size. However, this will dramatically increase the generation time. Much of the code in the map generator is commented. Have fun and let me know what you think!
I started this map generator with the intent of building a strategy/RPG game (think HoMM+Risk+HeroScape). It generates random terrain using several algorithms. The resulting environment is good, but there is more than can be added/improved (such as mountains and graphics). The coding could also use some optimization. For example, the tiles do not need to be aligned every time a new map is generated; it only needs to be done if the tile settings are changed. However, the reality is that I probably won’t finish the game portion any time soon.