Jump to content

Lags...


maleg
 Share

Recommended Posts

Mar 15, 2015 (16411P-release) from package.


The problem is manifested, regardless of the map and manifests itself as a local game and the game in multiplayer.

Specifically, this log was placed on the "Corinthian Isthmus (2)" local game vs AI.

But same problem occurs in "Caspin Sea 2v2" local game with 3 AI.


I think that this problem should have highest priority.


File commands.txt will not be able to found, because too many games played.

Link to comment
Share on other sites

4 hour games? I don't think I ever played that long.

Anyway, if there's suddenly a huge lag spike, and it doesn't go away again, that's normally because of the pathfinder (which is being worked on). Currently, the ai doesn't get a lot of feedback from the pathfinder, so it tries to calculate paths again and again when it's stuck.

A quick and dirty solution for this is going via the developer overlay (ALT+D). Reveal the map, and enable the checkbox to control all units. Then look for where it's stuck (usually some big units like rams or elephants). If you delete these stuck units (or the reason why they're stuck), the lag should go away again.

It also helps to play on open maps instead of maps with a narrow passage.

Link to comment
Share on other sites

Hi maleg. Thank you for reporting. I am also concerned about lag from path finding problem.

You can find commands.txt by date and time you played. Open C:\Users\your_account_name\AppData\Local\0ad\logs\sim_log and you will see many folders but the timestamps are the end of games so you can distinguish them easily.

And you can open those files by text editor and you can read map names and match settings etc. like following:

start {"mapType":"skirmish","map":"maps/skirmishes/Acropolis Bay (2)","settings":{"CircularMap":true,"Description":"Each player starts the match atop a large flat plateau, otherwise known as an acropolis.\n\nTo the East lies a large bay with fishing opportunities. To the West is a rugged hinterland with an unclaimed acropolis commanding the valley below.","GameType":"conquest","Keywords":[],"LockTeams":false,"Name":"Acropolis Bay (2)","PlayerData":[{"Name":"Player 1","AI":"petra","AIDiff":3},{"Name":"Player 2","AI":"petra","AIDiff":3}],"Preview":"acropolis_bay.png","RevealMap":false,"mapType":"skirmish","AISeed":0}}turn 0 200

With commands.txt we can replay the game and it would help the development . But multi player games are hard to replay for me, so single player games are appropriated.

Edited by kanetaka
  • Like 2
Link to comment
Share on other sites

Now I replayed it and took the profile. Let's take a look.

The replay was took on Windows 8.1, Core i3 1.8GHz, RAM 4GB.
post-16163-0-30281400-1429207121_thumb.j
X axis plots 1 / 20 number of turns and Y axis plots milliseconds per frame. In ideal situation, one turn equals 200ms in single play and one frame equals 16.7ms at 60 Hz frame rate. Thus 34:50(2090sec) should be Turn 8320, which equals 416 in X axis.
The total never exceeded 200 ms, but this is a replay so it doesn't include any graphics at all. On my machine, the total almost always exceeds 16.7ms, means I can't expect 60 FPS anytime.

At 416, I can't find any prominent peaks. I guess there were temporal lags before 34:50 so actual 34:50 was somewhat earlier.

At 379, FindEconomicCCLocation stands up to 97.98ms and ComputePath makes plateau from 384 to 392. From these heavy load the total constantly exceeds 100ms so I conclude 34:50 was around 379.

Maybe total simulation update should not exceed 100ms per turn.

http://trac.wildfiregames.com/wiki/EngineProfiling

post-16163-0-30281400-1429207121_thumb.j

maleg's_profile.txt

  • Like 3
Link to comment
Share on other sites

Yes, it could be. The long path finder knows they have to detour, but the short path finder has a fixed sight range and when the units get close to the goal, they switch path finder from long one to short one then they forget to detour.

You can set way points to work around by shift crick.

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...