World Generation

overdhose

Active Member
Contributor
Design
World
GUI
Cervator edit: Added header, merged two threads (might read a little funny on the first page) moved to Incubator

Name: World Generation
Summary: Next-gen world generation prototype using fancy tech like polygon-based island shaping etc. Also world shape. Out of scope: Individual generators below the Biome level
Scope: Engine? But certainly moddable / maybe game mode selection impact
Current Goal: Tinker with prototyping
Phase: Inception / Design
Curator: Multiple potential tinkerers - glasz, overdhose, dacresni ...
Related: #185, #233, possibly assorted forum threads (merged a couple)

[the world is flat] and infinite.

I have been looking at the polygon based map generation a bit, and was thinking about this :

what if we would make the world round? Still big, but have east/south, North/west touch at some point. Then based on that, start dividing, like 71% water, 21% landmass. randomly determine how many islands / continents we want in the world, like lets say between 150-400 islands, and between 5-9 continents.

You could then generate some random points to determine where the islands and continents would be located, using Lloyd relaxation. Some calculating of how much land mass goes to islands and how much goes to the continents, randomizing the sizes of those, you could determine a set of variable length vectors around 1 point to set a general outline of the island / continent, add some noise, and generate a general world map. This we could subdivide in seperate square maps again, and using using the map generation to add height, humidity, lakes, rivers and biomes as explained. You wouldn't have to make them all islands, as you would already know which sides are ocean or landmass. All you'd have to do at some point is start calculating the chuncks and the world would actually have a bit more of a structure to it. You could actually include a world creation menu where you set the parameters yourself, like if you wanted a world with no continents and all islands, or an archipelago like in civ maps etc. And even decide if you want to spawn on an island or a continent. It would also lend itself to determine the temperature and create poles. Personally, I like the idea. and even if you don't wonna make the world round, you could still use the same principle, puzzling different world maps together with diffrent settings, each time leaving water between them.
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps

woodspeople

Member
Contributor
Design
You could also do this as a fudge to start with. If the player never actually flies up they can't tell whether the world is flat or spherical or a giant disc held up by four elephants standing on a turtle. All you'd have to do is recycle the blocks when you got to the end, and the world would "be" round. It might be a way to get an interesting finite world (which I think would be VERY fun to play in, infinity gets tedious) within an infinite world generation system. ?
 

Immortius

Lead Software Architect
Contributor
Architecture
GUI
I'm pretty sure we'ld fudge it regardless - making the world actually round while using blocks is not something I'ld be inclined to do. Well, not again anyway. It unavoidably warps blocks in an unsettling manner.

The tricky bit is dealing with the implications, which will be pretty core to the engine. Especially the maths - suddenly there is not just a single straight line between two points, but a lot of them. And the shortest distance may be to wrap around the world. The physics will all need to work along the border, despite things having coordinates on opposite ends of the number line. And so forth.

My personal inclination is a finite world (a so called "infinite" work is generally finite anyway), taking advantage of some of the more interesting generation techniques this allows. And perhaps making a lot more use of the vertical axis. But I don't mind having a looped world.
 

overdhose

Active Member
Contributor
Design
World
GUI
hmmmm
It unavoidably warps blocks in an unsettling manner.
could you give me a bit more detail of what you mean by it? If you would start from scratch and actually create something with this as a general idea and build world generation up from it, would it still create problems?
 

Immortius

Lead Software Architect
Contributor
Architecture
GUI
There is a very basic demo I created here of a spherical voxel world: http://home.netspeed.com.au/p.brooker/G ... eoMod.html

This was created by having 6 "sides" of blocks, each 128x128x? (maybe 32 deep?), arranging them as a cube and then pushing them out to form a sphere. The most obvious warping is towards the corners, as the cubes becomes diamond-shaped, but even if that was avoided (by, say, a ring world), there is still some warping from the tops of blocks being a different size to the bottom. For a convex world the blocks become larger the further from the center you go, and for a concave world the blocks get smaller. For a large enough world this difference would probably be minimal, and perhaps by tessellating enough sheets you could minimize the horizontal warping. But really there is no point, it is much simpler just to fake it unless space travel is going to be involved or something.
 

overdhose

Active Member
Contributor
Design
World
GUI
ach ok... but have you ever played packman? I was more thinking of a rounded world in that way, not in the sense of actually making it a sphere...
 

overdhose

Active Member
Contributor
Design
World
GUI
Well if you look at the issues there is a proof of concept there about island generation, generating height and rivers, humidity and the resulting biomes it creates due to elevation / humidity. It's a good place to start and quite well explained, better then I ever could. puzzling with it myself atm.

I'm still at the start phase, creating a cloud of points and optimizing it. But if you wonna hear my idea :

I want to create a basic world layout first, filled with water and add a couple points labeled continent and island. Then I was thinking of dividing that world in about 30% landmass by adding points along vectors around the main points, and assign some biome data (and elevation) to those points. depending on the biome you color them differently and that way you could say every pixel becomes a chunck and the voronoi color determines it's biome type. Then add some noise and be done with that step.
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Glasz is also working in that area - https://github.com/MovingBlocks/Terasology/issues/233 :)

Prototypes and algorithm tinker all day long as you see fit. The eventual system we need for the world needs to support a few different scenarios:

1) Good old fashioned infinite world. This would likely generate a larger world map in "super chunks" that might span multiple kilometers and use the polygon-based approach to define islands, continents, and seas in that area. Then apply secondary generators to prepare rivers, roads, mountain chains, and other large scale constructs. Finally generate chunks based on that overall design and place small things like trees and flowers

2a) Finite world. Like #1, but able to selectively assign climate bands to arrive at a more realistic world, with everything on the "world map" pre-generated. For starting simplicity maybe this one is still flat but ends. Might need to take performance (can you pre-generate the whole world? What if the user wants a really large world?) / game version updates (can you re-seed new blocks into the world?) into account

2b) Finite looped world. Figuring out how we can then connect the sides (and top/bottom). Maybe a torus.

3) Mod support for determining how the world generation features would be made moddable

For starters I'd just try to generate an image file with a world map, akin to the prototypes linked elsewhere.
 

eleazzaar

Member
Contributor
Art
Immortius said:
...But really there is no point, it is much simpler just to fake it unless space travel is going to be involved or something.
I agree, trying to make a spherical voxel world has few upsides, and some significant downsides.

There's no particular reason that a Terasology world should be shaped in the form of earth anyway.

Ringworlds are very cool, though possibly processor intensive-- even if the far side that you can see in the sky is just a "map" texture curving around. An extremely long and thin finite world might be odd to work with --or it might be nice, in that it helps you get your bearings.

"Pac-man" style finite worlds are probably simpler. The east edge would lead to the west edge (and visa versa).
The north edge could lead to the south-- or if you want sorta simulate a globe, the north and south edges of the map could be blocked by impassible glaciers and/or fatally cold featureless ice fields.
 

Immortius

Lead Software Architect
Contributor
Architecture
GUI
Actually, a clever way of handling north/south is to link it to the same edge, but half way around the world. That is, if you walk off of the north edge, you end up heading south on the other side of the world.
 

eleazzaar

Member
Contributor
Art
Immortius said:
Actually, a clever way of handling north/south is to link it to the same edge, but half way around the world. That is, if you walk off of the north edge, you end up heading south on the other side of the world.
Sounds, clever, but remember, this is a bit more complicated than pac-man where when you hit the edge, you teleport somewhere else-- the map grid needs to lay down flat next to each other at the edges without any wrinkles or oddities.

In this case, if i'm visualizing things right-- to make that plan work, crossing the N or S edge of the map would take you to a map where E and W were switched relative to the player's movement. Yeah, that's what happens when you cross the pole on a globe, but this is not a globe. I'm not sure how much problems that oddity would cause. Compasses might be weird.
 

overdhose

Active Member
Contributor
Design
World
GUI
that's why the overworld map would get generated first, setting the layout of the entire world, to prevent that, without actually generating the blocks in it.
 

eleazzaar

Member
Contributor
Art
overdhose said:
that's why the overworld map would get generated first, setting the layout of the entire world, to prevent that, without actually generating the blocks in it.
What is this a response to? I don't see how it applies to the last few posts.
 

overdhose

Active Member
Contributor
Design
World
GUI
hmmm?
it was a reply to :
the map grid needs to lay down flat next to each other at the edges without any wrinkles or oddities.
that was the discussion I started, creating a round world map and then generate chuncks based on the general map.
And that was how I wanted to prevent the edges from not matching each other in the case of a finite round world.
 

ironchefpython

Member
Contributor
Architecture
the map grid needs to lay down flat next to each other at the edges without any wrinkles or oddities.
That's why if you want a world that is round, you're best off sticking with a world that is topologically flat, as I alluded to in my ringworld analogy.

A sphere is simply impossible to do for a regular voxel world. If you want to store the underlying topology as high resolution curves, and resample as your axes precess, it' might be possible, but most player-created structures would degrade to unrecognizability with small changes in the bias angle creating gross sampling artifacts with no obvious mechanism for anti-aliasing.

If you build a house, go to the north pole, turn 170 degrees, travel half the distance back to your house, turn 20 degrees, and travel back to your house, it will now have shifted 10 degrees from it's original orientation. Imagine trying to build a house laid out at a 10 degree angle from square in a voxel world

Here are some alternate shapes to consider.

- A single-sided world with an impenetrable floor (self explanatory)

- A double-sided world with a constant gravity gradient (digging through the world would allow you to reach the nether side, and you would fall out of the world into infinity (or the back of the turtle) unless you could fly. Flying would allow you to explore the obverse side of the world.

- A double-sided world with a variable/reversed gravity gradient (digging through the world would slowly reduce your weight, you'd be weightless in the center, and digging "up" into the obverse side of the world would take you to a separate landscape.

These shapes can have one set of edges joined in the shape of a ring, or a Möbius strip. Alternatively, both sets of edges can be joined together in a torus or Möbius (single-sided) torus.
 
Top