Variable anchor for status bars, orbs, etc.

Brainstorm ideas of possible additions to the game. Read this before posting!

Moderator: Forum Moderators

Forum rules
Before posting a new idea, you must read the following:
User avatar
doofus-01
Art Director
Posts: 4131
Joined: January 6th, 2008, 9:27 pm
Location: USA

Variable anchor for status bars, orbs, etc.

Post by doofus-01 »

Hi,

I don't think there's anything controversial about this, but maybe there is some technical issue that I don't know about (which wouldn't be that surprising, since I know nothing about C++ or really any of the wesnoth source code). So here it goes:

Can the sprite decorations, like the orbs, status bars, and unit_overlays, be anchored to upper left corner of the defined "image=units/foo/bar.png"? As it is right now, big sprites look silly:
bars_shot.png
bars_shot.png (85.25 KiB) Viewed 7015 times
The top beast isn't mainline, but would still look a lot better if the bar didn't streak down its face. But even for the mainline dragon, the bars interfere with the sprite, and the info they are supposed to convey are muddled by being over the dragon's anus.

There was some work for sprite sheets, it seems like this might be relevant to that. But I haven't seen anything recent on that, so who knows.

Does anyone know if this is possible?
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
User avatar
Crow_T
Posts: 851
Joined: February 24th, 2011, 4:20 am

Re: Variable anchor for status bars, orbs, etc.

Post by Crow_T »

might be a hacky temporary solution but it looks like the bar is placed from the origin point of the image, the lower left, from the 2 examples. I opened your bellikakosaurus (sp) file in Gimp and it looks to be justified left, as in there is empty space to the right. Can you move it to the right in the png, or even square off the png, eliminate the empty space, so the bar is in a better location? :hmm:

I poked around the src and core files but I have no idea where the bar code is at.
User avatar
doofus-01
Art Director
Posts: 4131
Joined: January 6th, 2008, 9:27 pm
Location: USA

Re: Variable anchor for status bars, orbs, etc.

Post by doofus-01 »

Hi Crow_T,

No, the padding has nothing to do with it. Look at the Bellikakotaurus and then the Fire Dragon, you'll see the bar anchor is the 72px hex, nothing to do with the image PNG.

If I were really trying to find a hack way around this, I could specify a standing animation with the sprite image on a higher layer than the orbs & bars, but that will probably screw up terrain and combat animation interactions, so it would be better not to go down that path. And I don't want to hide the bars, I just want them out of the monster's face & anus.
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
User avatar
Xudo
Posts: 563
Joined: April 3rd, 2009, 5:26 pm

Re: Variable anchor for status bars, orbs, etc.

Post by Xudo »

May be you need to draw some examples of how it should be?
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Variable anchor for status bars, orbs, etc.

Post by zookeeper »

If the orbs and bars were relative to the sprite and not the hex, then it'd get terribly confusing when you'd get the bars of two units right next to each other, or worse, one on top of the other.

I don't think we can really accommodate for grossly oversized sprites like those without completely redesigning how the orbs and bars look.
User avatar
Xudo
Posts: 563
Joined: April 3rd, 2009, 5:26 pm

Re: Variable anchor for status bars, orbs, etc.

Post by Xudo »

May be it is possible to hide them completely by using special key in unit description?
User avatar
Crow_T
Posts: 851
Joined: February 24th, 2011, 4:20 am

Re: Variable anchor for status bars, orbs, etc.

Post by Crow_T »

An experiment:
I moved the sprite to the right of the png file
bellikakotaurus_right.png
bellikakotaurus_right.png (12.61 KiB) Viewed 6949 times
This is the result
bell_right.png
bell_right.png (165.72 KiB) Viewed 6949 times
I cropped the sprite to almost a square next
bellikakotaurus_center.png
bellikakotaurus_center.png (12.21 KiB) Viewed 6949 times
The result
bell_center.png
bell_center.png (153.89 KiB) Viewed 6949 times
Not perfect but you can manipulate it based on the png file dimensions as well as where it is located in the png.
User avatar
doofus-01
Art Director
Posts: 4131
Joined: January 6th, 2008, 9:27 pm
Location: USA

Re: Variable anchor for status bars, orbs, etc.

Post by doofus-01 »

Crow_T wrote:An experiment:
I moved the sprite to the right of the png file ....
Thanks, Crow_T. I take your point that the sprite can get shifted to look less ridiculous. But the bar is still covering the sprite, just like the dragon.
zookeeper wrote:If the orbs and bars were relative to the sprite and not the hex, then it'd get terribly confusing when you'd get the bars of two units right next to each other, or worse, one on top of the other.

I don't think we can really accommodate for grossly oversized sprites like those without completely redesigning how the orbs and bars look.
If there were units with lots of dead-space, so that the ornaments were floating off seemingly unconnected, that would indeed be a problem. But if the sprite mostly fills the canvas, I don't see how that could be an issue.
Xudo wrote:May be it is possible to hide them completely by using special key in unit description?
That's not a bad idea.
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Variable anchor for status bars, orbs, etc.

Post by zookeeper »

doofus-01 wrote:
zookeeper wrote:If the orbs and bars were relative to the sprite and not the hex, then it'd get terribly confusing when you'd get the bars of two units right next to each other, or worse, one on top of the other.

I don't think we can really accommodate for grossly oversized sprites like those without completely redesigning how the orbs and bars look.
If there were units with lots of dead-space, so that the ornaments were floating off seemingly unconnected, that would indeed be a problem. But if the sprite mostly fills the canvas, I don't see how that could be an issue.
What I mean is that when you got situations like the attached example, there's no way to automatically offset the bars relative to the sprite so that it'd look good (yours is much smaller so it'd be less of an issue). If you put the bars in the top left corner of the dragon's sprite, then they'll overlap with the NW and N-from-NW units' bars and/or be in the dragon's face even more when it's facing left.
Attachments
firedragonbars.png
User avatar
doofus-01
Art Director
Posts: 4131
Joined: January 6th, 2008, 9:27 pm
Location: USA

Re: Variable anchor for status bars, orbs, etc.

Post by doofus-01 »

I suppose the info does get a bit muddled in that situation, but it's already muddled. I don't see how this breaks anything.
firedragonbars.png
firedragonbars.png (143.92 KiB) Viewed 6904 times
As for the bars being in the dragon's face, I don't believe that's an issue. It would be pretty easy to avoid it, if it is.
fire-dragon.png
fire-dragon.png (17.32 KiB) Viewed 6904 times
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
User avatar
lipk
Posts: 637
Joined: July 18th, 2011, 1:42 pm

Re: Variable anchor for status bars, orbs, etc.

Post by lipk »

I like this idea, although I agree that it could cause some readability issues. I think we should give it a chance, put it into mainline and make the final decision based on the feedback received. I'm not sure though if it should be delayed until the next dev series or be put into the 1.12 branch.
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Variable anchor for status bars, orbs, etc.

Post by zookeeper »

Definitely not into 1.12.
User avatar
doofus-01
Art Director
Posts: 4131
Joined: January 6th, 2008, 9:27 pm
Location: USA

Re: Variable anchor for status bars, orbs, etc.

Post by doofus-01 »

Thanks, lipk. I'll submit a feature request.
EDIT: http://gna.org/bugs/index.php?22464
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects
User avatar
StandYourGround
Posts: 256
Joined: May 13th, 2009, 2:16 am
Location: On a blue ball spinning through space at incomprehensible speed

Re: Variable anchor for status bars, orbs, etc.

Post by StandYourGround »

Here's an idea... What if instead the health and XP bars hide by default, and appear only when a unit is selected or the cursor is hovering over it? Some kind of blinking, flashing, or small icons of some sort could be used to indicate weak units and units close to leveling. Then placement of bars for visual reasons could be less important, and only strategically critical units would immediately grab attention.
I will now resume lurking silently.
User avatar
SFault
Posts: 483
Joined: November 10th, 2009, 2:21 pm
Location: Esbo, Finland

Re: Variable anchor for status bars, orbs, etc.

Post by SFault »

StandYourGround wrote:What if instead the health and XP bars hide by default, and appear only when a unit is selected or the cursor is hovering over it?
Why? I don't see any reason to do this. I really want to know if someone has lots of xp or no xp at all. If I need to browse all the units (own and enemies) that would be tedious.
segmentation fault
EBfW, GtR, Art, Old art
Post Reply