• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Build 14 Alpha 8.5

4.0 it is. <img src="style_emoticons/<#EMO_DIR#>/yes.gif" style="vertical-align:middle" emoid=":yes" border="0" alt="yes.gif" />
I'm just going to be moving the character init entries. <img src="style_emoticons/<#EMO_DIR#>/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" />

<!--quoteo(post=305012:date=Mar 7 2009, 11:50 AM:name=Hook)--><div class='quotetop'>QUOTE (Hook @ Mar 7 2009, 11:50 AM) <a href="index.php?act=findpost&pid=305012"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Update posted in modding section.<!--QuoteEnd--></div><!--QuoteEEnd-->Do you mean the officer pay fix or am I missing something? <img src="style_emoticons/<#EMO_DIR#>/unsure.gif" style="vertical-align:middle" emoid=":?" border="0" alt="unsure.gif" />
 
Complete update since last weather update, but the upload isn't working. <img src="style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" />

Hook
 
Agh! That's probably because of Keith's site updates. <img src="style_emoticons/<#EMO_DIR#>/modding.gif" style="vertical-align:middle" emoid=":modding" border="0" alt="modding.gif" />
Can you send it in an e-mail to me? Then I'll upload it to the Pieter's Pirate Page website and you can post an HTML link to it.
 
Can we use Captain 'Dan the Lunatic Wolf's difficulty-dependent blockdamage code in addition to/as replacement of the HawkerT version?
 
I'm wondering; could we use both versions somehow? It does seem to me like a difficulty-influence would make some sense. <img src="style_emoticons/<#EMO_DIR#>/dunno.gif" style="vertical-align:middle" emoid=":shrug" border="0" alt="dunno.gif" />
 
<b>Stuttering bug at sea tracked:</b>
At the moment when im starting to sail against wind, the game is begins to stutter. Like my pc's resources aint enough. (high end, so tahts aint an option) At the moment I hit the button, to totally lower sails, or go out from sailing against wind, it stops suddenly, and the game runs smooth again.

And: when I fire cannons, before playing each BOOM sound, it locks up for a second. For each gun.

uh...

+ + +
 
i think we already knew it had something to do with the sound files. try removing the cannonfire sounds. if that doesn't work, it's the coding that should start the sound.
 
Interesting. The sail luffing sounds when you're sailing into the wind was my very first mod. This is the first time anyone's said there may be a problem with it. It sounds like the sound system is a bit flaky now.

Hook
 
I wasn't aware it's the sound files. I suspected graphics things. <img src="style_emoticons/<#EMO_DIR#>/dunno.gif" style="vertical-align:middle" emoid=":shrug" border="0" alt="dunno.gif" />
We do know about the cannon fire lag; didn't hear about the "into the wind" one though.
Are you using Realistic Sailing mode by chance? Try switching to arcade and check if you still have the lag.
If that "solves" it, it might indeed be the flutter sound that is played only in Realistic Sailing mode.
 
He's already said it goes away when the luffing sound goes away. I'd have to say it's a problem with the sound system somewhere.

Does this still happen after you reboot your computer?

Hook
 
Oops; sorry. Apparently I wasn't paying attention either. <img src="style_emoticons/<#EMO_DIR#>/mybad.gif" style="vertical-align:middle" emoid=":facepalm" border="0" alt="mybad.gif" />
 
Yes, it stay, even anything I do with my hardware... Some sound files make pause as play, others not.
When I usually call the playstereosound function, in my mod test, it pauses a very little. Not as mutch, as gun sounds do, or the flapping sounds, but still. Music plays smoothly, and several other sounds also,
But opening the fast travel menu, as it plays the small -clicks- when you choose from the locations, will always do little pause.

Yep, something with the sounds...


Also, as I remember, maybe wrong, the flapping sounds against wind was still present in alpha 6. And, again, as I remember, it wont made any pauses (?) am I wrong?

So, maybe it wont do anything with your mod, only the soundplay system?

I try out alpha 6 for this now.

Edited:
Made tests with alpha 6, and alpha 8 + patch from the same hardrive.
Near shore, at harbor, and open sea also, with ships around, or not.

<b>alpha 6:</b>
luffing sounds against wind presents, gun sounds appears the same.
<u>NO pause, or stuttering at all.</u>
Nowhere. Locations, and ships near appears incompetent.

<b>alpha 8 + patch:</b>
sounds the same. (appears to me)
all the time the machine plays the luffing sound, game begins to stutter.
before ALL single gun sounds go BOOM, theres a brief pause...
ALso the "fire guns AAAAArgH!!!" or what sound.

This what I did found out. You know the difference between this two versions,
but their behaviour appears totally different.

I hope I can help with this information.
alpha 8 is SOOO GOOD, that I cant wait to play it without stutter!!!!
<img src="style_emoticons/<#EMO_DIR#>/keith.gif" style="vertical-align:middle" emoid=":keith" border="0" alt="keith.gif" />


Edited2:
The problem is maybe in the sound.h or sound.c I found some difference in the versions.
But I cant see any first-sight problem, nor Im aware of the full functionality of the system.

Im not going to try to swap back to the alpha 6 version, as KK added a way to put another type of variable call with a funtion as the name of a sound, so im 100% sure that its incompatible.

Edited3:

In the alpha 8 + patch version, the new name selecting function: string Sound_GetName(string name)
Is a monstre big calculation as it seems. Calling before all sound played may result in time loss, but
im not sure:

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->string Sound_GetName(string name)
{
    aref SoundsRef;
    string aliasName = "Sounds_Alias";
    int sidx = FindSounds(name);
    if (sidx >= 0) {
        makearef(SoundsRef, Sounds_Alias[sidx].files);
    } else {
        sidx = FindGreetings(name);
        if (sidx >= 0) {
            makearef(SoundsRef, Greetings_Alias[sidx].files);
            aliasName = "Greetings_Alias";
        } else {
            sidx = FindTalks(name);
            if (sidx >= 0) {
                makearef(SoundsRef, Talks_Alias[sidx].files);
                aliasName = "Talks_Alias";
            } else {
                return name;
            }
        }
    }

    int num = GetAttributesNum(SoundsRef);
    string lnode = "l" + (rand(num - 1) + 1);
    if(!CheckAttribute(SoundsRef, lnode))// MAXIMUS: FOR TESTING -->
    {
        aliasName = aliasName+"["+sidx+"].files."+lnode+".name";
        traceandlog("WARNING: sound "+name+" ("+aliasName+") not exist, or not properly added into alias");
        return "INTERFACE\notebook.wav";
    }// MAXIMUS: FOR TESTING <--
    return SoundsRef.(lnode).name;
}<!--c2--></div><!--ec2-->

I really wish to find out fast <img src="style_emoticons/<#EMO_DIR#>/sad.gif" style="vertical-align:middle" emoid=":(" border="0" alt="sad.gif" /> but yet I cant.
Its just seems to me a really big calculation before each soundplay.

Which is very useful, im sure, and a required change, just takes alot more resource as the simply variable -name- did earlier.
But im not sure that this is the problem.
 
You could very well be right that the stuttering is caused by the sounds playing. Strange thing is that the sound system was rewritten to prevent a problem, but this caused the cannon fire sounds to be too faint, so this was reverted again. So the cannon fire sounds should not use the new sound system, so should not cause lag. But it does. <img src="style_emoticons/<#EMO_DIR#>/modding.gif" style="vertical-align:middle" emoid=":modding" border="0" alt="modding.gif" />
 
Ohmygod...

But the sounds of alpha 6 seems totally fine.

(maybe I only say this bcause of the desperate dispair to sail with alpha 8 stutterfree)

Maybe im wrong, that the soundref retrieving causes the long pause, but anyway, it would be good to others look at it, who are familiar with the sound system.

<img src="style_emoticons/<#EMO_DIR#>/keith.gif" style="vertical-align:middle" emoid=":keith" border="0" alt="keith.gif" />
 
That'd probably be Pirate_KK. But his computer is rather crappy, so he can't even tell the difference between stuttering and not stuttering. <img src="style_emoticons/<#EMO_DIR#>/modding.gif" style="vertical-align:middle" emoid=":modding" border="0" alt="modding.gif" />
 
If I'm reading this code right, previously the luffing sound would just play one of 3 sail sounds. Now it has to search through 900 alias entries before deciding to play a sound that I didn't intend to be aliased. If you're getting bad lag on that, imagine what firing 100 cannons would be like. It must be awful. I get some lag on cannons firing, but it's not severe.

I'm going to do some more checking and run a few tests to see if this can be eliminated.

Hook
 
Solution partially found.

The:

string Sound_GetName(string name)

function called every time a sound is played, to search for the sound, IF the given soundname cant be found (???) (it should be done elsewhere, not right in the middle of a full broadside fire..)
I suspected it may cause lag.
Its a very great calculation.

As a very radical experiment, I changed it to be like this:

<!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->string Sound_GetName(string name)
{

return name;

}<!--c2--></div><!--ec2-->

<img src="style_emoticons/<#EMO_DIR#>/biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /> to simply give back, what it received. As before there wasnt any function call, the game played the sound with thze simply string: name.

<b>RESULT:</b>
Sounds play well, ALL stuttering stopped. Not present in gunfire, not in flapping sound,
AND!!!!!!!! When you open fast traveling, and selecting between options, and it clicks, NOTHING make any lag, or pause.
Tried alot of sounds, none of them lags anymore.

<b>SIDE EFFECT: </b>
All character sounds, or any seemingly selected language related sounds wont play ^^

+ + +

It appears, that YES, this function caused the lag, but the "function" of this function to find cetain language related files.
BUT:
It only can be done, if we somehow make sure, that the lagging calcuation, this "file searching" between languages ONLY take places, when it plays a sound, where a searching lag is acceptable, such concersations, etc.

Gunfire, clicking sounds, sail luffing, and the sounds while sailing CANT accept this mutch searching work before each sound.

With the radically removed search, all sounds play very smooth. But we need a way to find the language related files again... And somehow let the "fast" needed sounds out of it, no?

^^

<img src="style_emoticons/<#EMO_DIR#>/keith.gif" style="vertical-align:middle" emoid=":keith" border="0" alt="keith.gif" />
 
That's an AMAZING discovery, Captain Dan! It's not a solution yet, but it sure as hell is a good start! <img src="style_emoticons/<#EMO_DIR#>/me.gif" style="vertical-align:middle" emoid=":onya" border="0" alt="me.gif" />

There's three different ways of playing sounds:
1) Direct play referencing the WAV file itself (shouldn't cause lag, I think)
2) Play from INI file (original stock game version)
3) Play from new sound file system

The reason #3 was added was because the INI system doesn't support infinite amounts of sounds and sounds start dropping out if too many are added. However, the new system causes the lag and therefore isn't quite ideal either.

It would be nice if we could either get rid of the lag in option #3 or else make different calls for sounds played with system #2 or with #3. I think now both systems use the same call. That way we could choose which sounds are acceptable to have lag and which ones don't.

Alternatively, we can just use system #1 altogether. It wouldn't be sophisticated, but it'd work. And it wouldn't hurt either, except for sounds that need to be translatable. Since those are a limited amount and usually played only once as a greeting or so, we could use #2 or #3 for those.

Better suggestions and solutions welcome. <img src="style_emoticons/<#EMO_DIR#>/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" />
 
By the way, this alias searching seems waaay to mutch for me. It appears, that my experience only makes the language related files to disappear.

Why not do this by putting each different version into nationally named folders, and we could simply just add the stored selected nationality string into the path of the language file.
No search needed.

Correct me If I miss someting here.

Edited:
Then we just need to make Directplay everything, no?
You cant afford to search for a file, while fighting a 3d rendered battle.

Huh, these aliases, even lagging clicking sounds..
 
Back
Top