At a mid-to-high level, how will planets be generated in mechaenetia? I like learning by example, so I will give an example algorithm and hopefully that can guide your answer to the question.
Let’s say we want to make a planet. This particular planet is going to be an ocean archapelago type planet, since that’s the kind Gregorius T. wants to start out with.
We know the planet is conceptually a solid torus, but it is implemented as a flat world and the game engine will do some tricks so that players think they are on donut-shaped planets. So, the first step in our algorithm is to determine the size of the planet. We will need at least two measurements.
Here is a picture of a torus, which represents the planet we are making.
The two red circles are congruent and lie on the same plane, while the yellow circle runs through the center points of both red circles. The surface of the torus is formed by sweeping one of the red circles around the yellow circle.
The two measurements needed are the circumfrence of the yellow circle and the circumfrence of the red circle. Perhaps in-game dialogues will refer to planets by their diameter (of the yellow circle) and thickness (diameter of the red circle), and we can easily convert that to circumfrence by multiplying by pi. These are used to determine the width and length respectively for our “flat” map.
Gregorius T. hasn’t fully divulged information about how big these planets are supposed to be, but given the shape of the planet it is safe to assume the thickness must be substantially less than the diameter. I’m going to arbitrarily pick a planet diameter of… 24,000 km and a thickness of… 6,000 km. For reference, Earth’s diameter is around 12,000 km. This means the red circle has a circumfrence of about 18,840 km and the yellow circle has a circumfrence of about 75,360 km.
Therefore our planet is actually implemented as a flat world 75,360 km wide and 18,840 km long. Walking over the right side means walking into the left side, the far side connects to the near side, etc. There is some distortion involved but the basic concept going from flat to torus can be seen in this video. I’ve rather arbitrarily decided where the poles and equators should go on this projection of the flat world onto a 2d map:
(please ignore the compass at the bottom left of this and the next few pictures, which is clearly wrong)
Now that we have a basic shape we can move on to the second step in the algorithm, which is to define the major geologic features of the planet.
Before we can do that one has to understand the nature of a toroid planet. Normally gravity causes planets to form something like a sphere, so if the planet is a toroid some other force must be counteracting gravity. This force is the centrifugal force (actually just inertia) from the rotation of the planet. I don’t feel like crunching the numbers to see exactly how fast the planet has to rotate but this should be implemented since it’s a one-time calculation per planet, and it determines the length of a day as well as base wind speeds and tidal forces.
The same centrifugal force means that the shape of the planet is distorted a bit. Just like when tossing pizza dough, mass is pushed to the outside of the disc, or in this case the outside of the torus. Those red circles in theory should become ovals with the thin part facing the donut-hole. Perhaps more importantly, the mantle layer of the planet becomes more dense as you move further away from the donut-hole.
Now we can start on the geology with tectonic plates. I’m going with the mantle convection theory of plate tectonics, whereby differences in mantle density drive convection which drives movement of plates. More density means less movement means larger plates and therefore less rugged terrain. Based on the above, we can assume that the outside of the torus will have larger tectonic plates.
So, I break the map up into plates with larger plates near the exterior equator and smaller plates near the interior equator:
Then I give every plate a direction. Real tectonic plates don’t always have a uniform direction but I’m making a compromise here. Once I have each plate’s direction, I can determine which boundaries are convergent and which are divergent.
The next step is to determine where to put the landforms. This world type is archipelago, which means the planet is young and mostly covered by water (which is also why I used the huge contiguous plate). So I’ll put a couple medium-small continents near convergent plate boundaries, and maybe an archipelago that broke off from a continent. I’ll also add many islands along convergent plate boundaries, and a number of small island chains away from plate boundaries to account for “hotspots”.
All of the larger landmasses in the top half are rough, mountainous terrain that hasn’t had much time to weather down (think Greece). What few landmasses are in the bottom half see more sun and are thus hotter, possibly even creating a desert. Also, the poles have half a year of sun and half a year of night which means lots of ice. I won’t bother drawing a topographic map or underwater features, but this is where the algorithm determines the basic height map.
(the compass here is finally accurate)
With the height map in place the next step is to determine ocean and wind currents. To do this, divide the water into oceans with different general temperatures. Remember that the equators receive the most sun and therefore the most heat.
For the ocean currents, just create a number of loops going between adjacent cold and hot zones. Generally, cold water should move east and towards the equator while warm water should move west and towards the poles. This makes nice clockwise circles in the northern hemisphere and counterclockwise circles in the southern hemisphere, consistent with the Coriolis effect.
For wind currents, the unusual thing is that there are two equators. That means four Hadley cells, four easterlies, and four westerlies. These aren’t difficult to draw on the map though:
Knowing the wind and ocean currents means we can determine weather patterns and later trade routes. I suppose most important, we could use this information to assign each region a modifier for rainfall and humidity. Remember that physics requires this planet to rotate much faster than Earth, so there will have to be a LOT more wind.
Something I’m not entirely sure about is how to deal with ice caps, since presumably the planet is tilted with respect to the sun so there will be approximately half of the year where one of the poles has lots of sunlight. (If the planet were not tilted the interior would never get any light and thus be very very cold and dark year-round)
Now we can start looking to add flora and fauna. Unlike the Earth, our planet has no history of a Pangaea. All of the landmasses are relatively young so that there are lots of archipelagos instead of mostly large continents. Gregorius T. hasn’t specified the story behind the planet, such as whether life is native to the planet or if it was seeded by some spacefaring civilization. I am going to assume life is native to the planet and similar to life on Earth.
That means all of the continents have grasses, trees, mammals, birds, etc. But the lack of a Pangaea means that evolution on land has to be independent for far away islands. Therefore, we would not expect to find the same or even similar flora and fauna across the planet, unless they live in the ocean or are recently descended from ocean life.
I won’t bother making a separate map but you can imagine, let’s say that continent on the left only ever evolved mat bacteria and fungus/lichen. And birds/dinosaurs/megafauna are only found on the big island in the middle and the long island chain next to it, and maybe flowering plants are only available on the two big continents in the middle. Due to the winds, one expects the western side of those two continents to have tropical rainforests while the eastern side of the (volcanic) mountain ridges might be desert or steppe. As a subroutine, determining which life forms go where would be pretty complicated. But on the upside, this only has to be done once as you can store a list of native life in each region.
Now we have a planet fully set up and ready for exploration - the next step is to establish the presence of civilization (if that is wanted). I don’t know the story behind the player’s presence on the planet, so I can’t say if we should simulate the origin and development of human civilization or just plop down a colony and spaceport.
Now we have a 2-d map split up into regions each containing base data for height, temperature, rainfall, wind currents, ocean currents, flora, fauna, and civilization. You can have the server work on big-picture events and processes using this map. When the time comes to actually generate the 3d section, this data should be sufficient.