YoYo was written a long time ago.
I was interested in having a basically toroidal but partially random asteroid as the playing field for a first-person 3D action game. Here are screenshots from two versions. Both basically model a toroid as a bunch of point-gravity sources in a ring, and the "surface" of the toroid is taken to be everywhere that the force of gravity is some constant amount. This describes an isosurface. The little triangular glider guys have a little bit of thrust, but basically "fall" with the gravity of the donut, and hit its "surface", and then drive around on the surface. Sometimes they have enough velocity to make a jump or fly thru the hole.
On the first version, the surface is represented by a cloud of randomly-chosen points within some threshhold of the isosurface. I did this because i wanted to avoid having any grid-like patterns in the surface. However, the problem of converting or filling the random point-cloud into a nice polygonal mesh was daunting, and so in the second version i used a traditional marching-cubes algorythm to obtain a mesh for the surface. In some future version, i'll randomly perturb the vertices of the marching-cubes grid in order to give the surface a more organic feel.
yoyo1.exe 48KB 199909 ScreenShots