Page 1 of 2
Question on speed and Railguns.oxp
Posted: Sat Jan 28, 2012 8:00 am
by Commander Learner
Hi Commanders.
I was toying around with the Military Fuel Injectors and there was a code which multiplied the ship speed. Setting that value to *20 ie ship speed x20 made me go real fast and took a long time to slow down to normal speed. Why does it decelerate so slowly? Does the ship's speed increase/decrease at a fixed rate? I get the same issue when setting my ship speed in shipdata.plist to something very high, it takes quite some time to speed up to max and vice versa. Shouldn't it be better if the ship's acceleration was scaled instead of linear?
I bought the Heavy Railgun and tested it on a Cobra Mk III. The projectiles came out fine, but it took almost 25 projectiles to kill it, I don't even know whether they connected or something. How does the railgun work?
Re: Question on speed and Railguns.oxp
Posted: Sat Jan 28, 2012 8:48 am
by Cmdr. Maegil
How does the railgun work?
A railgun is a electromagnetically-powered mass driver. It activates magnets in a sequence to create attractive/repulsive forces with a magnetically charged mass; these forces are translated into an acceleration of both elements (the railgun and the mass to be launched) in opposite directions inversely proportional to the element's mass.
It can be used to accelerate vehicles, personnel, cargo or even military ordnance, which (or so it would appear) is your intended use.
I hope this helped!
Seriously, now.
About the speed: while others have reported this impression, the dev team swears that both the speed increase and decrease rates are equal and defined in the shipdata... One suggestion was to use the numeric hud to see if this is true or not - although stop-timing it should also prove or disprove the theory.
Back to railguns: they have known problems,
shared with all ballistic mass drivers: one, the area of impact is increased at any angle different to a perfect perpendicular, which "tends" to require more energy to pierce; then, an elastic collision may cause the projectile to rebound; otherwise it seems to have something to do with problems in mesh collision detection, frame rates, or whatnot... they work well enough, though; it's a pity you can't just turn a ton of alloys into a crate of ammo (it being expensive as it is).
Re: Question on speed and Railguns.oxp
Posted: Sat Jan 28, 2012 10:32 am
by Capt. Murphy
Acceleration and decelleration rates are related to shipdata.plist key thrust
. If you are giving your ship a lot of speed it also needs a decent thrust (ooer missus).
Military Fuel Injectors and Retro-Rockets both work by imparting additional velocity to the player. This is distinct from speed in Oolite and it's not necessarily in the direction your ship is facing. Again if a ship has a low thrust it takes a long time for it's engines to equalise speed and velocity, particularly if the velocity boost is large.
Re: Question on speed and Railguns.oxp
Posted: Sat Jan 28, 2012 11:25 am
by Commander McLane
Commander Learner wrote:I bought the Heavy Railgun and tested it on a Cobra Mk III. The projectiles came out fine, but it took almost 25 projectiles to kill it, I don't even know whether they connected or something. How does the railgun work?
When using the railgun, as with other weapons that fire straight forwardly (like lasers) you have to take
parallax into account. That means: you are looking straight forward to your target, while your gun fires exactly parallel to your axis of view, but (depending on your ship) from a couple of meters
below your viewpoint. Therefore it will also hit your target a couple of meters
below the point where your crosshairs are. Depending how close you are to your target that means the projectile will hit one pixel below the center of your crosshairs (very distant target) or halfway to the bottom of your screen (close target). It's advisable to practice with non-moving targets, like asteroids, in order to get a feel for where you have to aim for different distances.
Second, you have to take into account that—unlike your lasers—railgun projectiles travel with a finite speed. Therefore, if you fire on a distant moving target, your target may well have left its position when the projectile arrives. You can try and compensate for that by aiming not directly at your target, but at a point somewhere in its anticipated flight path. In praxis, though, I'd say that it's effectively impossible to hit a distant target that moves perpendicularly to your ship. The railgun is most effective on targets that fly head on towards your ship. In this case the impact is also more devastating, because your target's speed towards the projectile is added to the projectile's speed.
Thirdly, the railgun projectiles immediately disintegrate upon impact. This has the side effect of giving a good optical control on your accuracy: for each time you hit you see an explosion. If you don't see an explosion, you have missed your target.
I hope this helps.
Re: Question on speed and Railguns.oxp
Posted: Sat Jan 28, 2012 11:56 am
by Eric Walch
Cmdr. Maegil wrote:Seriously, now.
About the speed: while others have reported this impression, the dev team swears that both the speed increase and decrease rates are equal and defined in the shipdata....
My only answer is to never thrust the dev team.
Derailment alert
(
de-railgun alert?)
In principle yes, but not under all conditions. To make the game playable, all thrust values of player ships are first multiplied with 5 to get a new thrust factor. That means a player always accelerates faster than the identickal defined npc ship. When you want really play fair against npc ships, you should divide the trust for your ship by a 5. (And I bet you won't like the game no longer with these low values.
)
In the area up until maximum speed both acceleration and deceleration are identical. Differences arise at higher speeds.
- On using injectors, not only the max speed gets 7x higher, but also the thrust is multiplied by 7. (Unlike npc ships)
- On using hyperspeed (torus drive) both the max speed as well as the thrust are multiplied by 32.
- On decelerating from above max speed, the thrust is multiplied by 32.
So, when using injectors, you accelerate by thrust x 7 but decelerate by thrust x 32. In normal game you hardly notice it, but when creting a test ship with 100 times lower thrust, it becomes noticeable.
Looking in the code, I also noticed a bug. When pressing the fuel-injector button, the speed is immediately maximised to 7x maxspeed, even when decelerating from much higher torus speeds. Its probably not noticeable with normal ships, but very noticeable with my test ship with a 100 times lower thrust than normal.
Re: Question on speed and Railguns.oxp
Posted: Sat Jan 28, 2012 12:14 pm
by Thargoid
And that may also have been a reason why I set the velocity multiplier as x1.2 not x20...
The injectors aren't designed to slow you down any faster, so if you set their effect to be something so crazy then you have accept the consequences .
Re: Question on speed and Railguns.oxp
Posted: Sat Jan 28, 2012 12:16 pm
by Smivs
This also touches upon a project I'm working on at the moment I think, and maybe a weird problem I've found.
When travelling at very high speeds, the exhaust plumes do some very strange things. If travelling at silly speeds, if you try to manoevre the exhaust plumes take a while to catch up, so if you say pitch up the exhaust plumes stay angled up for a long time. This is normally only noticeable if using external views, but if you do a 180 degree turn at very high speed the ship ends up effectively travelling backwards, and the exhaust plumes appear to come out of the front of the ship!
As I said this is causing me problems wih a WIP so any advice or thoughts on this would be welcome.
Re: Question on speed and Railguns.oxp
Posted: Sat Jan 28, 2012 12:35 pm
by Thargoid
I don't think there's anything to be done about it, other than a trunk code change. You get the same kind of effect with retro-rockets (your exhaust trail ends up going out in front of you normally) although in that case I rather like the effect.
Re: Question on speed and Railguns.oxp
Posted: Sat Jan 28, 2012 12:53 pm
by Commander Learner
I didn't increase the multiplier, in fact I set it to1.
The value i increased was the first one that mentioned the torus.
Re: Question on speed and Railguns.oxp
Posted: Sat Jan 28, 2012 12:56 pm
by Thargoid
With a multiplier of 1, there's no point in installing the OXP. That multiplier addition is basically all it does
Re: Question on speed and Railguns.oxp
Posted: Sat Jan 28, 2012 1:22 pm
by Capt. Murphy
Don't forget the fuel efficiency tweak....I disabled the multiplier in my copy as-well, but keep the equipment for the fuel efficiency.
Re: Question on speed and Railguns.oxp
Posted: Sat Jan 28, 2012 1:44 pm
by Commander Learner
Bingo Capt Murphy! Just wanted a faster injector. Besides, having the injector on too long with the 1.2 multiplier causes smivs' engine flare problem when stopping. Bug?
Re: Question on speed and Railguns.oxp
Posted: Sat Jan 28, 2012 2:21 pm
by Thargoid
Ah yes, I forgot I'd added that in too from Vortex.OXP.
It's not really a bug (the exhaust trail problem), more just the technique overstretching how the source code deals with the exhausts. But it's just a cosmetic detail in most cases, and one that resolves itself once the ship returns to more normal speeds.
Unfortunately there's no real way around it from the OXP side, given how the code works to restore speed down to maxSpeed if the current values are above that, with similar effects on velocity without the multiplier.
Re: Question on speed and Railguns.oxp
Posted: Sun Jan 29, 2012 12:47 am
by DaddyHoggy
Smivs wrote:This also touches upon a project I'm working on at the moment I think, and maybe a weird problem I've found.
When travelling at very high speeds, the exhaust plumes do some very strange things. If travelling at silly speeds, if you try to manoevre the exhaust plumes take a while to catch up, so if you say pitch up the exhaust plumes stay angled up for a long time. This is normally only noticeable if using external views, but if you do a 180 degree turn at very high speed the ship ends up effectively travelling backwards, and the exhaust plumes appear to come out of the front of the ship!
As I said this is causing me problems wih a WIP so any advice or thoughts on this would be welcome.
Silly speed? Surely you mean "Ludicrous Speed?"
http://www.youtube.com/watch?v=ZFqbAGqKTsE
Re: Question on speed and Railguns.oxp
Posted: Sun Jan 29, 2012 2:30 pm
by Commander Learner
Hahaha! Oh the memories!
But Lord Helmet, we've never gone this fast before!
What's the matter Colonel Sanders? Chicken?
Alright, back to being serious.
Thargoid wrote:Ah yes, I forgot I'd added that in too from Vortex.OXP.
It's not really a bug (the exhaust trail problem), more just the technique overstretching how the source code deals with the exhausts. But it's just a cosmetic detail in most cases, and one that resolves itself once the ship returns to more normal speeds.
Here's what I did:
Fly a Cobra Mk III with max_speed 750, thrust 60
In Military Injectors OXP script, changed
Code: Select all
every 8 seconds apply speed multiplier 1.2
to
Code: Select all
every 1 second apply speed multiplier 1.2
. Also set "the first multiplier" to x22 compared to x32 of Torus drive.
Hit the injectors for 10 seconds.
Results: The ship flew at ludicrous speed. As the ship slowed down to original maximum speed, the flares returned to normal. However, they got smaller as I decelerated and started to face the
wrong direction when I decelerated completely. By looking at the space dust (or stars), I noticed I was moving backwards. Setting the
Code: Select all
every # seconds apply speed multiplier
to 1.0 removed the problem.
What have I done wrong?