bugBattle for Wesnoth - Bugs: bug #21257, Lagging in Unit Movement

 
 
Show feedback again

bug #21257: Lagging in Unit Movement

Submitted by:  None
Submitted on:  Tue Nov 5 19:04:14 2013  
 
Category: BugSeverity: 4 - Important
Priority: 5 - NormalItem Group: Graphics
Status: FixedPrivacy: Public
Assigned to: J Tyne <jamit>Originator Email: -unavailable-
Open/Closed: ClosedRelease: 1.11.6
Operating System: Mac OS 10.8.5

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 May 10 09:17:00 2014, comment #19:

Marking as fixed as this solution skips the animation as the setting says should happen.

For information purposes, this is related to https://gna.org/bugs/index.php?21883

The original problem appears to be the fog clearing/drawing algorithm uses a lot of CPU, causing the ticks between frames to go up. The game engine then has to deal with this and at some point the fog drawing mechanism should ideally IMO be rewritten in part to make more use of GPU acceleration. Simply moving to SDL 2.0 might also help with fog clearing in general.

David Mikos <coffee>
Project Member
Thu Apr 24 00:51:32 2014, comment #18:

Ok, just reporting that I can no longer reproduce as I did in the video, and I tried a few times with various settings so it looks fixed AFAICT.

Chris Beck <involution>
Project Member
Mon Mar 24 15:04:29 2014, comment #17:

Perhaps the move to SDL 2.0 and the new drawing mechanism will fix the problem later properly.

David Mikos <coffee>
Project Member
Sun Mar 23 18:31:34 2014, comment #16:

Looks more like a band-aid than a solution.

J Tyne <jamit>
Project MemberIn charge of this item.
Sun Mar 23 07:45:18 2014, comment #15:

I've committed that bugfix in c770104621aaa2f8f278438f355eb323bd3a0705

This should solve the specific problem of lagging with fog/shroud and skip AI moves enabled.

I hope Jamit you don't mind the proposed solution.

David Mikos <coffee>
Project Member
Sun Mar 23 01:17:10 2014, comment #14:

A workaround that I have tested for the specific case of lagging with shroud as observer to AI with skip_AI_moves is the following:

in src/unit_display.cpp, make the unit hidden for !animate_ in the "unit_mover::proceed_to" function and then in unit_mover::finish set u.set_hidden(was_hidden_);

This will remove all the in-between lagging frames from the unit movements.

David Mikos <coffee>
Project Member
Sat Dec 21 22:12:00 2013, comment #13:

Hmm well, I switched to a branch which I had made a few weeks ago and played a game, I observed the lagging only under AI turn this time, and not on the human's turn. So I may not have remembered correctly, despite my previous post just before this one.

I'll check if I can reproduce it whenever this issue in master with clicking on units gets resolved.

Chris Beck <involution>
Project Member
Sat Dec 21 21:32:48 2013, comment #12:

When I first posted, I observed the same trailing effects happening for human and AI turns. I can't reproduce that right now though, because in the current version of master its not possible to move units by clicking on them, and its been this way for some time. I could compile an older commit and make a video with that but I'm not sure how valuable that would be.

Chris Beck <involution>
Project Member
Sat Dec 21 20:32:37 2013, comment #11:

The video shows animation problems during the AI's turn with the option to skip AI moves selected. With those two details, I can see similar symptoms on my machine.

However, I am uncertain if fixing what I see will fix the originally reported problem. No one had mentioned something along the lines of "only during AI turns", so I would have to assume the people reporting this issue were seeing it during anybody's turn. (In fact, comment #2 suggests that it did happen during a human player's turn.) While skipping AI moves could be considered the ultimate in accelerated speed, there are differences behind the scenes. So I'll mark this as "confirmed" for now, but there is no guarantee that a fix will fix all the problems reported.

J Tyne <jamit>
Project MemberIn charge of this item.
Sat Dec 21 20:01:35 2013, comment #10:

Here's a link to a video capture showing the lagging.

https://drive.google.com/file/d/0B54Q-3UjP5fibkFnSUlDS3gxeU0/edit?usp=sharing

Chris Beck <involution>
Project Member
Sat Nov 30 18:11:29 2013, comment #9:
  • i realized I forgot to post my version. build from source, cloned from github repo wesnoth-old, 1.11.7. I think using commit dated from Nov 23 or so.
Chris Beck <involution>
Project Member
Sat Nov 30 04:50:25 2013, comment #8:

I'm attaching an ai test scenario I have been using, this one configured to use default ai.

When the save game starts, grunts controlled by ai will immediately attack elves. Any time one of the ai units moves I will see copies of its base frame trailing behind in any hex it moved through. These copies will persist until the unit is done performing its attack.

(file #19398)

Chris Beck <involution>
Project Member
Sat Nov 30 04:32:14 2013, comment #7:

I get the same issue on my machine, at any speed, with accelerated speed on or off. Running Linux Mint 15 Olivia.

I get it on any scenario it seems. I can paste a specific one if you want.

Chris Beck <involution>
Project Member
Thu Nov 14 01:31:21 2013, comment #6:

x16, i guess the fog calculation is just slow and maybe your version is just better optimised so you don't see it.

Anonymous
Wed Nov 13 23:59:58 2013, comment #5:

What speed? I tried 0.5, 2, and 16, and all looked fine.

J Tyne <jamit>
Project MemberIn charge of this item.
Wed Nov 13 15:55:19 2013, comment #4:

i forgot to metion that you have to activate "accelerated speed" in the preferences. (because i have it enabled by nearly always)

Anonymous
Wed Nov 13 06:23:11 2013, comment #3:

Still does not reproduce for me. (So I am still relying on clear, detailed reports of symptoms from others.)

But I guess we have ruled out an OS-specific issue, since it's now been reported with Mac and Windows.

J Tyne <jamit>
Project MemberIn charge of this item.
Tue Nov 12 23:02:21 2013, comment #2:

i have the same problem on and the result is, that i nomrally turn the fog off via debug mode in scenarios. (that might result in having less fun).

win7, 4gbram, 2.6GHz, quadcore not very new but should be enough for wesnoth.
to reproduce:
play "Hammer of Thurgistan". Turn fog on via debug mode. Move the bird-rider as far as possible in right direction.

Anonymous
Fri Nov 8 02:07:51 2013, comment #1:

System specs? Newish computer? Oldish?

How is the animation, if you ignore the extra base image?

What did you do before taking the screen shot? Who moved? From where? To where? (This type of screen shot is a lot more informative when it is accompanied by a description of what exactly you were doing. By itself, it shows nothing wrong, since it could very well be showing five archers and three scouts.)

J Tyne <jamit>
Project MemberIn charge of this item.
Tue Nov 5 19:04:14 2013, original submission:

In Wesnoth 1.11.6, whenever shroud/fog is enabled, lagging in unit movement is observed. There are displays of the unit base image in every hex the unit passes to reach the 'go to' hex. A screenshot is attached to show what I mean.

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #19398:  G4.ai-1.gz added by involution (76kB - application/gzip - 1.11 replay with an Ai player, to demonstrate trailing movement.)
file #19325:  Screen Shot 2013-11-06 at 00.43.13.png added by None (765kB - image/png - A screenshot is attached which provides evidence)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by shadowmaster (Updated the item)
  • -unavailable- added by coffee (Posted a comment)
  • -unavailable- added by involution (Posted a comment)
  • -unavailable- added by jamit (Posted a comment)
  • -unavailable- added by None (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 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed May 28 22:41:10 2014shadowmasterOpen/ClosedOpen=>Closed
    Sat May 10 09:17:00 2014coffeeStatusReady For Test=>Fixed
    Sun Mar 23 07:45:18 2014coffeeStatusConfirmed=>Ready For Test
    Sat Dec 21 20:32:37 2013jamitStatusNeed Info=>Confirmed
    Sat Nov 30 04:50:25 2013involutionAttached File-=>Added G4.ai-1.gz, #19398
    Fri Nov 8 02:07:51 2013jamitStatusNone=>Need Info
      Assigned toNone=>jamit
    Tue Nov 5 19:04:14 2013NoneAttached File-=>Added Screen Shot 2013-11-06 at 00.43.13.png, #19325
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup