First, I want to say hello to who ever is reading this
My name is Simon and I’m studying computer science. On top of that I have nothing better to do in my spare time than to work on a game (that will probably never be finished). But enough babbling about me. I plan on using this blog to post status updates about this game and to pass on my knowledge failures to others, so they can profit from this as well.
The Game
I will explain the details about what this game is going to be in another article, but for now it’s enough to think of a remake of the great Homeworld series, with influences from other strategy games as well (mostly World in Conflict). However the big difference to what has been done already is that this game will feature at least one realistically sized planetary system. In contrast to (great) games like Eve: Online or the X-Series, there will not be small sectors, but one gigantic system that can be freely explored. However this wouldn’t be fun if the game would obey all physical rules. For example, even when traveling at the speed of light, it would at least several minutes to some hours to reach another planet in the same planetary system, thus there will be no speed of light cap (or other ones that would otherwise make the game extremely boring or dull). Instead there will be some sort of FTL travel, probably a combination of -jumps and ordinary flying at several c (whatever suits the gameplay).
Planetary Rendering
Today I started implementing planetary rendering and the first problem I had to face were related to the limited precision of the depth buffer. The dimensions of a planet (or the sun) is so huge when compared to a space ship (that will probably never exceed several km) that z-fighting issues start to show very quickly, when trying to store depth values, ranging from several hundreds of thousands of kilometers to several meters. However I read a small post by Infinity Admin (who is currently creating the most awesome space game ever) in which he described how he resolved those issues. Basically, instead of rendering everything into the same depth buffer, he adjusts the distances of the clipping planes so they only cover the space of the planet he is about to render. This way he can make use of all available precision of the depth buffer, instead of a minor fraction. After fully rendering a planet, the depth buffer must be cleared again so the next planet can be rendered. Once all planets are rendered, the final scene (ships, explosions, rockets, etc…) is rendered on top of that. This has a minor draw back: Ships can not be partially hidden by a planet.
I did some thinking on my own and integrated this theory into the rendering part of my code and it seems to work: I could display a ship with dimensions of 100 units as well as a planet with a radius of 10.000 units at a distance of 100.000 units. Maybe I will post some screenshots next week.
Bye,
Simon
Letzte Kommentare