Have you tested speed and manoeuvring with different sail/engine settings? Something there is still completely messed up, because you do the highest speed (12 knots) when using no sails.Thumbs up from me! I've just tested a steamship, and I really like the way the engines work!
In PROGRAM\NK.c find:Of course, all I'm really going to rant about is fine-tuning the sound effects.
To my ears, it sounds slightly weird at full speed (max. volume), and perhaps too quiet at the lowest speed.
I think a lower increase in volume between the speeds would be good, with a higher minimum volume and a lower maximum volume. Does that make sense?
Code:
if(PlayEngineSound)
{
int shipSoundID;
shipSoundID = PlayStereoSound("objects\engine.wav");
float volume;
volume = 0.1 + 0.9*abs(stf(GetAttribute(rCharacter,"Ship.Power")))/100;
SendMessage(Sound,"llf",MSG_SOUND_SET_VOLUME, shipSoundID, volume);
rCharacter.Ship.PlayedEngineSound = GetSeaTime();
}
Code:
if(PlayEngineSound)
{
int shipSoundID;
shipSoundID = PlayStereoSound("objects\engine.wav");
float volume;
volume = 0.3 + 0.5*abs(stf(GetAttribute(rCharacter,"Ship.Power")))/100;
SendMessage(Sound,"llf",MSG_SOUND_SET_VOLUME, shipSoundID, volume);
rCharacter.Ship.PlayedEngineSound = GetSeaTime();
}
That'd require some complicated coding with event handlers, I'd imagine. Don't really want to do that...Also, I'd expect the sound effect to play faster with more engine power, but unless you can actually increase/decrease the tempo as you please,
I doubt that's possible using just the one sound effect.
Would it also be possible to get the effect to make more of a transition between the different engine speeds?
So rather than suddenly getting louder, it gradually gets louder (over, say, a few seconds)?
That would just be a way of making things work more smoothly, but everything's fine without it.
Changing the frequency definitely isn't going to work without using different sound files. I was already quite happy I figured out how to change the volume.
At least the interval of the sound matches up properly with the interval of the splashes from the paddles.
Adding in consumption of something would be a lot more complex as well, but it would make sense, wouldn't it? What if we could make the engine run on wood?Now, about this 'free energy' problem we have... the ship ain't solar powered, that's for sure...
We could use GOOD_MAHOGANY instead of GOOD_PLANKS so there'd be no overlap with the planks already serving to repair the ship and such.
But then how much should consumption be? Surely not one unit per second, which would be by far the easiest to code.
I suppose I could use code similar to the engine sound code on time compression to make it, say, one unit per minute. Maybe even a few minutes?
The larger the interval though, the larger the chance that you've already gone ashore or to map without the unit of good being removed, so you'd have sailed for free then.
Unless we can make some sort of TOTAL timer of minutes that the engine was run. But then we should also make consumption depend on the power used.
This can get complicated quite quickly. Virtual Sailor never had any consumption in it!