On Oct 23, 2004, at 11:46 AM, Andrew Keller wrote:
So, what you're looking for is a way to calculate fuel used based on
speed, and you want fuel used to skyrocket in a high range of speed.
A very simple way of doing this is to use the function, y=x^2, where
the y axis is fuel used and the x axis is speed. This function
creates a parabola, which opens upward, and as the x values go up the
y values go up faster and faster.
You can also modify the equation with coefficients to make it more or
less potent. For this I would suggest using y=a*x^2 (don't forget the
order of operations), and make "a" a property or constant. Making "a"
bigger will cause the graph to reach higher faster, and making "a"
smaller would cause the graph to do the opposite. You could pull out
a graphing calculator and start playing with other graphs, if you
want.
Thanks to everyone who responded.
y = x^2 * coefficient
is the approach I'm going with. Seems to work well so far. My game is
a PT boat simulation that focuses more on combat than precise physics
so I'm not too concerned with calculating friction, drag, mass, etc.
Besides, there's so little data available for WWII-era PT boats that
I'm having to make up most of it anyway.
Thanks again,
Bob
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>
|