103

My map generator(rewritten in swift) produced its finest continent... after 40 minutes...

Comments
  • 12
    How does it work?
  • 10
    @Torbuntu and @AntaresStar Hey, all the code is here: https://github.com/SHLegends/...

    its a mess in there, but the path to the file is as follows:

    Viewer/RpgFrameworksViewer/MapGen_WorldGen.swift

    The Viewer Xcode project is a terminal app that lets you generate the maps and also has access to other RNG things I've been working on.

    Enjoy :)
  • 4
    That swift language has some nice features..

    Did you specifically want to do your own algo or why no perlin noise stuff?
  • 1
    @daintycode assuming I’m understanding you correctly(I just googled perlin noise), I’ve just been printing the maps out as text. I looked into turning it into bitmap but as I have no idea what I’m doing I figured I’d worry about that later. (Btw, if you have any suggestions I’d be more than glad to hear cause I’ve been at a loss as to how to map the 2d array to an image etc)

    As for writing it in swift, I agree, I’ve really enjoyed it. My generator used to be written in Python.
  • 1
    Looks like a heroes 3 map :D
  • 4
    @SHLegends
    I'm going to be completely honest, I didn't read your code in detail but it seems like you iterate over it and prettify it more and more until it looks good?

    You *could* (i mean being original about stuff like that is always appreciated) use perlin noise, which is used to create e.g. cloud-like images. But with a threshold or 2 you can use perlin noise' output to display as water, land, mountains.(:

    When it comes to generating tmages, take a look at the spec of bmp. It's just 24bit BGR values and some headers if i recall correctly.
  • 0
    @daintycode oh cool, I’ll look into that, thanks
  • 2
    I prefer blob + noise for map generation.
  • 1
    That is amazing! Does it use fractals to generate that?
  • 1
    @deusprogrammer thx, it’s just printing text to the terminal, the two dimensional array that holds the map has about a million points in it(that why it took so freaking long). I posted a link to the code above if you want to take a look
  • 1
    @SHLegends cool. I will :).
  • 1
    Love it, keep it up!
  • 1
    @Alice Could be a feature. Add "pay 20 dollars to finish generation in only 10 minutes instead!"
  • 0
    The coliseum at the top, kohlingen just below it, jidoor near the top of the long southward peninsula, zozo northeast of jidoor, and the opera house at the tip of the peninsula.
Add Comment