Page 1 of 3 123 LastLast
Results 1 to 10 of 36

Thread: Working on a ambitious world generating tool...

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Post Working on a ambitious world generating tool...

    Hi all...
    I like rpg games a lot!, in fact I used to be a DM.
    Beeing a DM I realized that there are a lot of oportunity areas in software for helping the planning of sessions. So I decided to write a program to help de DM taylor a world. As I say in the title, the project is to ambitious.
    It includes the creation (automatic generation and manual detailing) of regional, area and local maps (Continent, cities, dungeons... even floorplans).

    I have a very good advance in some modules...
    Right now I can:
    * Generate a fractal region (continent) map
    * Paint it whith different gradient color schemes
    * Generate winter and wummer climate maps
    * Simulate climate according to latitudes, date, axis inclination, etc (temperatures (max-min), pressure, humidity, soil saturation, precipitations, wind directions and wind strenght)
    * Zoom in and out
    * Put manually pins and indicators with descriptions (which can be viewed only when certain ammount of zoom is applied) -cities, farms, castles, towns, etc, etc, etc...
    * Customize and show/hide a grid (hex or cuad, color, size, border width)
    * There are hundred of icons of mountains, cities, trees, villages, castles, ruins, temples, towers, etc...

    Right now I am working in the mechanisms to grow rivers, forests and cities according to climates... And I must admit that rivers are tough...

    There is a really big list of features waiting to be coded including...
    * The generation of area maps (cities, villages, ports, etc...) Right now I have some basic working algorithms...
    * The generation or building floorplans.
    * The maps will be linked together, so you can open the map of a city clicking in the region... and open the floorplan clicking in some building in the city...
    * The map will draw a network of roads between cities (considering importance and population)
    * You will be able to zoom in a sector and find out fauna (generating encounters with the possible monsters of the area)

    Well... that's why I'm here... I wish you help me with feedbak, ideas and critics. As soon as possible I will upload an alpha so you can start trying the software...

    Can someone tell me which is the correct thread to discuss such matters?

    Excuse my english please, is not my natural language.

    I leave you some screenshots so you can figured out what I am talking about...
    Regards

    Cova
    Attached Images Attached Images
    Last edited by covatex; 11-21-2008 at 01:33 PM. Reason: Add question about correct thread

  2. #2
    Community Leader Facebook Connected Steel General's Avatar
    Join Date
    Jun 2008
    Location
    Ft. Wayne, IN
    Posts
    9,531

    Default

    There are several members here who are knowlegable in the areas you arelooking for assistance in - unfortunately I am not one of them. I'm sure they'll be along at some point and can answer your questions.

    In the mean time... Welcome Aboard! Be sure to introduce yourself in the Member Introductions thread and/or add your location/pin to the members map.

    I hereby banish your "Blue Pip O'Anonimity" *bonk*
    My Finished Maps | My Challenge Maps | Still poking around occasionally...

    Unless otherwise stated by me in the post, all work is licensed under a Creative Commons Attribution-Noncommercial 3.0 United States License.



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

    Post

    Thats pretty ambitious indeed. It would wrap up a mapping app, a content generator, a content organizer for all three domains of terrain, city/building and dungeon all in one.

    Is the idea to always produce roads and floor plans or to make them when you request them. If the DM wanted specific roads or a specific floor plan can he do that ?

  4. #4

    Post

    The main idea is to make the DM's life easy, not to make the DM's life
    Roads, city positions (even number and type of cities) and forests and mountain icon positions are pregenerated, but you can erase them, or add completelly new ones.
    City plans, and floor plans are generated on demand, but you can easily (is this the correct spell? ) edit them.

    Content generator engine is ready! Actually names for pins and region maps are generated with a grammar (you can grab your notepad and edit the grm file to add, delete or modify productions and chances of apparition) There's also a pc and npc generator (including race, feats, skills, class, traits, pictures, etc... -all configurable-) based on the same engine, but this is a matter of another kind of forum, isn't iti?

    As I said in previous post I'm having some troubles to put the rivers. I know how rivers must go (from hills to sea, growing as they reach the ocean, with 'meandros' in plains, etc.) but I can't get a good natural looking algorithm to do that. Pathfinding stuff doesn´t produce good results... And rain erossion destroys the base map... Any ideas? (this was for coders...)

    Are there any special features you are interested in?
    What do you think about the look & feel?
    Any ideas and critics are wellcomed!

    Regards

  5. #5

    Post

    Ambitious indeed.

    Qs.

    What format are you storing your graphics files in?

    I notice all your examples are square. Is that the current field of your algorithms?

    What programming language(s) are you using?

    Have you thought about working through individual aspects separately? If so, do you have a part of the process you're working on right now? You know, if the interesting bit is the world making. You might be able to make some cool filters for the Gimp or Photoshop. You'd be spared from doing the rest of the interface.

    Can you generate your rivers on a separate layer and then apply only localized erosion around the rivers to preserve the rest of your map? Or offer a sliding scale to the user starting with the rivers and proceeding with the rest of the erosion?


    Sigurd

    Good luck

  6. #6

    Post

    Quote Originally Posted by Sigurd View Post
    Ambitious indeed.

    Qs.

    What format are you storing your graphics files in?

    I notice all your examples are square. Is that the current field of your algorithms?

    What programming language(s) are you using?

    Have you thought about working through individual aspects separately? If so, do you have a part of the process you're working on right now? You know, if the interesting bit is the world making. You might be able to make some cool filters for the Gimp or Photoshop. You'd be spared from doing the rest of the interface.

    Can you generate your rivers on a separate layer and then apply only localized erosion around the rivers to preserve the rest of your map? Or offer a sliding scale to the user starting with the rivers and proceeding with the rest of the erosion?


    Sigurd

    Good luck
    Sigurd:
    The map generator is in C++, and write BMP's. You can then -if you want- convert them to GIF or JPG. The main application is in VB6, and reads an ASCII .map file containing info of roads, pins, locations, graphic files locations height, width, comments...

    As I am using the diamond sqare fractal algorithm the maps are sqare, but in the .map you can specify your height and width. I am planning to add the Perlin noise algorithm in the generation (as in Terragen, using both diamond sqare and Perlin noise)

    About being spared from doing the rest of the interface, I actually WANT to do the whole interface! so I can keep control of all the features.

    About generating the rivers in a separate layer is a pretty good idea, and the post erossion could work too, but the actual problem is to define a credible river path considering the geological surroundigs and the climate/precipitations.

    I will start thinking about the post-erossion and the posibilities of the extra river-lake layer. Thx a lot for your comments.

    Regards

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

    Post

    Everyone is finding it hard to do water flow accurately. There has been a number of people who have something that's an approximation to it. All of them have good and bad. The better ones seem to be very slow.

    To do the wobble in a river thats a "meander" so similar word. Check out the wikipedia entry:
    http://en.wikipedia.org/wiki/Meander

    also Rilles:
    http://en.wikipedia.org/wiki/Rille

    If you want them in your rivers you will need to track sediment as well as water. You have to put down sediment that the water carries until the river changes direction. To do that you need to track the water speed and possibly pressure. It all starts to get hard very quickly.

    I write one called GeoTerSys on my sig below.

    I also write a zoom campaign manager too. Thats on the sig as ViewingDale. If your able to view AVI movies with an XviD codec look through these movies:
    http://www.cartographersguild.com/showthread.php?t=2182

    Try using VLC movie viewer.
    http://www.videolan.org/vlc/

    Also check out:
    Wilbur - http://www.ridgenet.net/~jslayton/software.html
    GeoControl - http://www.geocontrol2.com/e_index.htm
    L3DT - http://www.bundysoft.com/L3DT/
    WorldaMachine - http://www.world-machine.com/features.html
    http://www.iahr.org/membersonly/graz...00/000/364.htm

    The last one has some maths about the physics behind the process. You might have to simplify the process tho. Theres a big list of references there too to go through.

    Oh yeah, also check out these movies from Ron Fedkiw's page of research work with his students. Some of the fluid ones are particularly interesting. The papers for them are available though difficult to understand and definitely difficult to implement for large terrain surfaces.
    http://physbam.stanford.edu/~fedkiw/
    Last edited by Redrobes; 11-21-2008 at 04:03 PM.

  8. #8

    Post

    Redrobes:
    I've been watching your work in ViewingDale and I must say that is a really AMAZING work!!! The zoom level is incredible! How do you do that? Do you keep separate resolution images? is everything on the fly?
    The quality of the terrain graphics is impecable!
    Congratullations

    I'll check the links you've just send me. Thx a lot, and congratullations again!

  9. #9

  10. #10

    Post

    Ok I actually have a lot to say about this project. In particular when it comes to these rivers.

    Ok, Anyone ever hear of the Chaos Theory?

    All that it implies, is that ALL things no matter how big or small ALWAYS ALWAYS ALWAYS take the easiest route possible through ALL things, period point and blank.

    (I'm not talking about the thing that a butterfly flaps its wings in India and there is a tornado in Oklahoma..)

    It also implies, that no matter how complicated or random something looks or seems to be, it is always so simple, that most never find the answer to the question they are asking until they look away and do something else, or they see a clock on a wall as they are riding a bus (Einstein) and figure out the theory of relativity.

    I know your English isn't that great, so I will do my best to explain this theory I have on generating streams rivers and the like, and have complete control over it...

    OK...

    On a grey-scale height-map of a terrain there are only so many colors you can have.

    For simplicity sake and continuity of argument, we are going to say that our terrain has only 255 colors in it ranging from Pure Black "0" to Pure White "255".

    I have provided an image to help you follow along with what im saying.

    The first step in the Algorithm, is to establish your high points.

    You have your program search out the Highest points on the terrain.

    You can have it set so you put for example, 10 colors variation.

    So it finds the highest point, for example 255 (most likely you will never have a 255 unless you want it). If you set your number to 10 earlier it would mark every area from 255 to 245.

    On the image below those are the red dots. (normally there are way more)

    Then you have your program find the Lowest points in the same manner.

    We will set our number to 10 again. so it will find all the colors ranging from 0 to 10 only.

    On the image below I have these areas marked as the bright Yellow spots.

    The last part of the finding phase is the midpoints.

    Once again we set the program to work finding the all the points that are directly int he middle of the highest point and the lowest point.

    On this example it is all the colors that are 127-128.

    Once again we set our range to a 10. so it will find everything from 117 to 138.

    These areas are marked as a bright green spot on the image below.

    Now is the time that you need to set it so that the person doing the map can erase or eliminate points he does or doesn't want.

    Say, he has a desert area with no water at all.. he can go through and delete any of the points found in the area that is desert.

    Now the fun part and the heart of our river algorithm comes through, and my point about Chaos Theory comes to light.

    All your system does from this point, is generate a river "seed" from the highest point to the lowest point. with a twist!

    Your first thought is, "well all that does is make strait lines"!

    No not with my super complicated math algorithim!

    Actually im kidding its probably the simplest math problem known to man.

    It does find a strait line, AT FIRST! this is just so it knows which direction to head in.

    THE MEAT

    Since all things follow the simplest path NO MATTER WHAT as my theory states. were going to give it the simplest path to follow with some simple rules.

    1, in order to continue, the path must find the VERY next closest color in the height map to continue that is at least 1 below the current color.

    EXAMPLE;

    If the path it will follow starts at color 246 (Our highest point). And the absolute next closest color is 240. the program simply draws a line from 246 to 240. Then the next color is 238. the program draws a line from 240 to 238, and so on and so forth till it gets to the midpoints that were left behind by the mapper that are around 138 or so.

    Once it gets to this step. It repeats the process to get from the midpoints to the closest low points or it hits zero. whichever comes first.

    Example;
    The program runs out of numbers in its path trying to get to the lowest point from the midpoint (probably wont) and the stream/river stops.

    SUBTRACTION! Thats the hardest algorithm EVER! LOL.

    For the base of the river it is slightly different. Its the same theory except in a positive direction.

    First the program tries to find a way using colors from one lowest point to another. once it has exhausted its options at a color of 0 (which will most likely be really quick). It tries to get to the other point with a range from 0 to 1. Once it cant make it from there, it tries to get there with a range from 0 to 2. and so on until it gets from one point to the next, then it starts over to get to the next point and so on until it gets to the point the mapper left in the ocean area.

    You will actually end up with a pretty neat winding river with thick points and thin points being fed along the way with winding smaller rivers.

    They may not meander perfectly, they will be winded and believable.


    Now I know I can be wordy, and im sure your going to scratch your head a few times. But it will work im sure of it, I wish i could code it myself for you.

    In the end all im saying is the world or the universe doesn't care about velocities and force and sediment distribution, im sure it looks like it does, and you can take 10 years to try and make sense of it.

    OR you can just say what it is, rivers flow downhill and they take the easiest and most direct path to get where they are going.

    A few techie things.

    1, you should give the ability to set the number of smaller streams coming off of any given point.

    each point can only go to each point once. So if I set MIDPOINT 1 to have 2 streams branching, 1 stream will go to LOWPOINT 1 and the other will try to get to LOWPOINT 2 (if it is the next closest one to MIDPOINT 1), It will ALWAYS try to go to the next closest one even if that means it is LOWPOINT 8..

    MIDPOINT 2 can have a stream going to LOWPOINT 1 or 2 if it wants.

    Thanks

    Terry

    Any question ill try to explain more for the sake of me and everyone else.

    my picture isnt perfect.. the lowest river going yellow dot to yellow dot would be much bigger and thicker due to adding to get from one to the other!
    Attached Images Attached Images
    Last edited by Nickadimos; 11-23-2008 at 05:46 PM.

Page 1 of 3 123 LastLast

Posting Permissions

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