At this point I'm basically just plugging random numbers and functions into the formulas.
https://i.imgur.com/NTG82iO.png
https://i.imgur.com/nEzLfD3.png
https://i.imgur.com/Q1pnheC.png
I guess the next logical step is to randomize everything.

Xhin
At this point I'm basically just plugging random numbers and functions into the formulas.

I guess the next logical step is to randomize everything.

Edited March 19th
by Xhin

Randomized the parameters of the function. This is creating all kinds of crazy stuff now:
https://i.imgur.com/UNwnOLO.png
https://i.imgur.com/9kiqHEX.png
https://i.imgur.com/EFIZF0a.png
https://i.imgur.com/4uLxuG4.png

Xhin
Randomized the parameters of the function. This is creating all kinds of crazy stuff now:

Posted March 19th
by Xhin

Well, I've achieved my goal. I have absolutely no idea what to expect from the terrain generation now.
https://i.imgur.com/oFLyRaT.png
https://i.imgur.com/bi3s1iH.png
https://i.imgur.com/IMCZP2z.png
https://i.imgur.com/Viwuxfn.png
https://i.imgur.com/npO9LBb.png
https://i.imgur.com/bIOpMOm.png
https://i.imgur.com/cnG2gs7.png
https://i.imgur.com/0WXW951.png
https://i.imgur.com/2wJQvWc.png
https://i.imgur.com/FDlFb0K.png
https://i.imgur.com/1MQ8ar7.png
https://i.imgur.com/ByBHybJ.png
https://i.imgur.com/qtpdITR.png

Xhin
Well, I've achieved my goal. I have absolutely no idea what to expect from the terrain generation now.

Edited March 19th
by Xhin

I can just barely make out the expression on the bottom of the pictures. Can you explain in some detail what determines the color of each cell?

EN
I can just barely make out the expression on the bottom of the pictures. Can you explain in some detail what determines the color of each cell?

I'll try to explain how the generation is done in the bottom three replies, since that does seem to be the most interesting and varied algorithm at the moment (though I'm working on the other ones too sooo)
!!=yellow Palettes
Each "dimension" is assigned 3 colors, or sometimes it gets 5-7 or 4 grayscale colors. Whatever amount of colors it has forms the dimension's "palette".
You'll also occasionally get colors outside the pallette -- these correspond to things you interact with in-game.
!!=cyan RNG Seeding
I have a function that I'll call the "seeding function" from now on. You pass it a list of numbers and it does this:
** Start with the "universe seed" (some number from 1-99999999, or some other large amount of digits, I forget what).
** For each number in the list, multiply it by a unique number (right now I'm just using 7,11,13,9,19,23) , and then add this to the seed.
** Take this number, raise it to the seventh power.
** Modulo this by 19650218.
** Seed the mersenne twister with this number.
!!=ruby Basic terrain generation
Each cell has an X and Y coordinate, as well as a "dimension number". These get passed in a list to the seed function. Then some random numbers are generated to tell which color is generated in the cell.
This gives you some basic terrain:
https://i.imgur.com/iDSCvcE.png
As you move around, more cells get rendered. Despite how complex the code has gotten and despite the twister being reseeded 441 times per screen, this generation is extremely fast and I've been able to build some tools to zoom around each dimension without any lag whatsoever.
!!=sapphire More interesting terrain
** Pick a number of times to pick a variable -- right now I've got this set to between 5-7 times.
** A variable can be X, Y, X+Y, X-Y, any of those four things modulo a number from 10-100, or a number from 1-30.
** Each variable has an "effect mix" which is somewhere between 50-100% (it favors 100%). An effect mix just makes the cool generation happen that much of the time, and the really random (in the pic above) generation happen the rest of the time. It adds a bit of noise to the generation.
** If the variable is X, Y, X+Y, X-Y or one of those modulo something (like X%75), the variable is based on the X and Y coordinate of the cell.
** These numeric variables (and their effect percentages) go into a different function:
!!=gold Sculpting function
** The sculpting function takes each number in the list in turn and turns it into a "size" variable. It then modulos the x and y coordinate by size*2, and if that modulo is bigger than the size variable, it stops the loop. If it doesn't stop the loop, it plugs the size variable into the next stage of the sculpting function. So depending on the x/y coordinate you get some variable amount of sculpting.
** The next stage takes each size variable, and does the seeding function on the dimension and (x/size)*(y/size). Basically it takes the random generation and scales it up, assigning size number of cells to each cell in the original generation.
** After all of this is done, there are some secondary effects, like generating "rocks" some random number of cells (sometimes big, sometimes tiny). With the blown up cells you end up getting "pipes" when the colors don't match up.
Since the "size" here is variable, sometimes depends on the x and y themselves, and happens a variable number of times, the generation can vary a lot depending on what those original 5-7 variables are. I guess tl;dr I have no idea how it works either.
Here's some more interesting things I've found:
https://i.imgur.com/zjQkFwi.png
https://i.imgur.com/xW5zjkv.png
https://i.imgur.com/F6Qi7Ex.png
https://i.imgur.com/aVqidLF.png
https://i.imgur.com/ZKUMIlT.png
https://i.imgur.com/9h4zvHP.png
https://i.imgur.com/Mtp4JvN.png
https://i.imgur.com/duaDp35.png
https://i.imgur.com/euusIWR.png
https://i.imgur.com/1gSRhmi.png
https://i.imgur.com/S5pp6v2.png
https://i.imgur.com/ysJvjRX.png
https://i.imgur.com/JWwwy8y.png
https://i.imgur.com/gzo0kmG.png
https://i.imgur.com/1ihCfzn.png
https://i.imgur.com/xXoU0XE.png

Xhin
I'll try to explain how the generation is done in the bottom three replies, since that does seem to be the most interesting and varied algorithm at the moment (though I'm working on the other ones too sooo)

Palettes
Each "dimension" is assigned 3 colors, or sometimes it gets 5-7 or 4 grayscale colors. Whatever amount of colors it has forms the dimension's "palette".

You'll also occasionally get colors outside the pallette -- these correspond to things you interact with in-game.

RNG Seeding
I have a function that I'll call the "seeding function" from now on. You pass it a list of numbers and it does this:

Start with the "universe seed" (some number from 1-99999999, or some other large amount of digits, I forget what).

For each number in the list, multiply it by a unique number (right now I'm just using 7,11,13,9,19,23) , and then add this to the seed.

Take this number, raise it to the seventh power.

Modulo this by 19650218.

Seed the mersenne twister with this number.

Basic terrain generation

Each cell has an X and Y coordinate, as well as a "dimension number". These get passed in a list to the seed function. Then some random numbers are generated to tell which color is generated in the cell.

This gives you some basic terrain:

As you move around, more cells get rendered. Despite how complex the code has gotten and despite the twister being reseeded 441 times per screen, this generation is extremely fast and I've been able to build some tools to zoom around each dimension without any lag whatsoever.

More interesting terrain

Pick a number of times to pick a variable -- right now I've got this set to between 5-7 times.

A variable can be X, Y, X+Y, X-Y, any of those four things modulo a number from 10-100, or a number from 1-30.

Each variable has an "effect mix" which is somewhere between 50-100% (it favors 100%). An effect mix just makes the cool generation happen that much of the time, and the really random (in the pic above) generation happen the rest of the time. It adds a bit of noise to the generation.

If the variable is X, Y, X+Y, X-Y or one of those modulo something (like X%75), the variable is based on the X and Y coordinate of the cell.

These numeric variables (and their effect percentages) go into a different function:

Sculpting function

The sculpting function takes each number in the list in turn and turns it into a "size" variable. It then modulos the x and y coordinate by size*2, and if that modulo is bigger than the size variable, it stops the loop. If it doesn't stop the loop, it plugs the size variable into the next stage of the sculpting function. So depending on the x/y coordinate you get some variable amount of sculpting.

The next stage takes each size variable, and does the seeding function on the dimension and (x/size)*(y/size). Basically it takes the random generation and scales it up, assigning size number of cells to each cell in the original generation.

After all of this is done, there are some secondary effects, like generating "rocks" some random number of cells (sometimes big, sometimes tiny). With the blown up cells you end up getting "pipes" when the colors don't match up.

Since the "size" here is variable, sometimes depends on the x and y themselves, and happens a variable number of times, the generation can vary a lot depending on what those original 5-7 variables are. I guess tl;dr I have no idea how it works either.

Here's some more interesting things I've found:

Posted March 21st
by Xhin

Panorama shot because this place is just cool:
https://i.imgur.com/B05awla.png

Xhin
Panorama shot because this place is just cool:

Posted March 21st
by Xhin

I am very interested in terrain generation but I have no idea how what you’re showing here works. It looks cool, though. But I wish I could figure out how to use it or learn from it to make my own cool-looking stuff.

chiarizio
I am very interested in terrain generation but I have no idea how what you’re showing here works. It looks cool, though. But I wish I could figure out how to use it or learn from it to make my own cool-looking stuff.

Posted April 16th
by chiarizio

@chiarizio:
If you're trying to do something conworlds-based, you might be interested in this portfolio project I finished up recently:
http://gtx0.com/map/
Help files:
http://gtx0.com/j/mapgame/
Uses a very different set of algorithms, which are explained in some detail in these files:
http://gtx0.com/j/mapgame/continent-sculpting
http://gtx0.com/j/mapgame/terrain-generation-ratios

Xhin
@chiarizio:

If you're trying to do something conworlds-based, you might be interested in this portfolio project I finished up recently:

http://gtx0.com/map/
Help files:

http://gtx0.com/j/mapgame/
Uses a very different set of algorithms, which are explained in some detail in these files:

http://gtx0.com/j/mapgame/continent-sculpting
http://gtx0.com/j/mapgame/terrain-generation-ratios
Posted April 16th
by Xhin

Thanks, @Xhin: !
I’ll look into them.

chiarizio
Thanks, @Xhin: !

I’ll look into them.

Posted April 16th
by chiarizio

I tried it out several times. Not sure yet.

chiarizio
I tried it out several times. Not sure yet.

Posted April 17th
by chiarizio

@Xhin:
I can’t figure out what some of the parameters do; in particular “island spread” and the parameters before it.
There are other cases where I think I get a handle on each of two parameters individually, but then can’t figure out how they interact.

chiarizio
@Xhin:

I can’t figure out what some of the parameters do; in particular “island spread” and the parameters before it.

There are other cases where I think I get a handle on each of two parameters individually, but then can’t figure out how they interact.

Posted April 22nd
by chiarizio