vegastrike / Vega-Strike-Engine-Source

Vega Strike Engine
Other
260 stars 44 forks source link

Speed limit of craft not applied. #909

Open evertvorster opened 1 day ago

evertvorster commented 1 day ago

Hi there.

This has been ongoing for a while now, and is definitely different from the way that Vega Strike used to play in the old days. Testing is now done on the latest master of Assets and Engine as of 2024-11-22.

The problem is this. The Llama, once you applied the first fix, has a top speed of 125. (Of whatever units Vega Strike uses) If you point the ship in a direction, and apply full thrust, it gets to that speed. However, if you now turn your ship, the speed increases. This is a problem, as the speed should stay at the speed limit, and not exceed it.

This is the way that the game used to work, but somewhere in the last year or two this has changed. In theory, your ship's computer should use it's thrusters to change direction, and ensure that the speed limit is not exceeded.

This may be why the autopilot overshoots it's targets, as the ship is doing something that is not expected.

Now, very recently, this effect seems to have gotten worse. When accelerating to full speed, and then turning into a new direction still pushes the ship past its top maneuvering speed. When you cut thrust, the ship does not come to a stop at all, and continues on indefinitely at this higher than the speed limit speed.

Here is a youtube video that shows what I am talking about. Volume is a bit low, so you might have to increase the volume to hear my voice.

https://youtu.be/bFDHvAJ1ze0

royfalk commented 10 hours ago

I've been able to partially reproduce this and this issue has been around for awhile.

Running master (engine/assets), when I fly at 120, turning increases speed up to a point. However, when I stop turning, it slows down.

I went back in time around a year and I've been able to reproduce this.

Several questions and requests:

  1. What branch are you running?
  2. Can you check what happens if you fly at speed, turn and then stop turning. Does your speed slow down to 120?
  3. Start a new game. Does it reproduce?
  4. If not running master, can you reproduce on master/master (engine/assets)?

I think the core issue here is the speed calculation. Let say you fly at 100 in direction x. Now you make an instant turn to y (90 degrees). You start decelerating in x and accelerating in y. If deceleration is really slow, you should reach speed of near 100 in x and y (not realistic example).

The computer than calculates speed as sqrt(xx + yy) ~= 141.