Jump to content
  • Advertisement
Sign in to follow this  
LoneWolf1066

Space Simulation Development

This topic is 4337 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm interested in developing a space simulation aka Freespace, X3, and Darkstar One. I'm aware of several open source space simulators, the availability of Freespace and Alliegance sourcecode, and what have you, but I was interested if anyone could point me to any resources detailing the theory behind space simulation. Idealistically I want to implement a lot of realism, possibly even to the point of implementing effects of gravity and relativity into it as well (something akin to Picard's manuever). Now, with all criticism aside, I'm not even sure if with our current hardware such simulation is even possible considering the multitudes of mathematical calculations that would have to be considered. So, my point is, is there any documentation (Peer-review journal articles, sites, etc..) that deal with this topic? My biggest problem right now is conceptualizing how scene representation will occur when the scale of the 'map' / game world is much vaster than what octrees and BSP style maps would support. I do appreciate any input, and I do apologize for what may be perceived as a somewhat noob-style post. I'm not looking for a silver bullet that will make everything fit into place, but rather want to start conducting the research that would make the idea start to take form.

Share this post


Link to post
Share on other sites
Advertisement
I'm making a space sim game. I can zoom in on a planet from a pinpoint speck all the way in to standing on the surface smoothly. Well actually I am still working on the transition between atmosphere and surface but it will be pretty smooth when I'm done. Most of this scaling is not really necessary at all though -- because even travelling like hundreds of thousands of km a second, it would take years to travel distances of AU, so my players might not even realize that its possible to approach a distant planet because it will always appear the same size to them. Well, if they set a course, and come back in 5 years, they'll be there :)

The trick is representing coordinates at multiple scales; eg, you need to represent position in terms of km and in terms of AU. For objects that are outside of the clipping zone, you just scale them down and move them closer and render them without using the depth buffer.

There are indeed "multitides of calculations," but no more than any other game.

It is completely possible and not very difficult to have the effects of gravity etc.

There are no effects of relativity that you would actually want to simulate the math for.

Share this post


Link to post
Share on other sites
BSP is probably a bad choice for a culling algorithm for something like this; I'm trying to think of a better system.

I'm going with straight-up boring frustum culling right now.

Also, the nice thing about space games is -- you don't have to be realistic because practically nobody has a frame of reference for it.

Share this post


Link to post
Share on other sites
Quote:
Original post by stuh505
There are no effects of relativity that you would actually want to simulate the math for.


There might. If you're travelling close to the speed of light, then you might want to implement some of the odd time discrepancies which occur at those kinds of speeds.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Whats hard is, for navigation in the prescence of gravity. Im betting a lot of players are not going to get a good feel for orbits and how to transfer them.

Would Lagrange points and the related Interplanetary Transport Network (a set of useful orbital transfers) even be an emergent property of simple distance squared gravity calculations?? or would that need to be calculated explicity?

Maybe some kind of energy based orbit model would be more stable than simple force-distance-squared stuff?

Share this post


Link to post
Share on other sites
Newtonian gravity works just fine at the speeds you're likely to encounter when in orbit. Lagrange points and orbital transfers don't require anything complex either. The only body in the solar system whose orbit deviates from the predictions of classical gravity by a significant amount (because of relativistic effects) is Mercury, and even this error is only 43 arcseconds per century. No player would be able to notice such tiny effects.

Orbital maneuvering is indeed a difficult task. There are counter-intuitive elements to it (like "braking" in order to "accelerate" forward in orbit) that would be confusing to players just as they were to the first astronauts. The first attempts at orbital rendezvous in real life failed because this stuff wasn't understood... Attempting to close in on a target satellite by accelerating toward it causes you to get further away!

Share this post


Link to post
Share on other sites
intergrating Einstein's mathematics would (be fun) but wouldn't neccessarily validate or articulate on the realism of the simulation. Einstein's relativity is indeed an elegant and beautiful construct, but isn't the only acceptable view. anyone who's studied physics knows that it is a 'realistic' interpretation due to observation, but not neccessarily any more than that. here's a (somewhat random quote):

"... Supposing that the bodies act upon the surrounding space causing curving of the same, it appears to my simple mind that the curved spaces must react on the bodies, and producing the opposite effects, straightening out the curves. Since action and reaction are coexistent, it follows that the supposed curvature of space is entirely impossible - But even if it existed it would not explain the motions of the bodies as observed. Only the existence of a field of force can account for the motions of the bodies as observed, and its assumption dispenses with space curvature." -Tesla

Just one other view of how space-time curvature can be circumvented. As a note, Tesla never denied the mathematical validity of Einstein, he viewed the mathematics as valid and unique, but as almost unneccessary jargon.

There are also some unique modern views that describe such forces such as friction and gravity through purely intrinsic and sometimes electromagnetic views of atomic relations. (i know Calphysics.org has some cool stuff)

[Edited by - auric on January 31, 2007 6:03:05 PM]

Share this post


Link to post
Share on other sites
If you're looking for realism, I'd check out http://www.orbitersim.com for a pretty good example of a Newtonian-based flight simulator. But the poster who said orbital mechanics are counter intuitve sure is right. Understand that if you're looking for space combat, scrap any idea of realistic physics because such a battle is really just electronic warfare, unless you have some insane rocket engine. It would be like submarine warfare, with oponents trying to tweak their orbits for a firing position, while avoiding detection.

But a realistic simulation is possible. There's just a lot of sitting and waiting.

Like I said, you really wouldn't need relativistic effects unless you're trying to get say, the time dilation effect. And it would still be fun, even if you're aiming for hyper-realism, most won't know the difference unless you have warp drives or other fantasy propulsion.

Share this post


Link to post
Share on other sites
Thank you for all the replies. I'll take a look at the Orbiter simulation as well as the Cal Physics website. What I was looking at may seem counter-intuitive, a sort of quasi-realism. That is to say, I would like to implement a realistic setting but integrate sci-fi elements. So, near-speed travel would be possible (warp engines, etc...). I'd also like to toy around with the idea of wormholes and maybe toss in black holes. The program would probably contain an equal amount of realistic physics and quasi-physics (one episode of Star Trek Voyager, I think, where Voyager is caught in a black hole and sees itself going into the black hole.)

My other major concern too is regarding procedural generation of universes. I know there are terrain and planet generation techniques, but is anyone aware of a sort of solar system or galaxy generator which would include phenomena within the proper scale. That is, how can I represent a piece of space that is 20 light years across as a "map" or what not. Would I use the occlusion culling recommended above or something else?

Share this post


Link to post
Share on other sites
Quote:
but is anyone aware of a sort of solar system or galaxy generator which would include phenomena within the proper scale


Take a look at StarGen http://home.comcast.net/~brons/NerdCorner/StarGen/StarGen.html

It generates a solar system parametrically by accretion of particles, based on some paper public by Rand Corp back in the 60s. It was the prevailing model among astrophysicists in the day. It will NEVER generate systems like the ones that have been observed in recent years - they will all come out more or less like our system - little rocky planets on the inside, big gassy planets on the outside.

Source code is availble. A while back, I ported it to Managed C++ and bolted on a better I/O model (the code is very old-fashioned C) but I ended up not using it. I didn't like the systems it generated. But its got some nice code in it for making all sorts of calculations like atmospheric density based on planetary mass and exothermic temperature etc.

A sphere of space 20LY across will only have I guess less than 200 stars in it if you use the densities we have around our part of the galaxy. At scale, for any given camera location, no more than a couple will be bigger than a single pixel. They really don't need culling.

I've got a text file with all the stars within 50LY of earth - coordinates and spectral characteristics. There are about 500 of them.

Oh, another system is the one that's part of the rules for a PnP role playing game from the 1980s called Traveller 2300. The Director's Manual (I think it is) includes a system for generating solar systems. You can get it in PDF form for a few bucks from some place on the web.

You'll probably end up devising your own system.

[Edited by - dalep on February 1, 2007 3:28:46 PM]

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!