Improve working area preview

Bug #536473 reported by atrueba
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
widelands
Fix Released
Wishlist
Unassigned

Bug Description

At the time, the working area preview of a building is shown by means of placing small coloured pngs on top of the surfaces it will affect.

I think a fancier way to do this would be to apply a coloured, semi-transparent layer to the surface, so it covers the whole area while letting the user see what's happening under it, and add an opaque border to its outer border. The colour used could be based on the actual player's colour.

Forum discussion: https://wl.widelands.org/forum/topic/1884/

Related branches

Revision history for this message
Sigra (sigra) wrote :

Logged In: YES
user_id=31104
Originator: NO

Yes, I have been thinking along these lines since I first implemented the workare preview. I would like to highlight the triangles somehow in the ground rendering. But it requires moving the activities from nodes to triangles. I have a (not yet finished patch) for moving resources to triangles [https://sourceforge.net/tracker/index.php?func=detail&aid=1681404&group_id=40163&atid=427224]. This will make it possible to highlight triangles for mines, fisher and well. The next thing would be to move ownership to triangles (not just for this reason). That would make it possible to highlight triangles for military buildings. Then I have a request to move objects to triangles [https://sourceforge.net/tracker/index.php?func=detail&aid=1096824&group_id=40163&atid=427224]. If all this is implemented, it would be possible to visualize the workareas by highlighting triangles.

Revision history for this message
SirVer (sirver) wrote :

The original proposal is still interesting. It might be possible to do this when opengl lands. I'll put this on confirmed for now.

tags: added: graphic opengl
Changed in widelands:
status: New → Confirmed
importance: Undecided → Low
importance: Low → Wishlist
Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Thanks for reporting this issue. This was recently reported as bug 898129, which gathered more discussion and suggestions. Please add any future comments or suggestions related to working area preview there. Feel free to report any other issues in the future.

Revision history for this message
cghislai (charlyghislain) wrote :

I closed bug 898129 as the work area preview have been improved. Discussion about another way to render them could continue here.

Revision history for this message
SirVer (sirver) wrote :

Setting to incomplete for bug sweeping.

Changed in widelands:
status: Confirmed → Incomplete
Revision history for this message
Hans Joachim Desserud (hjd) wrote :

Well, there hasn't really been a flood of discussion since the other bug was closed, but this still seems like a really neat idea.

Opengl has landed quite some time ago. I don't know about the stuff about triangles though, I have seen it mentioned in various bug reports but I don't know the current state of them or whether they are strictly needed for this.

Revision history for this message
GunChleoc (gunchleoc) wrote :

I also think we should keep this bug open - it would enhance the visuals.

GunChleoc (gunchleoc)
description: updated
Revision history for this message
king of nowhere (lainluigi86) wrote :

I don''t like much the idea of a semitransparent layer because it would make it more difficult to see the background; I think visually the current way is the best to convey the information while being unobtrusive otherwise. But the light blue color currently in use is hard to see against the white winter terrains. I suggest changing it to purple or something like that.

Revision history for this message
kaputtnik (franku) wrote :

+1 to king_of_nowhere

Attaching one with green center and one with purple center. I changed also the second border when center is purple.

Revision history for this message
kaputtnik (franku) wrote :
Revision history for this message
kaputtnik (franku) wrote :
Revision history for this message
kaputtnik (franku) wrote :
Revision history for this message
kaputtnik (franku) wrote :

Different coloring of circles

Revision history for this message
kaputtnik (franku) wrote :
Revision history for this message
kaputtnik (franku) wrote :
Revision history for this message
kaputtnik (franku) wrote :
Revision history for this message
kaputtnik (franku) wrote :
kaputtnik (franku)
Changed in widelands:
status: Incomplete → In Progress
Revision history for this message
kaputtnik (franku) wrote :

The linked branch contains 2 new images to show the workarea. As before there are only 2 images used for displaying the workarea, and one image for the buildings menu.

The code actually loads 5 images for the workarea. For the buildings menu is one of this images loaded again. Current state is:

pics/workarea1.png Is used for displaying normal workarea
pics/workarea12.png is used for displaying the workarea of expandable buildings (like empire outpost) but shows only the actual (not enhanced) workarea
pics/workarea2.png is used to show the workarea when the building will be enhanced
pics/workarea123.png is used for the buildings menu (this is loaded twice, one time for workarea and one time for buildings menu)

The following images aren't used at all afaik:
pics/workarea23.png
pics/workarea3.png

I believe it would be good if the code gets changed to reflect the actual (and former) situation. I am feeling not able to do that, so i ask if maybe somebody else could look into this?

I would suggest to load only the 2 relevant images for workarea:
pics/workarea1.png
pics/workarea2.png (used to show the workarea when the building gets enhanced)

and change the code accordingly. The image
pics/workarea123.png

should may be renamed to make it clear that this is only used for the menu.

The other images could be removed i think.

GunChleoc (gunchleoc)
tags: added: ui
Revision history for this message
GunChleoc (gunchleoc) wrote :

I agree that the no longer used images can go in the bin - just run grep over everything first.

Revision history for this message
kaputtnik (franku) wrote :
Revision history for this message
kaputtnik (franku) wrote :
Revision history for this message
GunChleoc (gunchleoc) wrote :

What is keeping this from getting merged? Nobody objected to the last screenshot, so I think we should add this and deal with any fallout later?

Revision history for this message
kaputtnik (franku) wrote :

I am just unsure about the colors. Currently i update the linked branch and after successful compiling i propose it to merge. Maybe we should wait for an appveyor build so that windows users also can test the new coloring.

Revision history for this message
GunChleoc (gunchleoc) wrote :

I think that we will get more testing out of this if we merge this. I'll set this to "Fix Comitted" until we hear some protest :)

Changed in widelands:
status: In Progress → Fix Committed
milestone: none → build19-rc1
GunChleoc (gunchleoc)
tags: added: graphics images
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.