Page 1 of 1
Is it possible to add in Gravity/Inertia?
Posted: Tue Mar 07, 2017 6:08 am
by Strato1
I'm just wondering if there are any OXPs that allow gravity and inertia to affect ships in Oolite, or if it's even possible for an OXP to do such a thing? Oolite is a fun game, but the general lack of realism does sometimes get to me...
While I'm asking, what about planet/station orbits, rotation, and scaling (those ships would have to be huge, when compared to the planets...)?
I know Oolite isn't meant as a realistic simulation (and it probably shouldn't be), but I'd like to know if any of this is practical (or at least possible) to add as an OXP.
Re: Is it possible to add in Gravity/Inertia?
Posted: Tue Mar 07, 2017 7:28 am
by pleiadian
I think the closest you can get to that in the moment is he
Ship Configuration OXP. It can probably be done some other way, but that's for the devs to answer.
Re: Is it possible to add in Gravity/Inertia?
Posted: Tue Mar 07, 2017 8:41 am
by another_commander
Inertia could probably be simulated by manipulating the ship's velocity vector. I just did a simple test in the Debug Console by setting the velocity of the ship to a random vector and trying to "correct" its course afterwards. Effectively the same thing as colliding with an obstacle and being thrown in a random direction. Observations:
- Flying can become extremely difficult, mostly due to the roll/pitch model. It's much easier when flying with yaw. I guess combat AI will also be affected if velocity vector manipulation is introduced.
- There are weird effects with the exhausts being drawn with direction that of the current velocity vector. For high velocities they may end up being drawn in a completely unnatural looking way initially and start returning slowly to their standard positions as the velocity vector returns slowly to getting the ship to push forward. I would think that for small adjustments and manipulation of velocity this effect would probably not be too annoying.
Given that velocity is a read/write property in the JS ship class, one could theoretically make an OXP that tracks the ship's current velocity and applies slight velocity adjustments that dissipate with time and as the ship changes direction of flight and thus create the illusion of inertia during flight. That's what I can tell just by a quick and very basic experiment, I am sure that there could be also other issues that are overlooked at the moment, but someone might want to give it a try for fun. Could be interesting.
Re: Is it possible to add in Gravity/Inertia?
Posted: Tue Mar 07, 2017 9:50 am
by phkb
Strato1 wrote:
While I'm asking, what about ... scaling (those ships would have to be huge, when compared to the planets...)?
Redspear's re-scaling experiment is trying to fix some of these issues:
https://bb.oolite.space/viewtopic.php?f=2&t=16159
Re: Is it possible to add in Gravity/Inertia?
Posted: Tue Mar 07, 2017 7:26 pm
by Strato1
Thanks for the replies.
another_commander wrote:Inertia could probably be simulated by manipulating the ship's velocity vector. I just did a simple test in the Debug Console by setting the velocity of the ship to a random vector and trying to "correct" its course afterwards. Effectively the same thing as colliding with an obstacle and being thrown in a random direction. Observations:
...
That's really interesting... I can imagine that leading to some rather... interesting new combat techniques. As for the velocity dissipating, since there's little to no friction in space, shouldn't the ship maintain its velocity (for the most part) until it fires the engine in the opposite direction?
I suppose you could explain it away as some piece of equipment/technology on the ship which is designed to slow its movement, to prevent collisions/accidents (of course, movement and speed only exist relative to a point of reference).
pleiadian wrote:I think the closest you can get to that in the moment is he
Ship Configuration OXP. It can probably be done some other way, but that's for the devs to answer.
Thanks for both of the links, I might try them.
Re: Is it possible to add in Gravity/Inertia?
Posted: Fri Mar 10, 2017 9:06 pm
by Cmdr James
Strato1 wrote: ↑Tue Mar 07, 2017 7:26 pm As for the velocity dissipating, since there's little to no friction in space, shouldn't the ship maintain its velocity (for the most part) until it fires the engine in the opposite direction?
Depends what you mean by "should". Thats a complete change of the way the game works, something that Frontier (elite 2) did and while it does make the game more realistic, it makes it much less like elite.
Re: Is it possible to add in Gravity/Inertia?
Posted: Sun Mar 12, 2017 5:50 pm
by Astrobe
One can pilot without using the rudder (for yawing). It feels less like "turret mode" and more like a jetfighter. Docking feels like a real landing as well.
Re: Is it possible to add in Gravity/Inertia?
Posted: Sun Mar 12, 2017 7:34 pm
by tsoj
maybe if you want a game that is more like elite 2 /frontier you should try out pioneer ( opensource/free ), its a modern clone of it.
Its maybe a littlebit more difficult for beginners ( i tried it only half an hour ), but i dont know anything about its modability.
https://pioneerspacesim.net/#&panel1-1
Re: Is it possible to add in Gravity/Inertia?
Posted: Fri Mar 17, 2017 9:24 pm
by Astrobe
another_commander wrote: ↑Tue Mar 07, 2017 8:41 am
Inertia could probably be simulated by manipulating the ship's velocity vector. I just did a simple test in the Debug Console by setting the velocity of the ship to a random vector and trying to "correct" its course afterwards. Effectively the same thing as colliding with an obstacle and being thrown in a random direction. Observations:
- Flying can become extremely difficult, mostly due to the roll/pitch model. It's much easier when flying with yaw. I guess combat AI will also be affected if velocity vector manipulation is introduced.
- There are weird effects with the exhausts being drawn with direction that of the current velocity vector. For high velocities they may end up being drawn in a completely unnatural looking way initially and start returning slowly to their standard positions as the velocity vector returns slowly to getting the ship to push forward. I would think that for small adjustments and manipulation of velocity this effect would probably not be too annoying.
Given that velocity is a read/write property in the JS ship class, one could theoretically make an OXP that tracks the ship's current velocity and applies slight velocity adjustments that dissipate with time and as the ship changes direction of flight and thus create the illusion of inertia during flight. That's what I can tell just by a quick and very basic experiment, I am sure that there could be also other issues that are overlooked at the moment, but someone might want to give it a try for fun. Could be interesting.
If the judge asks why, I'll say I did it for the lulz.
Here is a buggy version, so don't use on your 9999 kills/0 death commander:
https://drive.google.com/open?id=0B7mL1 ... VZaVG04UnM
Being a quick-and-dirty prototype based on an OXP that I already botched previously for other immoral purposes, the source code is garbage too.
Toggle off your weapons to enter "full inertia mode". Toggle on again for normal mode.
I'm not really interested in the newtonian stuff
per se because I agree it is actually detrimental. I'm more interested in player-controlled turrets as salvation devices for big-slow-boring trader ships. From the TAU Rockhopper thread:
Well, the idea behind this ship was that a new player probably buys a Python first, and while it's great for hauling, fighting in it is almost impossible, as most ships can easily escape that 0.2 LM. So I wanted a ship that comes as a relief after the sluggish Python, a hauler that can be used as a fighter properly. But in order to be a relief, it needs to be more expensive than the Python - and the stats support this.
In a nutshell: real haulers are not fun, so we'll make a bigger Cobra.
Giving big trader ships player-controlled turrets and heavy shields should introduce a new style of combat.
This "inertia mode" is quite close to what controlling a turret on your ship could look like. If someone wants to improve on it, feel free.