Thursday, March 27, 2008

Experiments with relativistic asteroids

I've been playing around with this game: Relativistic Asteroids. It's the classic game of Asteroids, but it uses relativistic physics!* Light speed is set extra low so that you can see the effects of relativity. It is so awesome. This is the sort of game I dream of making. Thought experiments come to life!

Here's some relativistic weirdness that you can observe and experiment with in this game:
  1. Lorentz contraction: If you are in the unmoving reference frame, your ship will appear to shorten when it moves near light speed. If you are in the ship's reference frame (press 'f' to switch between your own reference frame and the unmoving reference frame), the asteroids will shorten when near light speed.
  2. Time dilation: In sandbox mode, you can create flashing squares by clicking and dragging on the screen. The faster the squares are moving, the more slowly they flash.
  3. Tilting the plane of simultaneity: This one is a bit harder to observe. You must be in sandbox mode, and place two stationary flashing squares. If you time it right, you can make the squares flash in sync with each other. But if you change your reference frame, they go out of sync.
  4. Make time go backwards: This is the effect I discussed in a previous post. While you are in an accelerating reference frame, clocks far behind you can tick backwards. The difficulty in observing this is that you have to build a clock. You may either use the flashing of a square as a clock, or you can set flashing squares to collide and then watch them reverse-collide.
But the game is not quite perfect. Here are a few "bugs" that I encountered, that are due to the programming, not due to relativity.
  1. In sandbox mode, set light speed to 2 cm/s (use keys 'e' and 'd'). Make sure you are in the ship's reference frame. Place two squares, one directly above the other. Carefully navigate around the two squares, making sure to keep them away from the edges. If you go around the asteroids, you'll find that the one that used to be above will slowly move around to the side. I'm fairly sure this is impossible under Special Relativity. I suspect the programmer has incorrectly implemented the second dimension somehow.
    [ETA: I may have been mistaken about this point.  After all, the commutator of two boosts is a rotation *mutter mutter*.]
  2. The paths of the bullets (which move at light speed) should be affected by an accelerating reference frame in the same way light is affected by gravity.
  3. One of the major obstacles in making Asteroids truly relativistic is that the playing field has a donut topology. That is, if you or an asteroid go off the edge of the screen on one side, you'll appear on the other. The problem here is that Lorentz contraction shouldn't simply affect the asteroids, but should also affect the entire screen. If you're going really fast, you should find that the distance required to wrap around the screen is much shorter than it was before. The percentage of total screen space taken up by asteroids should remain constant.

    But I understand the programmer ignoring this fact, because combining Relativity with a donut topology opens the door to much more weirdness than anyone's bargained for. All relativistic hell breaks loose. A donut topology implies a "special" reference frame in which the screen is largest. It makes for a more complicated twin paradox. You might see multiple copies of the same asteroid in different locations. Finally, you would be simultaneous with your future and past self.
Nitpicking aside, it's still so awesome.

Next, I want to see relativistic billiards! And then I want to see a game based on Maxwell's equations, where you guide a charged particle through an obstacle course by inducing electromagnetic fields. And then we can add some plasma physics to the mix too. Oh, the possibilities!

*For my introductory explanations of basic relativity concepts, refer to my earlier posts, Parts 0, 1, 2, and 3. (I think my writing has much improved since I've written those posts...)

2 comments:

miller said...

Do you still have the game package around? The site seems gone, and I couldn't find the game on google...

miller said...

Sorry, if the game's down, there's nothing I can do about it. It's a hazard of looking at 6-year old blog posts.