Page MenuHomeFeedback Tracker

"doMove" cases severe FPS drop with distance
New, WishlistPublic

Description

doMove command for some reason causes significant FPS drop the further the unit from its destination. I noticed this when was playing with my snakes script. After moving away from initial snake spawn I started experiencing massive FPS drop to the point that it is actually unplayable. I even froze once. Removing doMove command solves the problem.

One other peculiar thing is that if I use BIS_fnc_codePerformance on doMove command, it completes in the same time regardless of the distance. So this must be internal workings of the AI engine.

Details

Legacy ID
1756064169
Severity
None
Resolution
Open
Reproducibility
Always
Category
AI Issues
Steps To Reproduce

Place a yourself and a car in the editor
preview
execute this code to spawn 50 snakes which would autoaim on you:

private ["_civ","_snakes"];
_civ = createGroup civilian;
_snakes = [];
for "_i" from 1 to 50 do {

_snakes set [count _snakes, _civ createUnit [
    "Snake_random_F",
    position player,
    [], 
    20, 
    "NONE"
]];

};
_snakes spawn {

waitUntil {
    {
        _x setVectorUp surfaceNormal getPosASL _x;
        _x doMove ASLtoATL getPosASL player;
        hintSilent str round diag_fps;
        alive _x
    } count _this == 0
};

};

FPS is ok at this point. Get in the car and drive away. After maybe 500m you will notice horrible FPS drop. Now restart the preview and this time remove doMove command. Execute following piece of code:

private ["_civ","_snakes"];
_civ = createGroup civilian;
_snakes = [];
for "_i" from 1 to 50 do {

_snakes set [count _snakes, _civ createUnit [
    "Snake_random_F",
    position player,
    [], 
    20, 
    "NONE"
]];

};
_snakes spawn {

waitUntil {
    {
        _x setVectorUp surfaceNormal getPosASL _x;
        _p = ASLtoATL getPosASL player;
        hintSilent str round diag_fps;
        alive _x
    } count _this == 0
};

};

Drive away and everything is fine.

Event Timeline

Killzone_Kid edited Additional Information. (Show Details)
Killzone_Kid set Category to AI Issues.
Killzone_Kid set Reproducibility to Always.
Killzone_Kid set Severity to None.
Killzone_Kid set Resolution to Open.
Killzone_Kid set Legacy ID to 1756064169.May 7 2016, 6:01 PM
Bohemia added a subscriber: AD2001.Feb 24 2014, 1:55 PM