momentum

General discussion for players of Oolite.

Moderators: winston, another_commander

Post Reply
User avatar
Yodeebe
---- E L I T E ----
---- E L I T E ----
Posts: 261
Joined: Mon Oct 13, 2008 7:32 pm
Location: Namab

momentum

Post by Yodeebe »

Hiya.
when rotating or climbing/diving there's a bit of momentum so that you dont just stop dead when you take your finger off the control. not a lot, but a bit.
can that same type of momentum be applied to forward motion? maybe a bit more than that on the rotation, but not too much. i'm thinking 1 or 2 seconds of 'slide'.
or is that monumentally difficult?

I've thought it before on numerous occasions, so apologies if i asked the question before & forgot!
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

Momentum in Oolite already applies to all movement, and I believe it follows the same principles for any and all movement types.

Not quite sure why we'd need to change it in order to make momentum 'stronger' only for a specific direction of movement.... :?:
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
Yodeebe
---- E L I T E ----
---- E L I T E ----
Posts: 261
Joined: Mon Oct 13, 2008 7:32 pm
Location: Namab

Post by Yodeebe »

because after turning engines off i could imagine you'd drift forwards a bit, like a boat, maybe. more momentum with the whole ship moving forwards than rotational momentum, which incidentally is spot on imo.
a bit of skidding type movement, so when you turn, you continue a touch in the same vector. a bit like the old asteroids game.

obviously not worth fussing over if it's a pain, as it's for minimal gain, but it's the rotational momentum that makes me think that the basics might already be there in the code. if it's just a case of changing a few numbers, then maybe someone could direct me?

you'd also be quite justified in telling me to get a grip, & stop being so fussy. :D :roll:

cheers.
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Post by Kaks »

Obsessive? You fit right in! :D

I'm slightly computerless at the moment (netbooks, bah! :P), but it might well be something you can have a look at. If I remember correctly, the relevant code should be inside src/core/entities/playerentitycontrols ... Hope this helps! :D
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

Yodeebe wrote:
obviously not worth fussing over if it's a pain, as it's for minimal gain, but it's the rotational momentum that makes me think that the basics might already be there in the code. if it's just a case of changing a few numbers, then maybe someone could direct me?
Momentum is already in the code. Its called thrust. When you accelerate or decelerate, the speed change is dictated by thrust. Oolite is just cheating a bit by multiplying the player thrust by 4, making it accelerate much faster than an identical defined npc ship. (deceleration is even 32 times faster than an identical npc ship). Its deliberately and I assume its to enhance gameplay for the player.

However I think you are confusing things. Newtonian inertia dictates that any body tries to persist in its movement when you don't apply a force on it. So, when you stop any thruster that makes you turning, a spaceship will persist in its rotation. When you stop your aft thruster the ship will just persist in its forward movement but any acceleration or deceleration shoud stop instantly.
User avatar
Darkbee
---- E L I T E ----
---- E L I T E ----
Posts: 335
Joined: Mon Aug 09, 2004 8:40 pm
Location: Space... man!
Contact:

Post by Darkbee »

oh gawd, this is beginning to sound like FE2. :shock:

*runs and hides*
Darkbee
Oolite: A grOovy Kind of Love
Image
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Post by Switeck »

If Oolite's ships are moving because of space frame-dragging, then once the engines shut down they should almost immediately come to a complete stop.
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Post by Commander McLane »

Switeck wrote:
If Oolite's ships are moving because of space frame-dragging, then once the engines shut down they should almost immediately come to a complete stop.
Which is exactly what they do.

The engines shut down gradually. As soon as there is no engine activity anymore the ship is at a standstill.
Post Reply