Everyone knows today's planets are full of problems when they're very big at all. Personally, I find them rather disappointing, although I still consider the dodecahedron a great idea. It was definitely on the right track. The problem is, to make the planets very big at all requires a large amount of data storage and puts a load on clients. The biggest planet I've seen was between 400 and 500 radius. The weird thing is, ships sitting next to that planet still make the planet feel small. It got me to thinking about planets... and I actually came up with an idea to make them big without blowing things completely apart.
There are multiple parts to this: 1) Different loading mechanics 2) improved saving mechanics 3) Modified rendering. I understand this is difficult to implement and would require large changes to the game engine, but it's something to chew on. If Schine ever wants to have good quality planets, this is one way to do it.
Loading Mechanics.
Current loading mechanics use the same algorithm as stations, ships, etc. That's simple and uniform, but it's not a permanent solution because it requires planets to be small.
When you're far above the planet, you don't need to see the surface. It's just a waste of graphics memory and rendering power. Don't load the surface. When you begin descending into the atmosphere, the game will check the closest segment and the server will start loading it, but not all of it. If you load all of a segment into memory, it will limit the size of segments. Take a page from Minecraft's book and only load nearby chunks into client and server. This should also allow planet segments to be very deep.
Weapons fire entering the atmosphere? Loading blocks for every shot would overload CPUs in no time, so display a little fire or explosion effect on the surface texture, then queue up the shots. When the CPU has enough time, load the part of the ground to be hit and register hits in an area. Doing it instantly isn't necessary when the blocks aren't loaded.
Saving
Whoa dude! That's a lot of data. To keep server databases from breaking 1TB in the first week, only save parts of a planet that are modified. And by modified I mean the player added a block. Who wants to save a big hole in the ground? Let's just say planets have a sentient or vaguely conscious life force that repairs stuff unless humans exercise their dominion by building there... or something. Come on! This is science fantasy already with all these funny named rocks.
There should also be a server tool that allows owners to check for and delete planet chunks that do not contain non-natural block types. Someone could place a few rocks or something and save several chunks that aren't needed. If database size becomes a concern, these could be found and deleted. Got a big flowerbed or grove of trees? Consider adding decorative lighting or bury hull blocks around for insurance.
Rendering
So, looking at the core from orbit turns out to be really ugly, and we've quit loading the whole segment and made segments so large that even the beefiest computers couldn't render the whole thing anyway...
So now get rid of the core texture for the time being. Replace it with a dynamic texture that resembles the surface. To create the texture, take a top down view of all the saved chunks, pick a random block from each chunk to be a pixel, and fill in the rest by testing what sorts of blocks might generate there. Not the best, but it's fast and cities would still show up.
Now how about we dig down through a segment and see what happens? Hey, it's hot down here. Why not just render a lava block texture tiled across the bottom of the segment? If it's easy to confuse with actual lava, change it to a darker color. This would feel more natural and in sync with the universe. We don't need this funny shimmery stuff.
End Result
It's now practical to have planets kilometers wide. We still have seams, but I'll think it over and post an endnote if I can actually wrap my noodle around a good way to do away with that.
Afterthought that took over the thread: Seamless Planet Surface
EDIT: I had some good ideas, but it turns out that (as far as I can tell) all flat maps that map to spheres have one or more of the following traits:
There are multiple parts to this: 1) Different loading mechanics 2) improved saving mechanics 3) Modified rendering. I understand this is difficult to implement and would require large changes to the game engine, but it's something to chew on. If Schine ever wants to have good quality planets, this is one way to do it.
Loading Mechanics.
Current loading mechanics use the same algorithm as stations, ships, etc. That's simple and uniform, but it's not a permanent solution because it requires planets to be small.
When you're far above the planet, you don't need to see the surface. It's just a waste of graphics memory and rendering power. Don't load the surface. When you begin descending into the atmosphere, the game will check the closest segment and the server will start loading it, but not all of it. If you load all of a segment into memory, it will limit the size of segments. Take a page from Minecraft's book and only load nearby chunks into client and server. This should also allow planet segments to be very deep.
Weapons fire entering the atmosphere? Loading blocks for every shot would overload CPUs in no time, so display a little fire or explosion effect on the surface texture, then queue up the shots. When the CPU has enough time, load the part of the ground to be hit and register hits in an area. Doing it instantly isn't necessary when the blocks aren't loaded.
Saving
Whoa dude! That's a lot of data. To keep server databases from breaking 1TB in the first week, only save parts of a planet that are modified. And by modified I mean the player added a block. Who wants to save a big hole in the ground? Let's just say planets have a sentient or vaguely conscious life force that repairs stuff unless humans exercise their dominion by building there... or something. Come on! This is science fantasy already with all these funny named rocks.
There should also be a server tool that allows owners to check for and delete planet chunks that do not contain non-natural block types. Someone could place a few rocks or something and save several chunks that aren't needed. If database size becomes a concern, these could be found and deleted. Got a big flowerbed or grove of trees? Consider adding decorative lighting or bury hull blocks around for insurance.
Rendering
So, looking at the core from orbit turns out to be really ugly, and we've quit loading the whole segment and made segments so large that even the beefiest computers couldn't render the whole thing anyway...
So now get rid of the core texture for the time being. Replace it with a dynamic texture that resembles the surface. To create the texture, take a top down view of all the saved chunks, pick a random block from each chunk to be a pixel, and fill in the rest by testing what sorts of blocks might generate there. Not the best, but it's fast and cities would still show up.
Now how about we dig down through a segment and see what happens? Hey, it's hot down here. Why not just render a lava block texture tiled across the bottom of the segment? If it's easy to confuse with actual lava, change it to a darker color. This would feel more natural and in sync with the universe. We don't need this funny shimmery stuff.
End Result
It's now practical to have planets kilometers wide. We still have seams, but I'll think it over and post an endnote if I can actually wrap my noodle around a good way to do away with that.
Afterthought that took over the thread: Seamless Planet Surface
EDIT: I had some good ideas, but it turns out that (as far as I can tell) all flat maps that map to spheres have one or more of the following traits:
- Doesn't act like a sphere. Square maps act like a torus. My parallelogram map idea acts... weird.
- Bent blocks, because the angles at the edges of segments don't add up to 360 degrees
- Double vision. The angle addition problem is repaired, but multiple copies of the same thing at different angles end up getting loaded in different directions when you approach certain parts of the map.
Last edited: