World Generation
Posted: Fri Dec 29, 2017 7:47 am
So, first off I'm sure you guys have a lot of this thought out already. But I'm just going to layout how I would set up the world generation for a game like SotE. And, one thing to remember, this is coming from someone who has zero coding experience or knowledge, so don't be afraid to shoot some of these ideas down because they are difficult or impossible to code, or just not worth simulating. I'm hoping that this can start some good conversation on the development of the game!
Ok, so first, for simplicity's sake we need to set out some constants and limits. Some of these can be represented in game, others are just things that we assume are there and don't need to even be represented in code at all.
So, the world which this simulation will take place on should always have a 24 hour earthlike day. This just gives us a base measuring point for time. I don't think a year, or one orbit of this planets star, should be identical to Earth, I think it should be able to vary some. Something between 100 and 600 days per year, and that number can be chosen randomly. The planet should be earthlike in both composition and atmosphere. This keeps the game simple and doesn't need to be represented in game, just something that you should know. The size of the planet depends on game performance obviously. I am not sure on any technical aspects of the simulation, but I think there should be some variation in planet size during world gen. This would obviously help provide a nice randomization factor.
This is kind of a sidetrack. What is the gameplay area going to look like? Is it going to be a flat projection like EU4? Or a sphere, similar to Rimworld's world? I'm going to assume a sphere, because I feel like I read that somewhere. So that is how I'll base the rest of my explanation.
Anyway, back to the world. For another simplicity option, let's just assume that the planet orbits a sunlike star and is in the relative middle of its habitable zone, like Earth. These aren't things that need to be represented at all, just things that are known by the devs. Next thing would be to give it a pole, some tilt, and a wobble. This will help to determine how seasons and climate work on the planet. I think an angle for the tilt of the pole should be anywhere between 0 and 30-45 degrees (Earth is at roughly 23 degrees). This combined with a wobble will determine the severity and length of seasons.
The angle of the polar tilt determines your base climate zones and seasons. If you have zero tilt, you have a static planet that has no seasons and temperature generally gets colder as you move away from the equator. If you have a 10 degree tilt, you have a colder part of the year and a warmer part of the year. The more angle you add, the more noticeable it gets. If we go all the way up to 45 degrees we would get winters that are much colder, and darker, than the summers.
The next thing to add would be a wobble to the polar tilt. This would provide a change in seasons. So, for example, Earth has a wobble in its polar axis that takes something like 44000 years to complete one wobble. For this, lets set that as zero change in season. So, this would mean that your seasons would never change over the course of an entire game, which I assume would be at least a couple thousand years on average. Now, lets say that we want to have a planet that, if it had no wobble, has a 20 degree polar tilt. Now lets add a wobble that takes 200 years to complete, and moves 15 degrees in each direction from the polar tilt. So, instead of just staying at 20 degrees, every 100 years it would change between 5 degrees and 35 degrees. Which would cause seasons to change in severity, which I think would be an interesting mechanic. This is a mechanic that might be too hard to implement. Or could possibly be implemented in a later version of the game. For now, you might just want to randomize the polar tilt in order to provide some variation in seasons.
So now that we have a sphere, that is tilted on an axis and is orbiting a star, we can add detail to its surface. The first thing we would probably need to do is create tectonic plates and oceanic ridges. (This is where I think my ideas will start to get less realistic, and someone else may very well have a much better plan.) I have no idea if it is possible or not code wise, but my first thought would be to just randomly shatter the planet into large groups of tiles. Then you add the directions of the very slow movement. Not sure how the program should decide what direction a plate moves, that is something I'll have to think more on. The next thing you would need to do is randomize a highest point and a sea level. (At this point, you would need to randomly generate a heightmap of some sort, not sure on what to do here either.) Obviously anything below the sea level doesn't need to have much more detail since it is underwater and during the course of a game that would not change. Anything between the highest point and sea level becomes land. Then you have the program pull up the tectonic plates and see where any plates meet that are on land. The code, not sure how you would do this, then determines the type of plate boundary. You have convergent, where one plate goes under another. Divergent, where two plates move away from each other. Transform, where two plates move parallel to each other. Mountains and volcanoes tend to form near convergent boundaries, so this would provide the program with where its highest points should be. Or, if a convergent boundary is below sea level, you would have islands. Divergent are where your oceanic ridges and rift valleys form. If it is below sea level it would be an oceanic ridge. Now, I'm not sure what impact these ridges have, other than just showing us where two plates move away from each other. So documenting these, and really anything underwater, for players to see isn't probably necessary. Transform boundaries, don't really do much for land generation, so they probably don't have any real application during world gen.
This is a pretty good article for Plate Tectonics.
http://csmgeo.csm.jmu.edu/geollab/vageo ... lates.html
So, at this point I hope anyone reading this is still staying on track and I haven't lost everyone. I'm going to keep going with things I think are important to finishing the generation of the world, but I just want to state that if anyone thinks this is too detailed, or not able to be coded I apologize.
Anyway, the next thing this planet needs is some sort of basic weather system to help determine general climate zones. First thing to help with this would be some sort of prevailing wind setup. Now, considering we don't have any other real planetary weather system to judge, I think we should just keep with Earths basic wind direction system. At this point this planet's tropics will be determined. Each line of tropic is determined by the polar tilt of the planet. Let's take Earth for example, with Earth's 23 degree polar tilt the tropics go to 23 degrees north and south of the equator. So at this point we add the prevailing winds. North and south of the tropics you have winds that prevail to east from the west. From the tropics to the equator you have the opposite and flowing towards the equator. This ends up giving basic ideas for where plains, deserts and other climate zones will end up being.
At this point, I need to start doing a bit more research on climate zones and how they develop. That will probably be another big post in this topic. Anyways, I'm hoping this gets some good conversations going and helps you guys with the coding. I wish I had any knowledge of coding so that I could help get this going.
Ok, so first, for simplicity's sake we need to set out some constants and limits. Some of these can be represented in game, others are just things that we assume are there and don't need to even be represented in code at all.
So, the world which this simulation will take place on should always have a 24 hour earthlike day. This just gives us a base measuring point for time. I don't think a year, or one orbit of this planets star, should be identical to Earth, I think it should be able to vary some. Something between 100 and 600 days per year, and that number can be chosen randomly. The planet should be earthlike in both composition and atmosphere. This keeps the game simple and doesn't need to be represented in game, just something that you should know. The size of the planet depends on game performance obviously. I am not sure on any technical aspects of the simulation, but I think there should be some variation in planet size during world gen. This would obviously help provide a nice randomization factor.
This is kind of a sidetrack. What is the gameplay area going to look like? Is it going to be a flat projection like EU4? Or a sphere, similar to Rimworld's world? I'm going to assume a sphere, because I feel like I read that somewhere. So that is how I'll base the rest of my explanation.
Anyway, back to the world. For another simplicity option, let's just assume that the planet orbits a sunlike star and is in the relative middle of its habitable zone, like Earth. These aren't things that need to be represented at all, just things that are known by the devs. Next thing would be to give it a pole, some tilt, and a wobble. This will help to determine how seasons and climate work on the planet. I think an angle for the tilt of the pole should be anywhere between 0 and 30-45 degrees (Earth is at roughly 23 degrees). This combined with a wobble will determine the severity and length of seasons.
The angle of the polar tilt determines your base climate zones and seasons. If you have zero tilt, you have a static planet that has no seasons and temperature generally gets colder as you move away from the equator. If you have a 10 degree tilt, you have a colder part of the year and a warmer part of the year. The more angle you add, the more noticeable it gets. If we go all the way up to 45 degrees we would get winters that are much colder, and darker, than the summers.
The next thing to add would be a wobble to the polar tilt. This would provide a change in seasons. So, for example, Earth has a wobble in its polar axis that takes something like 44000 years to complete one wobble. For this, lets set that as zero change in season. So, this would mean that your seasons would never change over the course of an entire game, which I assume would be at least a couple thousand years on average. Now, lets say that we want to have a planet that, if it had no wobble, has a 20 degree polar tilt. Now lets add a wobble that takes 200 years to complete, and moves 15 degrees in each direction from the polar tilt. So, instead of just staying at 20 degrees, every 100 years it would change between 5 degrees and 35 degrees. Which would cause seasons to change in severity, which I think would be an interesting mechanic. This is a mechanic that might be too hard to implement. Or could possibly be implemented in a later version of the game. For now, you might just want to randomize the polar tilt in order to provide some variation in seasons.
So now that we have a sphere, that is tilted on an axis and is orbiting a star, we can add detail to its surface. The first thing we would probably need to do is create tectonic plates and oceanic ridges. (This is where I think my ideas will start to get less realistic, and someone else may very well have a much better plan.) I have no idea if it is possible or not code wise, but my first thought would be to just randomly shatter the planet into large groups of tiles. Then you add the directions of the very slow movement. Not sure how the program should decide what direction a plate moves, that is something I'll have to think more on. The next thing you would need to do is randomize a highest point and a sea level. (At this point, you would need to randomly generate a heightmap of some sort, not sure on what to do here either.) Obviously anything below the sea level doesn't need to have much more detail since it is underwater and during the course of a game that would not change. Anything between the highest point and sea level becomes land. Then you have the program pull up the tectonic plates and see where any plates meet that are on land. The code, not sure how you would do this, then determines the type of plate boundary. You have convergent, where one plate goes under another. Divergent, where two plates move away from each other. Transform, where two plates move parallel to each other. Mountains and volcanoes tend to form near convergent boundaries, so this would provide the program with where its highest points should be. Or, if a convergent boundary is below sea level, you would have islands. Divergent are where your oceanic ridges and rift valleys form. If it is below sea level it would be an oceanic ridge. Now, I'm not sure what impact these ridges have, other than just showing us where two plates move away from each other. So documenting these, and really anything underwater, for players to see isn't probably necessary. Transform boundaries, don't really do much for land generation, so they probably don't have any real application during world gen.
This is a pretty good article for Plate Tectonics.
http://csmgeo.csm.jmu.edu/geollab/vageo ... lates.html
So, at this point I hope anyone reading this is still staying on track and I haven't lost everyone. I'm going to keep going with things I think are important to finishing the generation of the world, but I just want to state that if anyone thinks this is too detailed, or not able to be coded I apologize.
Anyway, the next thing this planet needs is some sort of basic weather system to help determine general climate zones. First thing to help with this would be some sort of prevailing wind setup. Now, considering we don't have any other real planetary weather system to judge, I think we should just keep with Earths basic wind direction system. At this point this planet's tropics will be determined. Each line of tropic is determined by the polar tilt of the planet. Let's take Earth for example, with Earth's 23 degree polar tilt the tropics go to 23 degrees north and south of the equator. So at this point we add the prevailing winds. North and south of the tropics you have winds that prevail to east from the west. From the tropics to the equator you have the opposite and flowing towards the equator. This ends up giving basic ideas for where plains, deserts and other climate zones will end up being.
At this point, I need to start doing a bit more research on climate zones and how they develop. That will probably be another big post in this topic. Anyways, I'm hoping this gets some good conversations going and helps you guys with the coding. I wish I had any knowledge of coding so that I could help get this going.