Barbarian buildings looking strange when covered by fog of war

Bug #731474 reported by Hans Joachim Desserud
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Medium
Nasenbaer

Bug Description

I have discovered a few more buildings that changes appearance when in the fog of war, like in bug 657269. This time the barbarian well and sentry are affected. I think this may also affect other buildings (possibly the granite mine?) as well. So far I've found these buildings by observing what the AI player has built close to the border, but it's not really an effective strategy. Is there some tool or method which could be used to view how all buildings look in the fog of war? Perhaps set up a single map with all buildings shrouded in the partially hidden fog of war? It would make it a lot easier to spot errors such as these, if all the buildings are lined up and check they are shown the way they should, rather than fixing them up as they are discovered.

The following buildings are affected:
barbarians:
warehouse (fixed in bug 657269, but regressed)
well
sentry
barrier
donjon
lumberjack's hut
ranger's hut
granite mine
coal mine
gold mine
iron ore mine (only assumed based on the other mines)
helm smithy
battle arena

empire:
tower

atlanteans:
???

Tags: graphic vision

Related branches

Revision history for this message
Hans Joachim Desserud (hjd) wrote :
Changed in widelands:
importance: Undecided → Medium
Revision history for this message
Chuck Wilder (chuckw20) wrote :

It would appear that, while in the fog of war, only the first build frame is being displayed for military (sentry) and non-military (well) barbarian buildings that have build animation.

Has anyone noticed this with Atlantean or Empire buildings that have build sequences? (Of course there aren't many of those yet.) ;)

Revision history for this message
Venatrix (elisabeth) wrote :

Same problem with the barrier.

Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Venatrix: Thanks for your addition. Though, since two tribes have a building by that name, did you mean the barbarian or empire barrier?
-
I really hope this could be sorted out before build16, as it gives a rather strange effect. However, if it is too late, it is too late. :)
Oh, and thought I'd link to the revision fixing bug 657269 (http://bazaar.launchpad.net/~widelands-dev/widelands/trunk/revision/5586)

Changed in widelands:
milestone: none → build16-rc1
Revision history for this message
Venatrix (elisabeth) wrote :

Sorry, wasn’t aware, that the Empire has a barrier, too. I meant the barbarian one.

Revision history for this message
Chuck Wilder (chuckw20) wrote :

I haven't tested this, but I would wager that we would see this anomaly with any building that has build animation, regardless of tribe or military status.

Revision history for this message
Nasenbaer (nasenbaer) wrote :

This is a bit more complex (see below). Although the current status is slightly ugly, I would prefer to keep it as it is in build16 and retarget the bug for build17. (Especially as I again found out, how fast a one line code change - that looks basically fine - can break the whole game ;) )

the interesting code is in src/graphic/render/gameview.cc:385ff - at least I think so - code documentation is unfortunally quite rare.
However, if I am right and this is the point where fogged stuff is drawn, the problem seems to be, that there is no special casing (okay there is one for flags, but that's it - buildings are basically handled the same as trees or other map objects - but there should be a check for buildings and if the object is a building, it should be checked in which state it is.

Changed in widelands:
status: New → Confirmed
Revision history for this message
Nicolai Hähnle (nha) wrote :

I agree with Nasenbaer about retargetting to build17. In my opinion, the proper fix would be to remember the exact state the building was in when we last saw it, as far as visible properties are concerned, including which animation was playing (for future occupied vs. non-occupied visual distinction, for example).

Changed in widelands:
milestone: build16-rc1 → build17-rc1
Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Ah, I initially targeted it for build16 based how previous bug with the warehouse was fixed in a fairly short time.
Nicolai's suggestion is probably the best fix, so I have no objections against retargeting it.

Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Discovered the barbarian ranger's huts and lumberjack's huts are affected as well.

description: updated
Revision history for this message
Hans Joachim Desserud (hjd) wrote :

I noticed the same problem with one Atlantean building. Unfortunately I first discovered the building was partially shown when it fell into the fog of war, and when I conquered the nearby military building it was destroyed. It *might* have been the gold weaver, but I'm not familiar enough with the Atlanteans to know for certain.

description: updated
description: updated
Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Group picture of a barbarian helmsmithy, battle arena, donjon, and a warehouse among others. Notice that the warehouses are also displaying weirdly even though they were fixed. And I'm fairly sure I checked if they were fixed as well. Perhaps a regression?

Revision history for this message
Hans Joachim Desserud (hjd) wrote :

An image of the mines show that the barbarian gold, coal and granite mines are all affected as well. Unfortunately there weren't any iron mines around, but I assume those are affected as well. Though from what I can see the deep coal mine (with red ring) does not seem to be affected.

description: updated
tags: added: barbarians
description: updated
tags: added: atlanteans empire graphic
Revision history for this message
Nasenbaer (nasenbaer) wrote :

Don't get me wrong, but it is a waste of time to post more buildings. All we need is one case to check whether a fix works as it should (so we need just one building) as the problem occurs independent from buildings - the only reason it does not appear on most of the buildings is, that those buildings use their idle picture as build animation.

Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Ok, I see. I haven't been actively searching for buildings affected, just noted it down if I did spot it while playing, and remembered it afterwards. :)

Nasenbaer (nasenbaer)
Changed in widelands:
assignee: nobody → Nasenbaer (nasenbaer)
Nasenbaer (nasenbaer)
tags: added: vision
removed: atlanteans barbarians empire
Nasenbaer (nasenbaer)
Changed in widelands:
status: Confirmed → In Progress
Revision history for this message
Nasenbaer (nasenbaer) wrote :

fix finally committed in rev, 6026 and 6027

Changed in widelands:
status: In Progress → Fix Committed
Revision history for this message
Nasenbaer (nasenbaer) wrote :

for the record: older savegames will still behave the old way until the hidden buildings are unhidden for at least a short time - that's simply because the old save games do not contain the state of constructionsites.

Revision history for this message
SirVer (sirver) wrote :

Released in build17-rc1.

Changed in widelands:
status: Fix Committed → Fix Released
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.