bugBattle for Wesnoth - Bugs: bug #20324, Choppy movement on fogged maps

Show feedback again

bug #20324: Choppy movement on fogged maps

Submitted by:  B. Lipka <lipk>
Submitted on:  Sun Nov 25 09:16:29 2012  
Category: BugSeverity: 3 - Normal
Priority: 5 - NormalItem Group:  None of the others
Status: FixedPrivacy: Public
Assigned to: J Tyne <jamit>Open/Closed: Closed
Release: 1.11.0Operating System: Linux

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


(Jump to the original submission Jump to the original submission)

Sat Jun 22 20:43:24 2013, comment #8:

Fixed bug #20602 with revision 8b33acca958f1973f760b7749e10758d7fdec426, which should not re-introduce this bug.

J Tyne <jamit>
Project MemberIn charge of this item.
Tue Mar 12 23:34:32 2013, comment #7:

Note that r56169 introduced bug #20602 in trunk.

Ignacio R. Morelle <shadowmaster>
Project Administrator
Sun Feb 3 22:31:14 2013, comment #6:

Looks good now :) Marking as fixed.

B. Lipka <lipk>
Project Member
Sun Feb 3 19:08:49 2013, comment #5:

Easier than creating a separate thread, I just shifted some of the existing delays around. :) The latest version splits fog clearing over a few display frames, rather than trying to squeeze it all into one. Based on your numbers, I think this will be enough to get rid of the choppiness on your system and probably on even weaker systems.

J Tyne <jamit>
Project MemberIn charge of this item.
Sun Feb 3 19:05:24 2013, SVN revision 56169:

Give animations a chance (optional) to progress while fog/shroud clearing occurs.

This should help with bug #20324, maybe fix it.
The chance is optional because there are times when we do not want the delays, such
as when starting a scenario.

(Browse SVN revision 56169)

J Tyne <jamit>
Project MemberIn charge of this item.
Sat Feb 2 12:54:45 2013, comment #3:

Trunk is definitely better than 1.11.1 now, the lag is no more visible for units without movement animation. Animated movements are still much less smooth than in 1.10.5, though. Disabling create_jamming_map doesn't make any difference.

Made some fps measurements, too (all on fogged Sulla's Ruins):
1.10.5 1.11.1 trunk
Idle 50 50 50
Movement 50 20-25 30-35

Since most frames are displayed for 50-100 ms, 30 fps would be perfect if you could make them evenly distributed. Running the fog calculations in a separate thread might solve that, I'm not sure how much work would it take?

B. Lipka <lipk>
Project Member
Thu Jan 31 21:36:33 2013, comment #2:

This might take some back-and-forth to resolve, as my computer is too fast to detect where the time is being spent during these pauses. So to start off, I have committed (r56144) the groundwork for what should be a solution.

The first question is whether or not this makes any difference on the computer that has the pausing. (It might not make a difference yet, but it would be nice to know for sure before delving into stronger measures.)

The second question is how much of the delay is due to "jamming"? If the contents of create_jamming_map() (the first function in actions/vision.cpp) are commented out, leaving a do-nothing function, is the pausing noticeably affected? It really should not be, as jamming is normally only calculated once, before any movement is shown. On the other hand, it is a loop through all units so it should be checked.

Sorry for pushing the testing responsibilities back on the reporter. I've updated the status to "Ready For Test" to indicate whose turn it is. After you've tested, you (or I) can change the status to "In Progress" to indicate it's back to me (or to "Fixed" if this happens to be a total fix).

J Tyne <jamit>
Project MemberIn charge of this item.
Thu Jan 31 21:22:24 2013, SVN revision 56144:

Adjust the timing of when animations are played during movement.

This is (at least) a first step in resolving bug #20324 (choppy movement on fogged maps).

(Browse SVN revision 56144)

J Tyne <jamit>
Project MemberIn charge of this item.
Sun Nov 25 09:16:29 2012, original submission:

Due to the fog changes in the dev branch, units pause on each hex of the route when revealing fogged locations. The lag is clearly visible on a 2@2GHz Core 2 Duo system, with 2GB RAM.

B. Lipka <lipk>
Project Member


(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by shadowmaster (Posted a comment)
  • -unavailable- added by jamit (Updated the item)
  • -unavailable- added by lipk (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue Mar 26 12:37:21 2013shadowmasterOpen/ClosedOpen=>Closed
    Sun Feb 3 22:31:14 2013lipkStatusReady For Test=>Fixed
    Sun Feb 3 19:08:49 2013jamitStatusIn Progress=>Ready For Test
    Sat Feb 2 12:54:45 2013lipkStatusReady For Test=>In Progress
    Thu Jan 31 21:36:33 2013jamitStatusNone=>Ready For Test
    Sun Nov 25 22:26:16 2012jamitAssigned toNone=>jamit
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup