Sunday, January 23, 2011

“Disneyland” Solar System



Following a suggestion from Kometbomb I've been experimenting with artificially attenuated gravity. Results have been encouraging. I have an attenuation factor that smoothly cross-fades a planet's gravity to zero at a finite distance from it. (It's the usual 3u2 - 2u3 cross-fade, although maybe linear would be fine too.) This allows planets to have strong surface gravity without affecting distant areas, so I can pack them more closely together. It's like a Disneyland version of a solar system (or a bit like Super Mario Galaxy, as Owen suggests.)

The cross-fade attenuation doesn't start until some distance above the surface. As long as you stay under that height you can enter stable orbit around the planet.

At the moment I have all the planets sitting still. The next experiment will be to see if motion can be made to work. Planets will need to be arranged so they can't ever collide with each other, so things may end up getting spaced out more. If motion doesn't make it more fun I think the multiple planets will still be all right. I can see interesting gameplay being built from this.

4 comments:

owen said...

It was always my dream to wake up to see a big sister planet covering half the sky or twin moons like in Pitch Black with Vin Diesel. But I know deep down that as pretty as it may look it would be IMPOSSIBLE to stablise, so it could never exist in reality. :(

kometbomb said...

I actually just found my old code. Turns out the planets are static and indeed the projected trajectory (my game had that too) has a noticeable artifact somewhere between two planets. It was my plan to use the trajectory as a manual instrument for orbit stabilization and enabled only when near planets so it was not that bad.

James McNeill said...

Thanks for the info! By the way, your list of Thrust-likes is a great resource; I looked at that a couple of years ago when I was earlier on in this project. Some others that might merit addition:

Gravitron 2: http://xout.blackened-interactive.com/Gravitron2/Gravitron2.html (also available on XBox Live Indie Arcade)

Gravity Crash (PSN; not the greatest game in my opinion)

PixelJunk Shooter (also PSN). This one's more of a fluid dynamics simulator in disguise. It's one of the games I generally pull out when we have people over for a party.

Now that I'm experimenting with moving planets I'm finding that the trajectory needs to be relative to the planet surface to be useful. When you're sitting on the surface of a moving, rotating planet your ballistic trajectory can angle off to the side, for instance. I haven't figured out how I would make the transition between coordinate systems for the trajectory plot.

There is also the issue of how to usefully show trajectory for purposes of rendezvous with a distant, moving planet. This is the same issue I have with rendezvous with an orbiting mothership; haven't solved that yet either.

I'm separately experimenting with making orbits with more eccentricity variation while still not having anything collide. I'm not sure if that is going to work out or not. It seems like any orbits that cross will need to resonate with each other (have periods with integral common factors); otherwise they will eventually collide. That seems like it will really constrain which orbital periods are allowed.

At one point a couple weeks back I was all set to throw in the towel and have an "overmap" for flying between planets. There wouldn't be any collision on the overmap so the orbits could go any which way.

Now I'm seeing hope for directly flying between planets so I'm putting the effort in to try and figure out how the planets should be laid out. I'd like it to be dense but my current configuration looks a lot like the holes in a shower head, and not how people typically think of a solar system.

James McNeill said...

Also, I'm very interested to know more about your own Thrust-like project: how far you got with it, what worked, what didn't. Could carry on the conversation via email or IM if that was convenient.