Aller au contenu

Photo

Solving the combat lag issue.


  • Veuillez vous connecter pour répondre
9 réponses à ce sujet

#1
dan_upright

dan_upright
  • Members
  • 39 messages
I've reason to believe this issue (described below) is a scripting one and therefore might be fixable with a mod.

The issue, for anyone not having it, is that in a fight with more than a dozen or so participants, combat events get increasingly delayed over time. It's not a problem with the overall game performance - framerate is fine, interface is responsive and even moving around continues to work in real time. Only events that have an effect on creatures get slower.

For example, if you give an attack order, your character will move to the target mob immediately and start performing attack animations, however there'll be no health changes or damage numbers until much later. Similarly, if you cast a spell, you'll see the projectile fly to the target, but the effect will be delayed. (Fireball is the easiest to see this with, the projectile vanishes then later on there's an explosion).

It looks to me like there's an event queue being overloaded and causing a backlog, but I couldn't say exactly where.

Anyone got any ideas on what might be up?

#2
thirsty4blood

thirsty4blood
  • Members
  • 2 messages
I've got this same problem.

Although I barely even noticed it until i got to the final stages, where there are a ton of enemies and allies everywhere, right before the fight with the archdemon, when you have to fight your way through Fort Drakon.

If there is something other than the comp stats causing this please inform us of a way to solve this problem.

thanks

#3
Dymiceasaharasiu

Dymiceasaharasiu
  • Members
  • 4 messages
Got the same problem, its reached the point now where I can no longer play the game. I'll spam heal, group heal, regen and my teammate still dies because the combat lag wasn't letting the heals heal her. This is unacceptable and is NOT a hardware problem. As the OP said, everything else runs fine, but its just the combat that does it. I have even reduced the game settings AND my card settings, closed background programs down to the point where the game looks like something from 1999... and it sill has combat lag. I refuse to beleive this is a hardware problem and its my fault. That is a cheap and lazy response. I think if I shell out 60 bucks for a game it can atleast... ya know... work. Just maybe. Also I love how this issue is getting ZERO attention from Bioware. GG... excuse me... Bad game...

#4
bejopa79

bejopa79
  • Members
  • 3 messages
im also having this problem....so bump


#5
Peeker2009

Peeker2009
  • Members
  • 108 messages
Ditto. It's not game-breaking for me, but then I played nwn on dial-up for years and became a lag specialist :P

#6
Racca12

Racca12
  • Members
  • 42 messages
I as well had this issue. I don't believe you can rule out computer performance completely, because I turned all my graphics setting to the minimum, and the lag improved slightly.



However, it was still very much present. This I felt was a huge problem, as usually enemies attacks were stacked well beyond what I could do to compensate.



I would love to see this problem fixed.

#7
anakin5

anakin5
  • Members
  • 258 messages
Because I did some stuff in AI scripts, I would like to explain what I have seen without being pretentious.
Even if Bioware take care of this problem, I am not sure they look at what a little modder can find in scripts. Anyways, I will take the opportunity of this thread to say what I want to say.

What follow is an example to illustrate what I am talking about, I have got a dozen of such example.
I didn't say the following things is the cause of lag in large battle, I am just saying that it can contribute. And I am saying that I found enough things like this to contribute enough to have lage in large scale battles.

Look at this part of code (I removed comment for lisibility):

object oCurrent;
float fDistance;
float fEnemyDistanceToMainControlled;
int j = 0;
for(i = 0; i < nSize; i++)
{
    oCurrent = arEnemies[i];
    fDistance = GetDistanceBetween(OBJECT_SELF, oCurrent);
    if(IsFollower(OBJECT_SELF))
    {
        fEnemyDistanceToMainControlled = GetDistanceBetween(oCurrent, GetMainControlled());
        if(fEnemyDistanceToMainControlled > fFollowerMaxEngageRange)
        {
            if(nCommandType == AI_COMMAND_ATTACK && IsUsingMeleeWeapon(OBJECT_SELF))
            {

            }
            else if(nCommandType == AI_COMMAND_USE_ABILITY && GetM2DAInt(TABLE_ABILITIES_SPELLS, "Range", nCommandSubType) == 1)
            {

            }

            break;
        }
    }

    if(nCommandType == AI_COMMAND_USE_ABILITY)
    {
        if(Ability_IsAbilityActive(oCurrent, nCommandSubType))
            continue;
    }
    else if(Effects_HasAIModifier(oCurrent, AI_MODIFIER_IGNORE))
        continue;

    arEnemiesFinal[j] = oCurrent;
    j++;
 }

nSize = GetArraySize(arEnemiesFinal);

return arEnemiesFinal;


It is located at the end the function called _AI_GetEnemies which is on of the most called function of creatures AI systems. It create a list of nearby enemies.
Anyways, there is this :
float fDistance;
then there is (inside of the for loop)
fDistance = GetDistanceBetween(OBJECT_SELF, oCurrent);
then ......... nothing

yes, this call to GetDistanceBetween in the loop is made for nothing. The variable fDistance if not used after that. Comment the 2 lines that talk about fDistance, and you save 0.01 ms in each call of _AI_GetEnemies (may be).

want on other one ?

Modifié par anakin5, 17 décembre 2009 - 01:08 .


#8
huldu

huldu
  • Members
  • 24 messages
I have *insane* combat lag. Just got to redcliffe during night and it was taking me ~10 seconds to even start attacking. You click on the ability, the combat animation plays just fine, but nothing happens for several, several seconds.

#9
Racca12

Racca12
  • Members
  • 42 messages
Is this issue being considered? I find it extremely frustrating when it happens.

#10
orgo.love

orgo.love
  • Members
  • 33 messages
If I may mention, I have a Intel centrino duo 2.6ghz with 4gb ram, and a mod that gives you a maximum of 25 summons. I haven't experienced any significant combat lag.