• Advertisement
Sign in to follow this  

physics in outer space

This topic is 4789 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
Dmytry: Good idea

MrRowl: Please explain how that is different from Capping the 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
Have you ever tought about that when mankind has advanced to the level where we have digfights in space, its highly unlikely that the ships computer is so extremely dumb that all it provides you with is means to accelerate and deaccelerate? And the pilot himself has to calculate when to start and stop etc in his head. Now there you have the unrealistic part :-)
More likely it would be like in startrek where you set a course, can issue a full stop etc. And the computer figures out itself what to do, how much to deaccelerate to stop etc..

Share this post


Link to post
Share on other sites
What is frontier? any links?

You could have your realistic physics, but just make use of "computers" to do most movement, like in iwar2

Share this post


Link to post
Share on other sites
wow, wish I played that back then.

written totally in assembly is extremely impressive!

I played the first elite , and i loved that game, I had mad weapons and all, then some people of this station asked me if I wanted some kind of honour, so i said yeah, and they infected me with bugs that covered me screen until i couldnt see anymore...really strange!

Share this post


Link to post
Share on other sites
I think using a more realistic model could be fun. Frontier had a few problems with it though. I don't think what markr described is a big problem in itself. You can just reduce thrust, and try to match your targets speed. That's just a question of skill. But a side effect of it was that fighting could happen very sporadically. You might get in a few shots and then he'd drift out of range for 20+ seconds, which usually gave him time to recharge his shields fully. That way, some battles literally took forever, because none of you ever managed to deplete the other's shields.

Another problem is obviously that if you start out a long way from each others, it'd either take forever to get close, or you had to speed up, which would cause the problem markr described, zooming past each others in a few milliseconds.

But I like the basic physics model, and I think it's much more fun than the usual (and fake) one nekoflux described. There's just a few problems to be aware of :P

Share this post


Link to post
Share on other sites
Quote:
Original post by johnnyBravo
I played the first elite , and i loved that game, I had mad weapons and all, then some people of this station asked me if I wanted some kind of honour, so i said yeah, and they infected me with bugs that covered me screen until i couldnt see anymore...really strange!


Those bugs are called tribbles and originate from Star Trek:

http://www.tvtome.com/tvtome/servlet/GuidePageServlet/showid-633/epid-24928/

and

http://www.ccdump.org/

Share this post


Link to post
Share on other sites
just remember there are alot of things that are going to be hard to make realistic, eg

shooting at stuff miles and miles and miles away, as lasers would probably have a huge range.

But with the physics thing, the thing i love most about proper space physics is the challenge of landing a space craft in a station etc. Sorta like in the Jumpgate game, I crashed my shit countless times trying to land the dam thing,

but it was nice to have such challenges, otherwise all the game is just sitting there, try to get from one destination to another,

and like in elite, i always dredded getting back the station after stealing a whole lot of cargo.

I would sometimes clip the side of the rotating station, and that was a big oh no!

edit:
does anyone know if its possible to run the Frontier game on a pocket pc?

That would be cool!

Share this post


Link to post
Share on other sites
You can check out Orbiter for some ideas. It's not war based at all, but it has the most realistic physics of any space game.

http://www.medphys.ucl.ac.uk/~martins/orbit/orbit.html

Share this post


Link to post
Share on other sites
Just remember, the faster you're going, the longer it takes to slow down, and when you're going that fast there is no real chance of any intense close-quarter combat. Realistic physics make space sims less fun, at least if they're 'too realistic'. Give each ship a maximum velocity if only to make the game more fun, you can justify it by saying its the maximum 'safe velocity' for a given ship.

Share this post


Link to post
Share on other sites
Quote:
Original post by nekoflux
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


Even though there is no drag in space, you still have to move a heavy object through the vaccuum, and that requires force. Everything attracts each other with gravity, and a current theory states that space itself is actually "curved" and that is the explanation for gravity on a grand scale (not on small scales like electrons and protons). X-wing vs. Tie Fighter did simplify it and make it so that when the engines turn off, the craft stops. This wouldn't happen. However, you can't just turn on the engines 25% and expect it to accelerate constantly forever. If that were the case, it'd be a lot easier to get to Mars. Don't take all of this to heart, but based on what I've learned, this sounds right to me.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I have had thoughts of a space sim with realistic physics, but with various autopilots.

The motion would be as difficult as said in the previous posts, but you can buy many different level autopilots - from the barebone manual thruster control to click-on-the-map-with-best-path-finding, that calculates the required thruster power for you. The autopilot could be damaged and miscalculate in a fight, overriden in an emergency, etc. If the game is a mmog, then maybe even have all the autopilots written in a simple scripting language, so people could design and sell their own.

Share this post


Link to post
Share on other sites
In real life autopilot simply brings you along a track, or a straight line doesn't it? It wont dodge mountains for you or anything.

Although if we're talking about space sims, I suppose we're also talking about the future;)

Share this post


Link to post
Share on other sites
Yeah, I mean autopilot is an interesting idea, but I'm trying to keep things simple for now. Plus it's kind of pointless...having autopilot in a combat simulator is like playinf a Nascar game where you have to sit next to the race car driver and having him drive for you. :) I'd rather spend that time on improving the graphics of the simulation or some other aspect.

Since we are already off topic, does anyone know where I can find a few decent 3d models of space craft to use? I posted in the help wanted thread but I'm not getting any hits as of yet :)

Thanks,

-Neko

Share this post


Link to post
Share on other sites
You could probably have a nav comp, just give it a target, and let it come up with a cource that will take you alongside the object, with the minimum of fuel, or time (user choise).

You also should be able to gimple lock against any object, so that your ship turns in sync with the other ship. It should also be able to point you at any object.

You could also give the nav comp, a target, and let it generate the attack vector, and destroy the ship.

You should also be able to have set and forget missles, nukes naturally. as well as probes, which can give you a vid link with the other ship, without them noticing.

This would get rid of most of the problems with realistic physics.
From,
Nice coder

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement