vegastrike / Vega-Strike-Engine-Source

Vega Strike Engine
Other
256 stars 42 forks source link

Autopilot frequently overshoots destination #854

Open stephengtuggy opened 5 months ago

stephengtuggy commented 5 months ago
          The one issue I did encounter was with the autopilot overshooting my destination, a medical station -- over and over and over. I don't think that's a new issue, but it might be. We'll probably want to troubleshoot that later.

Originally posted by @stephengtuggy in https://github.com/vegastrike/Vega-Strike-Engine-Source/issues/852#issuecomment-2090829661

BenjamenMeyer commented 5 months ago

Autopilot seems to have a mind of it's own. There's some things like this we need to fix around targets and distances:

Little things like this make a better experience

evertvorster commented 5 months ago

I think there is an open bug on this already. There seems to be two issues.

  1. The ship does not smoothly slow down out of Spec, instead leaving it till the last minute to slow down abruptly. Considering the speeds that are travelled at, it needs to gradually slow down way before.

  2. Overshooting the autopilot off point seems to happen more with faster ships, and seems to be related to the way the thrusters are implemented. Traveling at a constant speed and then applying a sideways thrust increases the total speed. While logically this makes sense, it does not work for the game engine, which caps the speed at a certain total velocity and does bot know what to do with the extra speed.

On Thu, May 2, 2024, 22:37 Benjamen Meyer @.***> wrote:

Autopilot seems to have a mind of it's own. There's some things like this we need to fix around targets and distances:

  • autopilot should drop off a few thousand kilometers away
  • autopilot should be less sensitive to gravity fields around targets
  • we should be engaging autodock further away (10,000 kilometers as opposed to 1,000)

Little things like this make a better experience

— Reply to this email directly, view it on GitHub https://github.com/vegastrike/Vega-Strike-Engine-Source/issues/854#issuecomment-2091758485, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC34XVI6FKYAYUBQNFJRPSLZAKWYRAVCNFSM6AAAAABHD6ZYQGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJRG42TQNBYGU . You are receiving this because you are subscribed to this thread.Message ID: @.*** com>

BenjamenMeyer commented 5 months ago

Yeah, we should implement a proper reverse burn for slow down, which the engine doesn't do right now

evertvorster commented 5 months ago

While more realistic, it might break other stuff. The simplest might just be to find out why speed increases when turning at a set speed, and stop it from happening.

On Thu, May 2, 2024, 23:07 Benjamen Meyer @.***> wrote:

Yeah, we should implement a proper reverse burn for slow down, which the engine doesn't do right now

— Reply to this email directly, view it on GitHub https://github.com/vegastrike/Vega-Strike-Engine-Source/issues/854#issuecomment-2091825158, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC34XVLJCZ4PAXAXOGZ7UJDZAK2KTAVCNFSM6AAAAABHD6ZYQGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJRHAZDKMJVHA . You are receiving this because you commented.Message ID: @.***>

evertvorster commented 5 months ago

703 Is the bug where the ship speeds up past its theoretical max.

In theory, there should be no maximum speed in space, only acceleration, but in this game and a lot of others there seem to be a speed limit that is different for different ships, depending on their power, etc... a lot like if there was some resistance that the ships engines constantly had to overcome.

evertvorster commented 5 months ago

343 Is where the autopilot overshoots its target and then does not disengage. I, for one, would be happy to see this bug fixed.

stephengtuggy commented 5 months ago

343 Is where the autopilot overshoots its target and then does not disengage. I, for one, would be happy to see this bug fixed.

I certainly would as well.

Perhaps if we return to setting all ships to the same default "speed limit", it would help us fix this bug more easily. I've been thinking about doing that anyway. I think there was a reason why 0.5 had made this change. Probably improves the balance of the game considerably.

evertvorster commented 3 months ago

I don't think a universal top speed is the way to go.

Firstly, having a bit of difference between space craft is the whole reason you would go and spend the time to get enough cash together to get a better performing craft.

Secondly, the issue may not go away. The auto pilot used to work properly, and with all the changes that we made it stopped arriving gracefully at the destination. It should work for all speeds, and compensate for whatever speed the craft is doing.

In my reading of the manual, I saw that there are settings in your save file where you can turn your ship into a more performant one, under Maneuverability hack. https://wiki.vega-strike.org/Manual:Cheats

This is causing me to think that maybe the flight computer is not applying these values properly. It certainly is something to mess with to see if the settings still have an effect, how big that effect is, and if it has an effect on the autopilot arriving on the correct spot.

If that is not the cause, I have an inkling that it could be down to the 'tick' of the game, ie: how far the ship moves between discrete time units. It could be that we have to somehow modify the range that SPEC is active in the forward direction to slow down the ship more gracefully.

evertvorster commented 3 months ago

Having poked at this a little, VegaStrike refuses to load a savegame that had the csv file modified.

evertvorster commented 3 months ago

As an interesting data point, autopilot works perfectly when your target is a jump point, or a planet. It would seem that it only misbehaves when the target is something you can bump into.

Also, I have noticed the Serenity station's position glitch when approaching it recently. It is not nearly as bad as it used to be, but it is still there. Could it be that the positions of movable objects are not stored with enough precision?

stephengtuggy commented 3 months ago

I don't think a universal top speed is the way to go.

Firstly, having a bit of difference between space craft is the whole reason you would go and spend the time to get enough cash together to get a better performing craft.

Secondly, the issue may not go away. The auto pilot used to work properly, and with all the changes that we made it stopped arriving gracefully at the destination. It should work for all speeds, and compensate for whatever speed the craft is doing.

In my reading of the manual, I saw that there are settings in your save file where you can turn your ship into a more performant one, under Maneuverability hack. https://wiki.vega-strike.org/Manual:Cheats

This is causing me to think that maybe the flight computer is not applying these values properly. It certainly is something to mess with to see if the settings still have an effect, how big that effect is, and if it has an effect on the autopilot arriving on the correct spot.

If that is not the cause, I have an inkling that it could be down to the 'tick' of the game, ie: how far the ship moves between discrete time units. It could be that we have to somehow modify the range that SPEC is active in the forward direction to slow down the ship more gracefully.

@evertvorster I think you're on the right track with this.

evertvorster commented 3 months ago

I think it is related to #866 If the position of the base is jumping around in space, then SPEC won't work properly, especially for something with such a small gravity field as a base.