Annoying stuttering in large battles, with no obvious cause.

Users who are viewing this thread

(With the latest version of Warband, through Steam.)

I've edited the config file to allow larger battle sizes, but battles over ~300 soldiers large seem to have about a 50% chance of giving me a strange stuttering effect.

What happens is that every four or five seconds, the game will just freeze for maybe a quarter to half a second. The FPS counter reflects this as a six FPS drop (so if I've set max FPS to 60 then the counter will suddenly drop to ~54, if it's set to 30 it'll drop to ~24, et cetera) for that fraction of a second.

Except for this one problem, large battles run perfectly; except for the momentary stutters they run just as smoothly as a 1 vs 1 battle. I would chalk the problem up to the limitations of the game engine, but I've seen youtube videos of people with similar (and slightly weaker) hardware setups running even larger battles without difficulty.

System:
 
Operating System: Windows 7 Ultimate 64-bit
Processor: Intel Core i7-2600K CPU @ 3.40GHz
VPU: Radeon HD 6970, slightly overclocked.
RAM: 16GB
Page File: 3638MB used, 28950MB available
DirectX 11

Game is installed on an SSD.

Config:
first_time = 0

texture_detail = 100

render_buffer_size = 2000----NOTE: I saw in an older topic that increasing this might help, but I couldn't find a definitive answer as to what exactly this is (although presumably it's either vRAM or RAM in megabytes). I've tried it at 500, 1000, and 2000 (the last one hoping it's RAM), with seemingly no effect.

max_framerate = 31

start_windowed = 0

use_pixel_shaders = 0

use_vertex_shaders = 1

fake_reflections = 1

show_framerate = 0

use_ondemand_textures = 0

use_ondemand_textures_mt = 0

disable_music = 0

disable_sound = 0

disable_frequency_variation = 0

cheat_mode = 0

enable_blood = 1

enable_edit_mode = 0

force_single_threading = 0

debug_mode = 0

display_width = 1920

display_height = 1080

display_bits = 32

antialiasing = 0

sample_quality = 0

alpha2coverage = 0

force_vsync = 0

shadowmap_quality = 0

shader_quality = 0

postfx_dof = 0

postfx_hdr = 0

postfx_autoexp = 0

flora_degrade_distance = 150.0000

flora_lod_detail = 2

use_instancing = 1

use_secure_connection = 0

max_number_of_connections = 16

look_for_server_on_this_machine = 0

music_volume = 0.2775

sound_volume = 1.0000

mouse_sensitivity = 0.5000

invert_mouse = 0

enable_lighting = 1

enable_particles = 0

enable_blood = 1

enable_character_shadows = 1

enable_accurate_shadows = 1

number_of_corpses = 0 (No change from max corpses to zero corpses.)

grass_density = 100

combat_speed = 2

friend_combat_difficulty = 2

adapter_format = 0

reduce_combat_ai = 1

reduce_campaign_ai = 1

combat_difficulty = 2

display_labels = 1

display_targeting_reticule = 1

display_attack_direction = 0

turn_camera_with_horse_in_first_person = 2

verbose_damage = 1

verbose_shot_difficulty = 1

battle_size = 9.0000

attack_direction_control = 2

defend_direction_control = 0

lance_control = 0

anisotropic_filtering = 1

enable_environment_shadows = 1

verbose_casualties = 1

verbose_experience = 1

realistic_shadows_on_plants = 0

number_of_ragdolls = 0

gamma = 2.2026

character_detail = 1.0000

character_shadow_detail = 1.0000

control_mouse_movement_y_scale = 1.5000

blood_stains = 2

use_winmm_audio = 0

enable_version_check = 1

enable_aspect_ratio_control = 1

realistic_headshots = 0

auto_gfx_quality = 0

Also, regardless of battle size or stutter, the game has never gone beyond ~60% usage of one CPU core, nor does it strain my GPU. I've tried reducing every graphical setting to minimum (and even directx 7) but the stuttering persists, even though the system load reduces by a fair margin.


I've tried:
1. Reducing graphical settings.
2. Reducing max FPS.
3. Installing an older version of Warband.
4. Turning on VSync.
5. Locking to a single thread.
6. Setting affinity off core 0 and then on again (which apparently fixed someone else's issue, but I have no idea how).
7. Direct X 7 (the game makes my GPU run about as hot as a youtube video regardless, so no surprise this did nothing.)
8. Replacing the 906kb sceneobj files with their 1kb counterparts, as suggested by an older thread.
9. Turning off pixel shader.
10. Turning ON load textures on demand, turning OFF load textures on demand, and increasing the render buffer size.
11. Forcing triple buffering through my GPU control center, with VSync both forced on and forced off.
12. Begging.
13. Pleading.


PS: I just tried Floris (Expanded) out of curiousity, with a custom Oasis battle of 200 vs 200. Now, on Native, a battle of this size in Oasis runs absolutely perfectly, but on Floris there's the stuttering issue. But when I die, the stuttering completely goes away---I can  move the camera freely around and watch the whole battle no problem. CPU and GPU usage with Floris (on Ultra High graphics settings) are ~60% and ~70% when both armies clash, with no change when my character dies and the stuttering vanishes.

PPS: I also just went back to some of my Native savegames from right before stuttering battles to see if anything else was amiss, and in one of them all AI allied troops did NOTHING except walk around the entire battlefield in a gigantic square, 'holding position'. Individual soldiers would fight only if engaged.  This is strange, but probably an unrelated issue.
 
Tylerb7 said:
PS: I just tried Floris (Expanded) out of curiousity, with a custom Oasis battle of 200 vs 200. Now, on Native, a battle of this size in Oasis runs absolutely perfectly, but on Floris there's the stuttering issue. But when I die, the stuttering completely goes away---I can  move the camera freely around and watch the whole battle no problem. CPU and GPU usage with Floris (on Ultra High graphics settings) are ~60% and ~70% when both armies clash, with no change when my character dies and the stuttering vanishes.
This is unrelated to Native issues--keep it to the Floris board.
(You are seeing this because of the increased in-battle calculations of the additional formations/new battle AI--the calculations can be CPU intensive and are exponential vis-a-vis battle size--optimization awaiting the script enhancer's update to 1.153)


As for the rest, the Warband engine isn't optimized for the newest hardware. It is long standing that folks with comparatively "weaker" systems can sometimes get better results than someone with all the newest bells and whistles; this is documented multiple times across this board. The one thing I would suggest is that you ensure that Warband is actually getting access to your RAM and that Steam hasn't stuck it in compatibility mode. Check both the Steam .exe and the mb_warband.exe and be sure compatibility mode is off. You can also double check by looking in the rgl_log.txt (in the Warband install folder, not the config file in Documents) and be sure that Warband is reading your system correctly. If you want more assistance, I'd recommend pasting the contents of that file here.
 
This is unrelated to Native issues--keep it to the Floris board.
(You are seeing this because of the increased in-battle calculations of the additional formations/new battle AI--the calculations can be CPU intensive and are exponential vis-a-vis battle size--optimization awaiting the script enhancer's update to 1.153)

Sorry, I thought it might be relevant. I was assuming that any additional scripts Floris added would still run after player death, since you can optionally decide troop tactics for when you're knocked out of the battle. So I thought perhaps dying in Native might also for some reason make the stuttering vanish, except of course Native doesn't let you stick around to watch.




As for the rest, the Warband engine isn't optimized for the newest hardware. It is long standing that folks with comparatively "weaker" systems can sometimes get better results than someone with all the newest bells and whistles; this is documented multiple times across this board. The one thing I would suggest is that you ensure that Warband is actually getting access to your RAM and that Steam hasn't stuck it in compatibility mode. Check both the Steam .exe and the mb_warband.exe and be sure compatibility mode is off.

The hardware thing makes sense, and I've seen it in plenty of other games. Compatibility mode was off.


You can also double check by looking in the rgl_log.txt (in the Warband install folder, not the config file in Documents) and be sure that Warband is reading your system correctly. If you want more assistance, I'd recommend pasting the contents of that file here.

Log:
Starting new log file.
Version:  1.153

[System info, all as expected]

Received stats and achievements from Steam

Processing Ini File {
...
} //Processing Ini File Finished
Loading Music...
Loading Textures...
Finished Loading Textures...
L8 Format is  unsupported
WARNING: UNABLE TO MAP SOUND CODE:  snd_release_crossbow_medium
WARNING: UNABLE TO MAP SOUND CODE:  snd_release_crossbow_far
WARNING: UNABLE TO MAP SOUND CODE:  snd_bullet_hit_body
WARNING: UNABLE TO MAP SOUND CODE:  snd_player_hit_by_bullet
WARNING: UNABLE TO MAP GAME PRESENTATION CODE:  prsnt_game_start
WARNING: UNABLE TO MAP GAME PRESENTATION CODE:  prsnt_game_escape
WARNING: UNABLE TO MAP GAME SCRIPT CODE:  game_check_party_sees_party
WARNING: UNABLE TO MAP GAME SCRIPT CODE:  game_get_party_speed_multiplier
WARNING: UNABLE TO MAP GAME SCRIPT CODE:  game_missile_launch
WARNING: UNABLE TO MAP GAME SCRIPT CODE:  game_missile_dives_into_water
Loading Module...
Loading item kinds...
Loading dialogs...
Loading mission templates...
Loading party templates...
loading time:  39087
Finished All...
Loading tracks
load_map_data complete.
Init_map complete.
init_meta_mission complete.
map mesh built.
get_ideal_sun_color.
get_ideal_fog_color.
642 parties added.
launch complete.

[Dozens of 'Saving Game' lines]

Frame# : 142339
Saving options...  OK!
Exiting network manager...  OK!
Deleting resources...  OK!
Exiting physics manager...  OK!

num rt_material : <c: r  11 > / <c: y 122 >

Render Target Format Usages:
A8R8G8B8 :  37 ( 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 <c: r + 2 >  )
X8R8G8B8 :  1 ( 0  )
A8 :  82 ( 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1  )
D16 :  1 ( 1  )
R16F :  1 ( 1  )

Dumping resource usage information:
#Full textures:  0
#RT textures:  124
#RT materials:  122
#RT Memory usage:  58112
Exiting graphics manager...  Non-Zero Reference Count!  OK!

Current Config {
[Config settings]
}

Closing log file... 

It's not a big deal if there's nothing to be done, I was just hoping I could consistently play ~450 man battles. The really annoying thing is that sometimes it'll work perfectly and sometimes it just won't.
 
That seemed like a good suggestion, so I tried a couple of different battle sizes and unit proportions in both custom battles and the campaign;

- None of the custom battles ever had the stuttering issue, not even with 200 vs 200 cavalry colliding in the mountain pass battle map.
- A ~500 man battle in the campaign didn't stutter, with me having 120 cavalry.
- A ~350 man battle did have the stuttering, with me having about 80 cavalry.


What gets me is that I can't identity the bottleneck here. I mean, it isn't even really lagging---so far it's only ever done that in certain mods (Floris) during huge battles, and then only when my view was focused on the giant mass of soldiers fighting. That's just normal slowdown, and I can understand that; but this stuttering is just kind of vaguely related to large battles.
 
Hrm. Might you be seeing the stuttering more in battles later in your play sessions? versions 1.15x should have improved some of Warband's resource handling, but before that is was known to do a poor job of clearing resources once they were through being used.

You might try using this  excellent memory reduction program - (Download: Warband Tamer). It frees up RAM on demand (after battles, etc) hopefully extending your stable play time.
 
I haven't had the time to try that yet, but it did make me realize something I should've noticed immediately: Warband has never used more than 1.5GB of my RAM. So I went to make the exe LAA... but it already was? I was sure I'd identified the bottleneck, but now I'm more confused than ever.

Hopefully the above will circumvent this, if it is the problem.
 
Back
Top Bottom