Jump to content
  • Advertisement
Sign in to follow this  
nekoflux

physics in outer space

This topic is 4887 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

Hey all: I've been playing around with the notion of building a space combat simulator, kind of like x-wing vs tie fighter. But I'm a bit confused about the physics involved. I'm familiar with Newtons 3 laws, but there are some points of confusion that I need cleared up. In X wing vs tie fighter you can set the throttle from 0-100%, but certain percentages have a maximum velocity. For example at 70% throttle it says im traveling at a speed of 120, and i never go any faster then that. If I increase throttle to 100%, My speed increases to 150, and cant go any faster.This just seems wrong to me. it seems like if I have 70% throttle, I am performing some kind of acceleration, and my craft should be always increasing in velocity Maybe Im mixing real with imaginary but in every space based game/movie Ive seen the engines are always on, and always thrusting but velocity seems to remain constant...how can the engines always be on without constantly increasing the velocity of the craft? Theres no atmosphere to produce drag and newtons 1st law would seem to indicate this isnt right...help please :( Any help would be appreciated, I'm a bit confused. --Nekoflux

Share this post


Link to post
Share on other sites
Advertisement
Very few space combat shooters have realistic physics. This is why.

The game "Frontier" has realistic combat physics.

So you detect the bad guy on your radar, and fly directly towards them, engines at full thrust. You start several thousand kilometres away but by the time you get there, your relative speed is so high that he's only in range for the blinking of an eye.

You might get a chance to zap him with your laser gun briefly (range: a few km), but seeing as he'll only be in range for a few 100 ms, you'll be lucky.

Then you go whizzing past, only to turn on your retro-rockets, turn around, and repeat the process (you're now whizzing away at 1000s of m/s).

If you're not careful, you can also crash into planets rather easily, and by the time you realise, it's too late to slow down.

Basically, having realistic intertia makes the gameplay really rubbish.

Mark

Share this post


Link to post
Share on other sites
Thanks for your reply Mark.

Hmm, maybe I should forget about realistic space physics and just cap the maximum velocity for a given throttle. I originally wanted realistic physical modeling but it doesnt sounds like thats possible.

-Neko

Share this post


Link to post
Share on other sites
i like realistic physics in space games :-) Space Duel under linux is so much fun .... (it's just simple 2D game)

As about engaging in fight with realistic physics, you have to accelerate till you pass half of distance, then you have to start decelerating, and when you'll be at target, you'll have not so big velocity. Even more interesting if target accelerates too.... you'll have to start decelerating sooner. And bot can play good comparing to human...

maybe you can make it have 2 different modes of gameplay? like "traditional or realistic"

Share this post


Link to post
Share on other sites
Quote:
Original post by nekoflux
Hmm, maybe I should forget about realistic space physics and just cap the maximum velocity for a given throttle. I originally wanted realistic physical modeling but it doesnt sounds like thats possible.


Rather than cap the max velocity, which is a pretty artifical solution, you could make the maximum available thrust force decrease as a function of velocity.

Share this post


Link to post
Share on other sites
Quote:
Original post by nekoflux
Dmytry: Good idea

MrRowl: Please explain how that is different from Capping the velocity?

It acts "smoother" , that is, velocity smoothly approaches maximum.
And it is somewhat realistic, it realistically describles motion in some medium with drag, like air, where you have some limited velocity for certain thrust foprce. Or like engine that compress interstellar plasma and uses it for propulsion, or something similar.

But there might be problems if you move at big speed and want to turn or decelerate, and engine power on that speed is small.

You can just add drag force proportional to velocity. I don't sure it will "feel" like outer space, as if you turn engine off, you decelerate...

Or you can try to add drag force that depends to engine power too.
Something weird like drag_force=k*sqrt(engine_force)*-v;
(where k is some constant)
So for terminal velocity we have engine_force=k*sqrt(|engine_force|)*v;
, therefore, maximal speed for given engine force is equal to sqrt(engine_force)/k; (You can square your engine force to make it be just proportional.)

There's no "right way" to do physically-incorrect simulation, and it's the best if you'll try to play with different equations and select most funny ones :-)

[Edited by - Dmytry on January 8, 2005 6:37:04 AM]

Share this post


Link to post
Share on other sites
For space battle, a function to automatically matching a targets speed would be fine. This maybe prevents situations that markr described.

Share this post


Link to post
Share on other sites
If you can find it, get a copy of one of the I-War games (Edge of Chaos even runs on modern hardware). They have a pretty good system IMO. In normal flight, your maximum "forward" velocity is limited depending on the type of ship you're flying and the engine, and your overall speed is always adjusted to the ship's heading. There's inertia, so you can't turn and instantly travel in the desired direction. You can also switch to freeflight mode which acts pretty much as the flight model in Frontier, so you can accelerate off in one direction to your liking. Of course, slowing down will take forever.

As for gameplay, this works pretty well. Combat is possible without the shortcomings in Frontier, but you can (and should) use the system to "slide" by capital ships. It's the most realistic and playable circle-strafing in space combat history. [smile]

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!