🔒 Locked
A question for Einstein...
Advertisement
Original Post
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???
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
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
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.
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]
[edited by - doctorsixstring on July 9, 2002 6:03:46 PM]
Why don''t you simply calculate the valocity vector (as if the laser instantly hit the taget) at fire time and show an explosion where it hits
.
all speeds can be determined relative to the world origin, so in relation to teh world origin and laser beam should be teh same speed, hence if you shoot a laser at something they cannot doge it. This certainy of striking the target means that aiming is not a big problem and speed is easy you "pause " every thing else in the game (because the speed is so fast nothign else cna happen in that time span), animate the laser beam and let it be solid for the duration of the fire button being held meanwhile calculating how the laser does damage. so in short moving the beam/laser is so fast that u shouldnt animate it really no motion involved ( animating the laser moving sure but not actually moving the laser in 3d space) just have it be a constant thing. however it would look differnt based on where a given player sees it from but only for a split of a milisecond, its speed is truely relative to all things in teh world but its so small that it doesnt matter .
I''ve been thinking...
Why using lasers in space and not regular bullets?
I don''t see any reason not using bullets...
Okay, so there is no oxygen in space so an explosion couldn''t last?
We''ll simply fill the cannon''s chamber with oxygen while shooting!
More realistic and quite original... but doesn''t solve the problem..
Why using lasers in space and not regular bullets?
I don''t see any reason not using bullets...
Okay, so there is no oxygen in space so an explosion couldn''t last?
We''ll simply fill the cannon''s chamber with oxygen while shooting!
More realistic and quite original... but doesn''t solve the problem..
If you don''t want the player''s shots to travel at lightspeed, why not call them something other than "lasers"?
Lasers look cool. But most of the time in games, they aren''t actually modelled after real lasers... most games make lasers that are basically bullets that look like a bright light source and travel faster than whatever shot it. If you really wanted it to be realistic, you''d see nothing at all when you shot (perhaps a bright colored point on the bad guy =) ) and the bad guy (assuming it was targeted correctly) would have a hole punctured in it immediately. No special relativity involved here because lasers look the same to everyone (invisible unless there are particles around to scatter the light).
Just a little side note, in Star Wars, anyway, the stuff the ships shoot aren''t *supposed* to be lasers, but instead concentrated plasma. That''s why they don''t travel anywhere near lightspeed.
One more thing. The term "speed of light" is really pretty dumb, because the "speed of light" is the *maximum* speed of light, as well as all other types of electromagnetic radiation, and is rarely the actual speed of light, since it moves at various speeds depending on the material it is travelling through. Only in a perfect vacuum will light actually reach the speed of light.
rm -rf /bin/laden
One more thing. The term "speed of light" is really pretty dumb, because the "speed of light" is the *maximum* speed of light, as well as all other types of electromagnetic radiation, and is rarely the actual speed of light, since it moves at various speeds depending on the material it is travelling through. Only in a perfect vacuum will light actually reach the speed of light.
rm -rf /bin/laden
CmndrM is essentially correct. All raidation travels at the speed of light, but slows down depending on materials (it doesn''t actually slow, but the amplitude of the waves it travels in gets bigger, therefore takes longer to move). In space the "lazer" wave would travel close to the actual speed of light. Using Ensiten''s equations this speed is a limit as energy approaches infinity (remember calculus?), i think. What u want, is to simulate this speed. It is approximately 3.00 x 10^8 m/s. In other words, by the time you turn on your lazer, it would have already hit the target, or gone off into space.
If you want to simulate real "lazers", just check the objects for collision with a ray from the originating object. If there is a hit then do the particle effect thing.
If you want moving "lazers" then we run into your little problem. We know that if you shine a flashlight off a thing traveling at x speed the speed of the light would still be the the same. However, this speed is too fast for your shooter. You could manipulate the neutonian motion laws to induce a slower maximum. If an object''s net force exceeds a certain value, the reduce it to a lower value. You then have your lazer projectile travel at this limit value. Simple physics
"Free advice is seldom cheap."
If you want to simulate real "lazers", just check the objects for collision with a ray from the originating object. If there is a hit then do the particle effect thing.
If you want moving "lazers" then we run into your little problem. We know that if you shine a flashlight off a thing traveling at x speed the speed of the light would still be the the same. However, this speed is too fast for your shooter. You could manipulate the neutonian motion laws to induce a slower maximum. If an object''s net force exceeds a certain value, the reduce it to a lower value. You then have your lazer projectile travel at this limit value. Simple physics
"Free advice is seldom cheap."
Sorry about the inaccuracy, a bit of the k.i.s.s. theory has rubbed off on me from my grade 12 physics teacher (who didn''t know physics), soon to be my oac physics teacher (she doesn''t know 10^1 = 10 !!!, and i lost 3 marks
). At any rate, you are right, newton has left the building. Since then, there have been many progressions in physics (the most interesting being in quantum mechanics and espeically chaos, but that is just me). Unfortunately, computer graphics are constantly restricted by the euclidean plane and its related mathematics and also by limited processing speeds. That is how newton and simplified theories make their way back into the mainstream...I would love to see the day when this stuff is all resolved...but it ain''t going to happen any time soon
Okay, I think I''ll go for the straight-line laser method (a ray-object coldet).
Now, I am not going to implement it, because it seems REALLY complex and unnecessary for a computer game, but shouldn''t you get a doppler effect with the laser''s beam color when dealing with high relative speed between the light source and the viewer?
(a green laser will become red or purple etc...)
Now, I am not going to implement it, because it seems REALLY complex and unnecessary for a computer game, but shouldn''t you get a doppler effect with the laser''s beam color when dealing with high relative speed between the light source and the viewer?
(a green laser will become red or purple etc...)
quote:
Original post by Anonymous Poster
Light energy is converted when it encounters a material. It does not slow down. Slowing down would imply mass. This mass idea came about with Newton and has since been discreditted.
I thought that the speed of light in water had been experimentally verified to be about 3/4 the speed of light in air.
The speed of light is supposed to depend on the index of refraction of the medium it's in. Otherwise, where does Cerenkov Radiation come from?
[edited by - cheesegrater on July 10, 2002 11:20:46 AM]
quote:
Unfortunately, computer graphics are constantly restricted by the euclidean plane and its related mathematics and also by limited processing speeds. That is how newton and simplified theories make their way back into the mainstream...I would love to see the day when this stuff is all resolved...but it ain''t going to happen any time soon
I wouldn''t say that it''s just because of graphics. Newtonian physics is, essentially, very accurate for the scope of most games, because it holds true (again, within certain limits) for objects of everyday size. Only when you start talking about vast distances, or very tiny ones, does Newton become useless. If you can simulate physics accurately enough to get a game to look and feel realistic, there''s no need to use any more complex physics systems. The same holds true for other things other than games. In other words, it''s not just computer graphics that coninue to use Newtonian physics.
rm -rf /bin/laden
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement