Map generator 2.0

Discussion in 'Mapping Questions & Discussion' started by martijntje, Jul 10, 2013.

  1. martijntje

    martijntje L8: Fancy Shmancy Member

    Messages:
    539
    Positive Ratings:
    168
    After looking at old posts of mine, I found that I once made a random map generator (http://forums.tf2maps.net/showthread.php?t=11564)

    However that program did not really produce anything useful and I no longer had the source code, so today I decided to write a new map generator.

    So today I got the basics coded and wrote a simple terrain generator. Basicly it is a python script that writes a vmf file that can be opened by hammer and then compiled,
    [​IMG]

    Unfortunalty I already faced a lot of problems, most notacibly the long compile times. I had planned to make a full tf2 styled map (minus objectives and spawns). For instance I wanted to generate bridges and towers such as at gravelpit point c. However seeing as how this simple map already took 9 minute to compile, I would have to make some huge optimizations to make a more complicated map feasable.
    [​IMG]

    Now the maps that it generates is functional, not very playable. The higher areas are only reachables by demoman and soldiers (and scouts with FaN).

    Some more pictures
    http://steamcommunity.com/sharedfiles/filedetails/?id=159083482
    http://steamcommunity.com/sharedfiles/filedetails/?id=159083603

    Size when compared to a soldier
    http://steamcommunity.com/sharedfiles/filedetails/?id=159082550
    http://steamcommunity.com/sharedfiles/filedetails/?id=159082463

    If you want to check it out for your self, the code will be publicly available at
    https://github.com/martijnterpstra/mblock/blob/master/mblock.py

    In the next version I will probably make the terrain smoother (there are already way too many minecraft themed maps) and make everything more optimized.
     
    • Thanks Thanks x 4
  2. nightwatch

    aa nightwatch

    Messages:
    640
    Positive Ratings:
    446
    working displacements into the mix might be a good idea.
     
  3. re1wind

    aa re1wind

    Messages:
    644
    Positive Ratings:
    382
    I actually really like the style.
     
  4. Valkyrie

    Valkyrie Guest

    Positive Ratings:
    0
    Mapping contest with this, is good idea
     
    • Thanks Thanks x 2
  5. YM

    aa YM LVL100 YM

    Messages:
    7,099
    Positive Ratings:
    5,742
    Terrain -> displacements.

    Displacements seem pretty simple to generate with code.
     
  6. henke37

    aa henke37

    Messages:
    1,890
    Positive Ratings:
    443
    Maybe you should focus on useful geometry. Like say, buildings.
     
  7. Penguin

    aa Penguin Clinically Diagnosed with Small Mapper's Syndrome

    Messages:
    1,992
    Positive Ratings:
    1,233
    compile times would be shorter if you made bushes into details.
     
  8. Freyja

    aa Freyja ¯\_(ツ)_/¯

    Messages:
    2,851
    Positive Ratings:
    4,851
    That result reminds me so much of the Super Adventure Box from GW2:

    [​IMG]
     
  9. re1wind

    aa re1wind

    Messages:
    644
    Positive Ratings:
    382
    I second the notion of a mapping contest using this as a basis for terrain/geometry
     
  10. martijntje

    martijntje L8: Fancy Shmancy Member

    Messages:
    539
    Positive Ratings:
    168
    I have tried using displacements, however have not got them to work just yet.

    I have optimized it a bit. The compile time is now down to a reasonable amount. Because of this I was able to increase the size and detail of the map. Right now it generates maps of 8192x8192 hammer units in size and 4096 hammer units tall.

    [​IMG]
    Also I started experimenting with adding water (you can see a "river" in the background)

    Next I will probably start adding props. If that works I will see if I can implement some map objectives. I Probably start with arena mode.
     
  11. PoignardAzur

    PoignardAzur L2: Junior Member

    Messages:
    92
    Positive Ratings:
    7
    Minecraaaaaft ! :D
    (I'm so sorry)
     
  12. martijntje

    martijntje L8: Fancy Shmancy Member

    Messages:
    539
    Positive Ratings:
    168
    Added random foliage and initial pathway generation (wooden textures)

    [​IMG]

    Still not completely satisfied with the scale or the map
     
    • Thanks Thanks x 2
  13. henke37

    aa henke37

    Messages:
    1,890
    Positive Ratings:
    443
    Try having less mismatched cubes and more of a structured layout. You know, things like houses.
     
  14. jakoman

    jakoman L1: Registered

    Messages:
    39
    Positive Ratings:
    2
    I could see this being more useful in its current state for inspiring layouts than actually serving as them. Still really cool though.
     
  15. YM

    aa YM LVL100 YM

    Messages:
    7,099
    Positive Ratings:
    5,742
    Why do you have a brush definied twice, once for regular brushes and once for func_details? Surely I'd be better to define a brush, and then define the entity wrapper that goes around it.