About Fuel Usage in THost

G

Guest

Guest
Archived from groups: alt.games.vga-planets (More info?)

Hi,

you might have noticed that even clients which claim exact fuel
prediction sometimes err, and your ship burns less fuel than predicted.
I finally found the reason: it's a problem with the MS BASIC runtime
library. When asked to compute the distance to a point 3 ly away (dx=3,
dy=0)
dist = INT(SQR(dx^2 + dy^2))
it returns 2. Essentially, the well-known fuel formula is right, but the
mathematical universe is wrong. There exist a few 100 other points where
BASIC errs, and where clients and HOST.EXE disagree.

I have written a small essay about that topic, with some tables,
graphics and downloads, on <http://phost.de/~stefan/fuelusage.html>.

I have also implemented correct fuel prediction for the next versions of
PCC and VPA. My method is described on that website, too, and I
encourage other client program authors to implement it in their client,
too. The basis of the system is a new data file 'disttabl.dat'.

There is also news about ships running out of fuel: Yendor pointed out
that the 'distance reached with X fuel' formula is
way * ship_fuel / fuel_usage
not
distance * ship_fuel / fuel_usage
('way' is my name for the maximum allowed movement according to your
warp speed, e.g. 81 for Warp 9). This is the reason why Dacian towing
works as it does. I put some formulas and a diagram on the website, too.
Here's my approximation formula for how far you get with a particular
amount of fuel,
Way^2 * Ship_Fuel * 10000
Allowed_dist = Sqrt ( ------------------------------- )
EngineFuelUsage * (Mass DIV 10)
and here is how much you can weigh:
Way^2 * Ship_Fuel * 10000
Mass DIV 10 = ----------------------------
EngineFuelUsage * Distance^2

Enjoy,

Stefan
 
G

Guest

Guest
Archived from groups: alt.games.vga-planets (More info?)

Stefan Reuther wrote:
> I have written a small essay about that topic, with some tables,
> graphics and downloads, on <http://phost.de/~stefan/fuelusage.html>.

Gee, Stefan. Amazing as always. Whenever I feel I'm spending too much
time with details of this game I only need to think about things like
this you have been doing. :) Respect!

Christian