Monday, November 14, 2022

Variations

I've always planned Undiscovered Worlds to be not simply a map generator but a world generator, with - ideally - a quasi-realistic sci-fi sort of feel. At the moment it's creating maps of what are effectively alternate Earths. But I'd like to create more variety in the kinds of worlds it can create maps of.

To some extent this has already happened. When I rewrote the continent creating functions, I didn't delete the original ones. They're still in there as a possible variation, so while most worlds use the newer version, a few will still use the original. The original's not as good, but it's worth keeping for the sake of variety.

So in that spirit I've been working on expanding the range of possible worlds that UW can create.

First, worlds of different sizes are now possible. In addition to the roughly Earth-sized worlds that already exist, you can have worlds with a quarter of the surface area (roughly Mars-sized) and worlds with a sixteenth of the surface area (roughly Moon-sized). (Other sizes aren't really possible thanks to the limitations of the diamond-square technique, which I use extensively.)

With worlds of varying sizes come variations in gravity too. In fact gravity can now be anything from 0.05g to 10g. On low-gravity worlds, mountains are taller and wider, while river valleys are wider but shallower:


On high-gravity worlds, by contrast, mountains are small and river valleys are narrow but deep:


In addition to size and gravity, there are several new variables, which mostly affect the climate in various ways:


I've extensively rewritten the climate simulation (again), which really ranks up there with lakes as one of the most gruelling elements of this whole thing. The problem with climates is that there are so very many moving parts that any changes to one element can have knock-on effects with all sorts of other things. This time, I had to rewrite it so that it could handle (with sufficient plausibility, if not real accuracy) not only Earthlike conditions but a huge range of other possibilities as well. Still, I think it worked out just about OK.

The simulation can now handle quite dramatically different circumstances, which can be caused by variations in the planet's orbit. Obliquity, for example, refers to how tilted the planet's rotation is compared to the plane of its orbit around the sun. Earth's is roughly 22.5 degrees, and this is what causes our seasons, as different parts of the planet are angled towards the sun at different times of year. Relatively modest changes to obliquity can yield dramatic results. At low obliquity, there is little or no seasonal change throughout the year, which means no continental climates or subpolar regions, and you tend to get lots of rainforest, deserts, and temperate oceanic regions. At higher obliquity, the seasons get more and more dramatic. Not only that, but as the obliquity gets higher the poles get hotter, because they are spending more of their time pointing towards the sun. At the highest obliquities, the poles are actually hotter on average than the equator, though they experience huge shifts in temperature throughout the year. The equator, meanwhile, has two summers and two winters in every year.

Here's a world with high obliquity, showing permanent sea ice at the equator but not the poles!


Eccentricity, meanwhile, is how elliptical the planet's orbit is around the sun. Low eccentricity means a roughly circular orbit, while high eccentricity means a highly elliptical one like a comet. Earth has an extremely low eccentricity, which means that it is roughly the same distance from the sun all the time. But a planet with a high eccentricity would experience hotter temperatures for part of the year, as it comes close to the sun, and then colder temperatures as it swings away. Moreover, because planets in such orbits move more quickly the closer they are to the sun, the hotter part of the year would be shorter than the colder part, with this effect being more noticeable at higher eccentricities. So with high eccentricities, you get global "seasons" - but the "summer" is shorter than the "winter". To make things more confusing, the "seasonal" difference is greater at the equator than at the poles, rather than the other way around as with seasons caused by obliquity.

Things get really confusing if you raise the eccentricity and the obliquity. Depending on how high you set them, you get a world with seasons similar to our own but where one hemisphere has a short, hot summer and a long, cold winter, while the other has a short, mild winter and a long, mild summer (Mars experiences something like this, to a moderate degree). Here's a world like that:


Finally, all of these new variables are controllable by the user as well. It's now possible to create custom worlds where you specify the size of the world, the approximate proportions of land and sea, and the variables shown above. So you can create worlds with really exotic climates if you want to, or specify worlds with exactly the same variables as Earth or only slightly different, or have an ice-bound moon with an ocean below the surface.

There are still some wrinkles to iron out with all of this, and then the next plan is to create some new terrain types that might be appropriate for worlds that don't resemble Earth so closely.

4 comments:

  1. Climate sim is looking really good.

    ReplyDelete
    Replies
    1. Thank you! It's not really very accurate, but hopefully it produces results that at least look plausible most of the time.

      Delete
  2. Fantastic stuff! Have you considered parameterizing planet age, a la Civ?

    ReplyDelete
    Replies
    1. I hadn't thought of that! I suspect though that it's not really a very scientific variable - in Civ the older the planet, the more the mountains are worn down to hills - but of course in reality new mountains are always being thrust up, so it would only really make sense in the context of a world where tectonic activity has ceased.

      Delete