Is it possible to add in Gravity/Inertia?

General discussion for players of Oolite.

Moderators: another_commander, winston

Post Reply
Strato1
Average
Average
Posts: 10
Joined: Wed Jun 22, 2016 4:34 am

Is it possible to add in Gravity/Inertia?

Post 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.
User avatar
pleiadian
Deadly
Deadly
Posts: 143
Joined: Mon Feb 20, 2017 2:14 pm

Re: Is it possible to add in Gravity/Inertia?

Post 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.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6227
Joined: Wed Feb 28, 2007 7:54 am

Re: Is it possible to add in Gravity/Inertia?

Post 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.
User avatar
phkb
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3477
Joined: Tue Jan 21, 2014 10:37 pm
Location: Between SDL and a hard place…

Re: Is it possible to add in Gravity/Inertia?

Post 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: http://aegidian.org/bb/viewtopic.php?f=2&t=16159
Strato1
Average
Average
Posts: 10
Joined: Wed Jun 22, 2016 4:34 am

Re: Is it possible to add in Gravity/Inertia?

Post 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.
phkb wrote:Redspear's re-scaling experiment is trying to fix some of these issues: http://aegidian.org/bb/viewtopic.php?f=2&t=16159
Thanks for both of the links, I might try them.
User avatar
Cmdr James
Commodore
Commodore
Posts: 1357
Joined: Tue Jun 05, 2007 10:43 pm
Location: Berlin

Re: Is it possible to add in Gravity/Inertia?

Post 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.
Astrobe
---- E L I T E ----
---- E L I T E ----
Posts: 605
Joined: Sun Jul 21, 2013 12:26 pm

Re: Is it possible to add in Gravity/Inertia?

Post 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.
User avatar
tsoj
Deadly
Deadly
Posts: 192
Joined: Wed May 18, 2016 8:19 pm
Location: Berlin
Contact:

Re: Is it possible to add in Gravity/Inertia?

Post 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
Astrobe
---- E L I T E ----
---- E L I T E ----
Posts: 605
Joined: Sun Jul 21, 2013 12:26 pm

Re: Is it possible to add in Gravity/Inertia?

Post 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.
Post Reply