OTMapGen

Discussion in 'Mapping Showoff' started by Forby, May 9, 2018.

  1. Forby

    Forby Active Member

    Joined:
    Jul 24, 2011
    Messages:
    91
    Likes Received:
    168
    Best Answers:
    0
    The past days I have been working on OTMapGen: a NodeJS library that uses random noise to generate realistic looking terrain for Open Tibia. Who wants to do mapping when you can generate maps? All maps are very simple terrain but provide a good starting point to improve on. Output maps are fully bordered (to some logical extent).

    This is still a work in progress and there may be some bugs, but if you want to give it a spin right now: Inconcessus/OTMapGen.

    Online demo: Open Tibia Map Generator 1.0.0

    There are a lot of sensitive parameters that have a cascading effect on the final result, so be sure to play around with this tool and change some of the numbers.

    To start with here is a map that I generated with a zoom-in on a particular place. Feel free to post anything you generate!

    Forby

    [​IMG]
    [​IMG]
     
    Last edited: Jun 20, 2018
  2. bayview

    bayview Banned User

    Joined:
    Jan 25, 2018
    Messages:
    612
    Likes Received:
    303
    Best Answers:
    24
    Very Cool!
     
  3. Zell

    Zell Member

    Joined:
    Oct 23, 2010
    Messages:
    85
    Likes Received:
    31
    Best Answers:
    0
    I like the idea! great
     
  4. Hunier

    Hunier New Member

    Joined:
    Apr 17, 2018
    Messages:
    29
    Likes Received:
    4
    Best Answers:
    0
    how would I generate it? a map?

    only works in linux ?, does windows work?
     
    Last edited by a moderator: May 10, 2018
  5. Peonso

    Peonso 1337

    Joined:
    Jan 14, 2008
    Messages:
    1,394
    Likes Received:
    899
    Best Answers:
    20
  6. Hunier

    Hunier New Member

    Joined:
    Apr 17, 2018
    Messages:
    29
    Likes Received:
    4
    Best Answers:
    0
  7. Forby

    Forby Active Member

    Joined:
    Jul 24, 2011
    Messages:
    91
    Likes Received:
    168
    Best Answers:
    0
    It works on all platforms. You will need to download the source code for OTMapGen and OTBM2JSON from GitHub using Git or do it manually. Then you need NodeJS to run OTMapGen.js and it will create an outfile map.otbm.
     
  8. Andréew

    Andréew Well-Known Member

    Joined:
    Apr 14, 2015
    Messages:
    483
    Likes Received:
    605
    Best Answers:
    1
    This Looks great! Might actually give it a go!
     
  9. scheisse

    scheisse Well-Known Member

    Joined:
    Oct 6, 2015
    Messages:
    317
    Likes Received:
    302
    Best Answers:
    0
    Reminds me of no mans sky.
     
  10. Forby

    Forby Active Member

    Joined:
    Jul 24, 2011
    Messages:
    91
    Likes Received:
    168
    Best Answers:
    0
    Fixed some bugs with auto-bordering and added code for generation of:
    • grass
    • flowers
    • blueberries!
    • water lillies and plants close to the shore
    • small pebbles (mountains)
    • moss (mountains)
    [​IMG]
     
  11. MaR0

    MaR0 Member

    Joined:
    Apr 16, 2018
    Messages:
    109
    Likes Received:
    8
    Best Answers:
    2
    does it works for 8.10 otbm version?
     
  12. Forby

    Forby Active Member

    Joined:
    Jul 24, 2011
    Messages:
    91
    Likes Received:
    168
    Best Answers:
    0
    I have only tried it on 10.98 but don't see why it wouldn't work with lower versions.
     
  13. Forby

    Forby Active Member

    Joined:
    Jul 24, 2011
    Messages:
    91
    Likes Received:
    168
    Best Answers:
    0
    Added option to enable coastline smoothing that get rids of impossible borders:

    [​IMG]
     
    Hunier and MagicWall like this.
  14. Hunier

    Hunier New Member

    Joined:
    Apr 17, 2018
    Messages:
    29
    Likes Received:
    4
    Best Answers:
    0
    I tried, but I could not use it, but I really liked the idea very well.
     
  15. elkingahmed

    elkingahmed Member

    Joined:
    May 31, 2012
    Messages:
    113
    Likes Received:
    2
    Best Answers:
    0
     
  16. Forby

    Forby Active Member

    Joined:
    Jul 24, 2011
    Messages:
    91
    Likes Received:
    168
    Best Answers:
    0
    @elkingahmed Can you do node -v to get the version of Node?
     
  17. elkingahmed

    elkingahmed Member

    Joined:
    May 31, 2012
    Messages:
    113
    Likes Received:
    2
    Best Answers:
    0
  18. Forby

    Forby Active Member

    Joined:
    Jul 24, 2011
    Messages:
    91
    Likes Received:
    168
    Best Answers:
    0
    Ok that makes sense since that version is deprecated and missing the Buffer.alloc() function. Is it possible to update to a more recent version (e.g. v8.11.1)? Node.js
     
  19. elkingahmed

    elkingahmed Member

    Joined:
    May 31, 2012
    Messages:
    113
    Likes Received:
    2
    Best Answers:
    0
    play working now but why do it make the same map ?
     
  20. Forby

    Forby Active Member

    Joined:
    Jul 24, 2011
    Messages:
    91
    Likes Received:
    168
    Best Answers:
    0
    Open OTMapGen.js and at the top you will find some configuration. Change the map seed to any integer to get a different map. You can also change the map size here. For other parameters there is no configuration right now but you will have to modify the zNoiseFunction inside the script. Feel free to play around with all numbers.

    Code (Text):
    1. // Configuration
    2. const MAP = {
    3.   "SEED": 0,
    4.   "WIDTH": 255,
    5.   "HEIGHT": 255
    6. }
     

Share This Page

Loading...