bugBattle for Wesnoth - Bugs: bug #14503, Player often can't see his own...

 
 
Show feedback again

bug #14503: Player often can't see his own shadows and nightgaunts

Submitted by:  Dan Gerhards <beetlenaut>
Submitted on:  Mon Oct 12 07:48:20 2009  
 
Category: BugSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Units
Status: Ready For TestPrivacy: Public
Assigned to: NoneOpen/Closed: Open
Release: 1.7.6Operating System: All

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 Apr 15 00:56:15 2017, comment #27:

Okay, PR #987 submitted for the global invisible units alpha change you suggested.

Wedge009 <wedge009>
Project Member
Fri Apr 14 21:45:06 2017, comment #26:

Okay, great!

You posted the relevant lines in this thread on March 20. I just changed the two instances of 0.5 to 0.6.

Dan Gerhards <beetlenaut>
Project Member
Fri Apr 14 20:53:15 2017, comment #25:

If/when Nightgaunt becomes animated, I imagine the artist would follow the pattern from Shadow. If not, I'll make sure it does!

What exactly did you change in drawer.cpp? Since it's a more widely-used attribute, we could try it as a separate PR, see what the others think.

Wedge009 <wedge009>
Project Member
Fri Apr 14 14:52:31 2017, comment #24:

All right. I just didn't want to potentially have to go through this again with the nightgaunt.

I can't think of any problem this could cause, and 1.13 is a development version after all. It could easily be reverted if someone found an issue with it. But it's your call.

Dan Gerhards <beetlenaut>
Project Member
Fri Apr 14 13:10:26 2017, comment #23:

I started PR #984 for this. I left Nightgaunt alone as the artist would set the alpha levels if/when the animation frames are added.

I also imagine changing invisible units' alpha levels from 0.5 to 0.6 probably isn't a bad idea. But I don't know if there could be problem side-effects with other alpha interactions by changing it that way.

Wedge009 <wedge009>
Project Member
Thu Apr 13 18:26:12 2017, comment #22:

I wonder if the difference is in the way our operating systems handle translucent pixels. The game would use them of course, but screenshots wouldn't actually have any.

Flipping it around was not a bad idea. I think it is an improvement, so let's do it. Can we also put this into the nightguant's .cfg file? It should be commented out for now, but then it would be ready to go when the unit has more frames.


I also experimented with making [hides] less aggressive in the engine. I raised it by 0.1 drawer.cpp. The difference isn't noticeable for other units, but you can see the difference in the shadow at its lowest point. The claws and hood in particular are a little more visible now. (Image attached.)

(file #29929)

Dan Gerhards <beetlenaut>
Project Member
Thu Apr 13 07:31:53 2017, comment #21:

I'm conscious that the animated frames can help with visibility. But I took screenshots and still couldn't find one with a completely transparent Shadow. :/

Failing that, let's look at the alpha animation:

I'm not sure how the WML is set-up, but just looking at this I'm guessing the change in alpha level is a linear progression. It takes 1.4 seconds to shift from 0.8 to 0.4, 0.6 seconds to shift from 0.4 to 0.6, 0.6 seconds to go back to 0.4, then 1.4 seconds to go all the way back to 0.8. So it spends most of its time with an alpha level between 0.4 and 0.6 (or 0.2 to 0.3 when Nightstalker ability is active).

As an experiment, I flipped this around so that it spends most of its time between 0.6 and 0.8. You can try it yourself by overwriting line 127 in data/core/units/undead/Spirit_Shadow.cfg:

What do you think? If you think it's any improvement I can put in another PR.

Wedge009 <wedge009>
Project Member
Thu Apr 13 07:11:51 2017, comment #20:

I did a clean, up-to-the-minute build, and I still see the same thing as before. I not sure I can explain what's going on, but the shadow is easier to see when it's animated. I bet if you took a couple screenshots (to freeze the motion) you would get one like mine.

"Even your level 1 Ghost...looked quite faint." Yeah. Maybe we ought to make a separate standing animation for ghosts for use in cave terrains.

Dan Gerhards <beetlenaut>
Project Member
Wed Apr 12 07:25:29 2017, comment #19:

Can you try again with a clean build, please? I tried again on master and I simply don't see the unit completely disappearing, even with ellipses disabled. I had my game window and your image, both at 400% zoom, overlaid exactly and flicked back and forth between them and even at its maximum transparency the game-rendered Shadow was visible.

Nonetheless, I agree that the colouration of the cave and the ghosts do make them naturally blend together as opposed to, say, grassy plains. Even your level 1 Ghost which lacks Nightstalker looked quite faint, such that it may be difficult to visually distinguish the Nightstalker ability via unit transparency anyway.

Wedge009 <wedge009>
Project Member
Mon Apr 10 15:18:54 2017, comment #18:

Here's a savefile. There are two shadows here, and they're both basically invisible for part of the animation cycle. (I had disabled ellipses in the screenshot.)

(file #29920)

Dan Gerhards <beetlenaut>
Project Member
Mon Apr 10 08:36:04 2017, comment #17:

Can you send the save file where you took that picture, please? I can't get my Shadows to completely disappear like that. I don't even see the team ellipse in your image... or did you disable it?

Wedge009 <wedge009>
Project Member
Sun Apr 9 17:42:50 2017, comment #16:

Okay, that's a lot better. You can see it well enough on most terrains. It's still troublesome on some gray backgrounds though, like cave hills. (Image attached.) It's not a common situation though, so maybe all we need to do is tweak the animation timing so it spends less time at its most transparent phase.

(file #29917)

Dan Gerhards <beetlenaut>
Project Member
Sat Apr 8 23:12:20 2017, comment #15:

The PR has been merged now, so the blinking is gone but I don't know if the Shadow is visible enough at night time to your satisfaction.

Wedge009 <wedge009>
Project Member
Fri Apr 7 03:24:45 2017, comment #14:

PR has been updated with CelMin's suggestion. I've been using the attached file to test the ghost units - ending the turn changes the field to night time, so changes due to the Nightstalker ability will be visible then.

(file #29916)

Wedge009 <wedge009>
Project Member
Mon Mar 20 13:40:48 2017, comment #13:

Maybe so, but your remarks really upset me. It's not what you said but how you said it. I get enough of this kind of treatment from certain groups at work, I don't need it from here.

Anyway, let's put that behind us. Seeing as you asked so nicely... I tried to investigate how the animations and translucency are done between the different ghost units. I believe they are kept in data/core/units/undead/Spirit_xxx.cfg, and after some closer study, I think the blinking effect is not intended at all but is rather an underflow of the alpha channel as the animation crosses over the completely transparent threshold. I also think that the lack of translucency for the Nightgaunt is not intended but is a result of the lack of animation frames for that unit.

On the other hand, units flagged as invisible (turns out this is [hides] in WML) seem to have a hard-coded transparency of 50% in src/units/drawer.cpp:106

This seems to apply to all units with an 'invisible' or [hides] ability, not just Shadows and Nightgaunts with their Nightstalker ability.

I don't pretend to know anything about this stuff, but I made an attempt at reducing the Shadow's transparency in PR #961. Have to wait to see what the experts say about this issue.

Wedge009 <wedge009>
Project Member
Mon Mar 20 05:35:13 2017, comment #12:

All right, sorry. I'm just frustrated because I reported this problem more than seven years ago.

Dan Gerhards <beetlenaut>
Project Member
Mon Mar 20 05:28:20 2017, comment #11:

I'm only speaking for myself, I don't represent everyone, so there's no need to be so harsh with me, thanks.

Wedge009 <wedge009>
Project Member
Mon Mar 20 00:25:41 2017, comment #10:

The problem was never that the unit is always invisible, but that it's invisible a lot of the time. That's still true, so it's not, in fact, fixed.

You said you're open to a better idea, but you also said, "perhaps the translucency shouldn't be cranked up so high." That was a better idea! Let's do that. You also said there would be no problem if we treated it like the nightgaunt and gave it a constant translucency. That was another better idea! We could do that too. But blinking on and off, in my opinion, is totally out of the question.

Dan Gerhards <beetlenaut>
Project Member
Sun Mar 19 23:22:33 2017, comment #9:

After playing through Secrets of the Ancients, I think the blinking - while annoying to an extent - really does appear to be an attempt to avoid the completely invisible unit situation that we have with undead units.

It doesn't look like there'll be any further changes to this unless better ideas come up. Could we mark this as fixed?

Wedge009 <wedge009>
Project Member
Tue Dec 13 05:24:13 2016, comment #8:

Wow, yes, I see that too. While it's visible at moments now, I agree that it's really distracting and annoying. I don't know how if this effect is intentional or where it might have been implemented.

Wedge009 <wedge009>
Project Member
Tue Dec 13 05:12:50 2016, comment #7:

So now, in 1.13.6+dev, hidden shadows spend half of their display cycle blinking on and off like a text cursor, going from fully opaque to fully transparent a couple times. If that was intended to fix this bug, it's not actually an improvement. They are still invisible most of the time, and the new blinking behavior is really distracting.

Dan Gerhards <beetlenaut>
Project Member
Sat Sep 17 10:24:28 2016, comment #6:

Not sure how that's done - it's an option, though I imagine some would baulk at having a special case for these units. Although, if the commentary explains why they are special cases, I think that should be okay.

Wedge009 <wedge009>
Project Member
Fri Sep 16 16:44:55 2016, comment #5:

True. As you mentioned, this issue was pointed out seven years ago, and things have changed since then. The two units were redesigned, and the Nightgaunt had all its animation removed. Now it functions better as a game unit (though I expect it will get the same animation back eventually and go mostly-invisible again). So, the title of this bug report is no longer 100% accurate, but the problem still exists.

Couldn't we just add a condition to the dimming code used for hidden units causing the code to ignore Shadows and Nightgaunts?

Dan Gerhards <beetlenaut>
Project Member
Fri Sep 16 10:16:44 2016, comment #4:

As of 1.13.5+dev, only the Shadow animates its translucency to the point of being practically invisible. The Nightgaunt's translucency seems to remain constant (at a given time of day).

Wedge009 <wedge009>
Project Member
Sat Aug 8 13:19:56 2015, comment #3:

I don't know if it was a feature back in 1.7.6 when this was first reported but in newer releases (currently on 1.13.1+dev) ethereal units such as ghosts, shadows and wraiths will be translucent, with the animation periodically varying its level of translucency.

At night time, when the shadow's nightstalk ability is activated, the hidden attribute does increase the level of translucency such that at maximum it is actually completely transparent. At different cycles in the variation the shadow is still visible, though, if only barely.

I suppose this bug can be left open because perhaps the translucency shouldn't be cranked up so high that the unit becomes transparent.

Wedge009 <wedge009>
Project Member
Sun Aug 3 17:54:36 2014, comment #2:

I'm changing this to a bug, because being able to see my own units is not really a new feature.

Dan Gerhards <beetlenaut>
Project Member
Fri Oct 16 19:03:55 2009, comment #1:

this problem is even worse when using high-resolution modes (smaller pixels/units) and the unit gets into a field that has low-contrast graphic tile (i.e. grey colour, as in normal human castle tiles); it blends into the background so smoothly, you can barely see it even on a high-contrast screen.

Vax Quis <vaxquis>
Mon Oct 12 07:48:20 2009, original submission:

Shadows and nightgaunts are partly transparent, so when they are on your side, and dimmed because they are hidden, they disappear entirely. About 75% of the time, all you can see are the bars and orb. Just removing the extra dimming would be enough--there is a "hidden" indicator on the sidebar, so the information is still available.

Dan Gerhards <beetlenaut>
Project Member

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #29917:  shadow_in_cave.png added by beetlenaut (53kB - image/png)
file #29916:  14503.gz added by wedge009 (35kB - application/gzip)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by wedge009 (Posted a comment)
  • -unavailable- added by vaxquis (Posted a comment)
  • -unavailable- added by vaxquis
  • -unavailable- added by beetlenaut (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 10 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu Apr 13 18:26:12 2017beetlenautAttached File-=>Added shadow_in_cave_2.png, #29929
    Mon Apr 10 15:18:54 2017beetlenautAttached File-=>Added SotA-North_Knalga_Turn_7_(shadow).gz, #29920
    Sun Apr 9 17:42:49 2017beetlenautAttached File-=>Added shadow_in_cave.png, #29917
    Fri Apr 7 03:24:45 2017wedge009StatusConfirmed=>Ready For Test
    Fri Apr 7 03:24:44 2017wedge009Attached File-=>Added 14503.gz, #29916
    Fri Sep 16 10:16:44 2016wedge009StatusNone=>Confirmed
      Operating SystemLinux=>All
    Sun Aug 3 17:54:36 2014beetlenautCategoryFeature Request=>Bug
      SummaryMake player\'s shadows and nightgaunts more visible=>Player often can't see his own shadows and nightgaunts
    Fri Oct 16 19:03:55 2009vaxquisCarbon-Copy-=>Added -unavailable-
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup