Lumberjack animation glitches

Bug #1480928 reported by Kyromaster
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Widelands media development
Invalid
Undecided
Unassigned
widelands
Fix Released
Undecided
Unassigned

Bug Description

I noticed that the lumberjack animation sometimes is wrong.
The animation when the tree is cut is sometimes displayed two times, sometimes the tree doesn't fall but is fallen in an instant. What could also happen is that a shadow remains from the fallen tree which disappears after some time.

Related branches

Revision history for this message
Kyromaster (kyromaster) wrote :

A savegame which shows the bug. The tree which the lumberjack will cut next has the wrong animation.

Revision history for this message
kaputtnik (franku) wrote :

Thanks,

> The animation when the tree is cut is sometimes displayed two times,

i could confirm this. The other things i didn't noticed yet.

Changed in widelands:
status: New → Confirmed
tags: added: animation graphic
Changed in widelands:
assignee: nobody → Jens Beyer (qcumber-some)
milestone: none → build19-rc1
status: Confirmed → In Progress
Changed in widelands:
assignee: Jens Beyer (qcumber-some) → nobody
assignee: nobody → TiborB (tiborb95)
Revision history for this message
TiborB (tiborb95) wrote :

Alternative design:
Extend the animation (as sequence of images) far beyond expected playtime. The animation would show the very last frame during that added time. So even if playtime gets exceeded by a bit, it would still show the last frame in animation.

No changes in C++ or conf file would be needed that way...

What do you think?

Revision history for this message
GunChleoc (gunchleoc) wrote :

This would surely work, but it would also be a bit hacky and add to the needed space.

Revision history for this message
GunChleoc (gunchleoc) wrote :

I have had a look at Tibor's branch and the concept looks sound to me.

We shouldn't harcode this for the "falling" animation though - maybe best base this on the one_tribe branch now and add an entry repeat = true to the animation's Lua table. It should then be a property of the class in animation.cc, which will then keep serving the last frame to the graphics once the end of the animation has been reached. We should try to keep all the code locally in animation.cc.

Revision history for this message
GunChleoc (gunchleoc) wrote :

Look what I found - an old discussion on animation configuration: https://bugs.launchpad.net/widelands/+bug/800113

Revision history for this message
TiborB (tiborb95) wrote :

Yes, more systematic approach would be better. And ideally by someone more skillfull in this area :)

Revision history for this message
GunChleoc (gunchleoc) wrote :

I am interested in having a look at this - I want to fiddle with the Animation class anyway to see if I can get player color on building buttons. I have a bunch of other bugs to take care of first though.

What we need to do is here to find the place in the Animation class where the animation loops, and make it stick with the last frame. If we take the OneTribe branch as a base, we won't have to deal with the profile constructor anymore, so loading an extra parameter from the Lua init file in the constructor will be easy.

I think it is best to have this in the animation class, because this way it will be completely flexible and moddable.

Revision history for this message
GunChleoc (gunchleoc) wrote :

I have implemented my idea now. I am attaching a map with the 2 types of tress on it for easy testing.

GunChleoc (gunchleoc)
Changed in widelands:
status: In Progress → Fix Committed
Changed in widelands-media:
status: New → Invalid
Changed in widelands:
assignee: TiborB (tiborb95) → nobody
GunChleoc (gunchleoc)
tags: added: graphics
removed: graphic
GunChleoc (gunchleoc)
Changed in widelands:
status: Fix Committed → Fix Released
Revision history for this message
GunChleoc (gunchleoc) wrote :

Fixed in build19-rc1.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.