Procedural Planets
I've started work on the procedural planets, here are some initial screenshots. Like everything in Pegwars, it all has to be seamless, from flying in outerspace to orbiting planet and moon surfaces to landing and running around. Each planet's geometry is formed by tessellating an icosahedron. This shape was chosen to help make each vertex as equidistant as possible in the final mesh; tessellated icosahedra perform better in this regard than tessellated cubes or parametric spheres, and have the added bonus of having triangular faces, making it easy to tessellate and render. Each triangle face of the icosahedron is recursively split at the edge midpoints to generate the next level of detail of geometry, as needed. For performance reasons, as you don't want to be allocating GPU resources at runtime, Pegwars has a fixed set of vertex and index buffers for planets and moons - meaning a maximum of 10 planets at once, each with up to 3 orbiting moons. Once I...