Results 1 to 7 of 7

Thread: How Do I make Random Map Generators?

  1. #1

    Question 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?

  2. #2
    Software Dev/Rep Hai-Etlik's Avatar
    Join Date
    May 2009
    Location
    48° 28′ N 123° 8′ W
    Posts
    1,333
    Blog Entries
    1

    Default

    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.

  3. #3
    Administrator Redrobes's Avatar
    Join Date
    Dec 2007
    Location
    England
    Posts
    7,187
    Blog Entries
    8

    Default

    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.
    http://www.cartographersguild.com/sh...sing-economics

    I also did one about automated Thatching which might generate some textures for houses.
    http://www.cartographersguild.com/sh...ng-for-dummies

    and then there is my automated texturing where we can drive the texturing from some masks
    http://www.cartographersguild.com/sh...textured-paths

    which was similarly done by RobA and made into a Gimp script
    http://www.cartographersguild.com/sh...rettier-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.

  4. #4
    Administrator waldronate's Avatar
    Join Date
    Mar 2007
    Location
    The High Desert
    Posts
    3,546

    Default

    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.

  5. #5

    Default

    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.

  6. #6
    Administrator waldronate's Avatar
    Join Date
    Mar 2007
    Location
    The High Desert
    Posts
    3,546

    Default

    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.

  7. #7
    Software Dev/Rep Hai-Etlik's Avatar
    Join Date
    May 2009
    Location
    48° 28′ N 123° 8′ W
    Posts
    1,333
    Blog Entries
    1

    Default

    Quote Originally Posted by waldronate View Post
    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.
    That is VERY cool, I'm going to have to try it when I've got time.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •