Relitivity in a space game...

Started by
31 comments, last by GameDev.net 19 years, 1 month ago
Just bouncing an idea off the comunity here... Understanding the logistical problems with the implementation: What do you think of a game like Homeworld1/2, Eve online, or any of the large-scale space combat games, where in the spatial separation of objects actually generates relativistic effects from the point of view of the object. Ie. In a Homeworld like game: You see a ship 8 light minutes away at a point 8 minutes out of sync with where it actually is, BUT you can switch between your different ships, and see what that same squad looks like from 4 light minutes away, but! Orders take time to filter out from your command ship, so orders that would send your scout fleet away from the “target” to a different “target” would take time to happen, though from playing sake, combat orders with the same “target” will be instantaneous, since you are playing captain of that ship in combat. Again I note that doing this would be notably impossible in multi-player ( or not, equivalent of a real-time “replay” system? ) But a single player possible though predictable number generation so you can backtrack in time but giving a different time seed to your prng. Anyway your thoughts would be appreciated.
Advertisement
waiting 8 minutes for a command to take place could be a little boring if you don't have anything else to do... not to mention that many (probably most) people won't understand what's going on.

I could find it fun tough, if well done.

This makes me think again about that space-ship that's moving away from Earth at almost the speed of light. At the same time, Earth is transmiting stuff to the ship at the speed of light. Since time on Earth would be different than in the ship, I wonder how the transmitions would look like for the people in the space-ship.
[size="2"]I like the Walrus best.
Delays due to the finite speed of light is not really a relativistic effect at all. Delays can no doubt be implemented in a multi-player game, but true relativistivc effects cannot.
You can implement relativity in a single player game quite easily as you can alter how the game universe and AI experience time but you can't do it in multiplayer as this would require altering how the human players experience time.
I totally agree that having time delays on the commands would get annoying,
But, that left out, just changing the perspecive view from each ship base
on distance and light travel time, should be implementable in multiplayer,
since all the actions are taking place in real time, just the information
each player sees in slightly out of date.
Quote:Original post by owl
This makes me think again about that space-ship that's moving away from Earth at almost the speed of light. At the same time, Earth is transmiting stuff to the ship at the speed of light. Since time on Earth would be different than in the ship, I wonder how the transmitions would look like for the people in the space-ship.


I was intrigued by your thought experiment and did some quick calculations:

If the ship would be moving away from Earth at nearly the speed of light (relatively to Earth of course), there would be two major impacts on the transmition: one would be the Doppler shift, the other relativistic temporal distortion (did I write that right??).

If you postulate that the ship would be moving at 99.99% the speed of light, that Earth would be transmiting a signal at 1 Mhz and that Earth's movement around the Sun would of made no impact, then because of the Doppler shift, the relative frequency of the signal at the position of the Ship would be 100 Hz. But when you add the "shift" from the temporal difference (between Earth and the ship) the frequency jumps(!) to around 7071 Hz from the ships reference frame.

If the ship's would speed increases to 99.999% the speed of ligth, the frequency would drop to 2236 Hz . And if ship's velocity should increase even further to 99.9999% the speed of light, the frequency would drop to 707 Hz.

The equations are as follows:
1) Doppler shift: fd = f0 * (1-v/c) ...where f0 is the unshifted frequency and fd is the shifted frequency
2) Temporal difference: fr = fd * (1-(v/c)^2)^0.5 ...where fr is the relative frequency in the ship's reference frame

The above two equations can be simplified to either: fr = f0 * ((1-v/c)/(1+v/c))^0.5 , or fr = f0 * ((c-v)/(c+v))^0.5 (both are correct - which one you use is entirely up to you)

If you plot the above equation, you will see that it starts almost as a linear function (the frequency is steadily decreased as speed increases), but when it approaches the speed of light (at about 90% the speed of light) it starts to curve down very fast (approaching 0 Hz, but never reaching it).

Ok, I think that's it. Thanks for an interesting thought experiment owl :)
you're welcome. Thank you for converting my thoughts to maths :)

Do the higher megahertz mean that the information would arrive more frequently? Supose it was a live-streaming video transmiting 60 frames per second (to say something), will people onboard the ship recieve more than 60 frames per sencond?
[size="2"]I like the Walrus best.
Quote:If you postulate that the ship would be moving at 99.99% the speed of light, that Earth would be transmiting a signal at 1 Mhz and that Earth's movement around the Sun would of made no impact, then because of the Doppler shift, the relative frequency of the signal at the position of the Ship would be 100 Hz. But when you add the "shift" from the temporal difference (between Earth and the ship) the frequency jumps(!) to around 7071 Hz from the ships reference frame.

I don't get this. I thought time dilation made things happening on earth look like they happened in slow motion from the ships point of view. So we should see the frequency drop as a result of time dilation. Now you say that time dilation actually bumps the frequency up from 100 to 7071 Hz. I'm sure your result is correct, but how can this be explained?
It DOES make it slower, remember the original signal was 1MHZ. Its just that theres the doppler redshift effect, and the time dialation.

Basically if youre on a ship accelerating away from earth, and earth sends you a pulse fo light every earth-second, the faster/farther you get the more time is in between the light pulses.
Implementing actual relativity in the space game would have more consequences than you realize. It's quite non-intuitive since we do not experience things close to the speed of light.

There are, of course, the obvious things such as time dilation and length contraction. The earth and the speeding rocket ship are the common examples. The earth sees that time in the rocket ship has slowed down as compared to Earth time while the rocket ship sees that the distance to travel from earth and its destination has been shortened.

Also, especially for a multiplayer game, there are the effects of the relativity of simultaneity. Although more than one observer will agree about the occurrence of an event, they will not generally agree on when that event occurred. You might find that you're targeting an opponent and fire on him, only to discover later that he already fired at you. Despite all of your tactics, you're both dead. But hey, that might be part of the fun to think how to defeat your opponent relativistically without getting killed yourself.

Unfortunately, things like time dilation and length contraction are determined by measurements. However, if you want to know what it "looks" like from your eyes, then it is more difficult. Your eyes register a scene from the light that enters it at one particular time. However, the light that gets emitted or reflected from an object comes at different times because of the different distances that light must travel from each point of the object to your eyes. So, in reality you will be seeing different points of the objects at different times which will actually result in a warping and a rotation known as Terrel rotation. The closer you move to the speed of light, the more the world will look like it belongs in the twilight zone.

Also, one aspect that is forgotten is the effect of relativity on electric and magnetic fields. The field lines will get squeezed toward one spot in the direction of motion. So, again in reality, the closer you move to the speed of light the more the universe will look like a big bright spot. Most relativity simulations remove this effect to show the warping of the world.

Most of these effects can be reproduced if you use the Lorentz equations instead of Galilean transformations in ray tracing. But in doing so, you will discover effects you never thought about that would make a game rather difficult.

All the above assumes everyone is moving at a constant velocity and not turning at all as well as being far away from any massive object. As soon as you accelerate and decelerate (including turning) then general relativity will modify some of these things. Of course I don't assume someone will be moving near the speed of light near a planet or sun, so you would obviously ignore massive objects.

This topic is closed to new replies.

Advertisement