How Do I make Random Map Generators?
How Do I make Random Map Generators?
I am a programmer making games and I know that random generation is why 'Diablo' was one of the best games for years after it's release. I just had my artist ask to leave the position and now I AM the crew, lol.
I can draw maps of mediocricy, but I was hoping for advice on how to put the puzzle pieces together to make a map working. I am going to make cities nd I dont want roads leading into buildings and I saw a great example on http://www.djeryv.com/ .
I want to make a ruined city feel.
The most important part of this thread is: Is there any advice for a rookie cartographer on making a randomly assembled map?
Well, a good starting point would be some graph theory. Probably the best way to lay out a city would be to generate either a random graph, or some grid starting point, and then manipulate it until it complies with some rules.
For an "organic" European type city, I'd probably use the centroidal voronoi algorithm to get a graph, and then pick some reasonably straight walks through it and mark them as major roads, then try to cover the open spaces with progressively less significant streets until all the edges have been incorporated into streets.
For a gridded, North American feel. You need, a grid, and then a bunch of random and terrain based deviations from it. Some cities have multiple grids abutting each other which adds some complexity.
This is not a simple problem.
I attempted an AI system using economics. Whilst I dont think this would be ideal for what your looking for it gives some hints about programming and stuff in there.
I also did one about automated Thatching which might generate some textures for houses.
and then there is my automated texturing where we can drive the texturing from some masks
which was similarly done by RobA and made into a Gimp script
There are loads of random terrain, fractal terrain, noise maps, fractalizing coast lines etc - try a few searches. RobA has a lot of GIMP scripts for all sorts of stuff and some others have wrote cave generators, and Traveller star chart generators as well.
I took a look at the fantasy city maps at http://www.djeryv.com/ and they look to be generated with a basic geomorph generator. That is, blocks are defined with appropriate connectivity, a basic tile is selected, tiles that match the edges of the existing tiles are added (it's the same technique used in link 3 in Redrobe's post above). This technique can be modified in many ways (distance from resources, distance from city center, etc), but the overall layout will always match the underlying grid geometry (usually square). The hardest part is getting enough tiles to avoid obvious repeats, followed by avoid repeats in a reasonable perceptual distance. Many folks have done good jobs with 20 to 40 unique tiles, but I am always in favor of more. If you're interested in having several different sets of edges, consider searching the internet on the term "Wang Tiles".
If you'd like to go for the building-level procedural generation method suggested by Hai-Etlik, take a look at http://peterwonka.net/Publications/publications.html for inspiration.
The best advice I can give you is the same as I learned back in the good ol' days of hand mapping: place the elements that are important to your plot first and then grow out from there. If you're using geomorphs, having a lot of geomorphs of 1x1 size to do infill is good, a number of 1x2 tiles to give better visual breakup, and larger ones as needed for unique areas like boss temples.
Amazing post by Waldronate...I'd never heard of Wang tiles.
There is a freeware city generator - rpg city map generator floating about on this site and the web if you want to search for it. Lots of knobs and dials to twiddle.
Best use I've seen of Wang Tiles recently is http://johanneskopf.de/publications/blue_noise/ - real-time zoomable stippling. Replace stipples with symbols and you've got something that folks here might find useful.
On an unrelated note, always look at the "other publications" links for authors of any paper that interests you. http://johanneskopf.de/publications/...aps/index.html is but one example.
Last edited by waldronate; 03-26-2012 at 09:26 PM.
That is VERY cool, I'm going to have to try it when I've got time.
Originally Posted by waldronate
Tags for this Thread