A question for Einstein...

Started by
49 comments, last by z9u2K 21 years, 9 months ago
Okay, my question is very similar to the one about reltive speeds and lightspeed but after readin all the thread I couldn''t find an answer to my question... I wan''t to build a nice little 3D shoot''um-up spaceship game... very simple... You fly a spaceship in space, and you are beeing attacked by NPC spaceships and should destroy them if you want to stay alive. A small and simple game. My problem is the lasers/bullets... What speed should I shoot them relative to the world origin? It can''t be a fixed speed to all lasers since every object has it''s own speed relative to the oworld rigin and so you could accelerate to be faster then the laser and avoid it.. or ever fly right next to it with the same speed! not very good... I thought about shooting the laser with a fixed relative speed to the shooter, meaning adding it to the relative speed of the ship from the world origin, but then again, if you''ll have a slow ship and a fast ship, you''ll have two lasers traveling at different speeds... I know lasers should travel at lightspeed and that lightspeed is fixed for any referance frames no matter what their relative speed is from one each other of from the origin... I''ve looked into Einstein''s special theory of relativity, but it doesn''t helped me solvng my problem... Is it possible to simulate an object with a fixed relative speed to all objects in a computer game???
Advertisement
make the lasers travel with a fixed speed relative to the world coordinate origin. make that speed faster than anything else is capable of traveling. if you look at FPS games you''ll notice that you can typically dodge lasers if the shooter is far enough away. i.e. they typically don''t even try to make the lasers move at a world light speed.

definitely don''t add the space-ship velocity to the laser velocity. that will come out looking wrong.

you should not try to make the laser behave relativistically unless that is a main point of your game. or in other words, if you just want shooting spaceships to be the main objective don''t bother with relativity.

-me
I would personally prefer to play a game where lasers to go light speed and have relativity correct. I dont know why you would want slow lasers.
Because then aiming would be very, very difficult to do. Slowing things down a bit makes it much, much easier

rm -rf /bin/laden
it seems to me that if a laser can go the speed of light, it will be pretty easy to aim as long as the target is close. if the target is in the aimer when you push the trigger, it gets hit. slower would make it harder because you have to get the right timing and aim ahead, which is completely unrealistic with lasers.
Can anyone clarify this: Nothing can surpass the speed of light. Simple enough. But the speed of light as measured against what? If I''m travelling east and turn on a light that''s travelling with me, the light will be moving at speed c, and it''s direction will be directly ahead of me. But from the point of view of an observer travelling in the opposite direction from me: my speed will seem to be larger than if he were stationary, as well, the speed of the photons being emitted from the light that I turned on will seem to be larger.

How does this work? I''m sure there must be some misunderstanding on my part here, but I''m just not sure where it is.
That''s what Einstein couldn''t figure out.. so he came up with the special theory of relativity in which the speed of light is absolute for all reference frames and therefore cannot be borken (very very shortly , query google for the special theory of relativity to get tons of information ...
It would be nice to see your game avoid the typical "laser bolt"-style lasers. A true laser is a continuous beam of light, not a single, short bolt. Although it is not bad to have lasers/blasters with rapid-fire bolts, it would be good to see a more realistic implementation of a "solid red line" laser.

[edited by - doctorsixstring on July 9, 2002 6:03:46 PM]
i agree with doctorsixstring a solid laser would be cool. although laser bolts are realistic. they are just very short bursts from the laser source.
Wouldn''t that be lightspeed? At least for a real laser. If you''re thinking more like the starwars-lasers, I think you would get the speed of the ship relative to the origin-planet + a built in speed of the laser relative to the ship.
Newbie programmers think programming is hard.Amature programmers think programming is easy.Professional programmers know programming is hard.

This topic is closed to new replies.

Advertisement