Weird HP/MP bar colors in 0.21.1 windows tiles


Problems running or configuring the software, commands & options, compiling, different platforms, using the interface, documentation, etc.

Snake Sneak

Posts: 124

Joined: Tuesday, 27th January 2015, 17:12

Post Tuesday, 20th February 2018, 00:17

Weird HP/MP bar colors in 0.21.1 windows tiles

I just installed the most currently available local Tiles version for Windows, and I'm seeing some strangeness with the colors of the HP & MP bars. They are very "dim" (low color saturation), almost invisible, which I have never seen before. The font color for HP/MP current values & totals look fine, it's just the bar color that's off.

I can't figure out what init.txt setting would control this aspect of the game. Help please?

Here's a link to an example, which I took a screenshot of and uploaded to Imgur.

https://imgur.com/a/x5PW1
Attachments
these colors.JPG
Example
these colors.JPG (32.43 KiB) Viewed 2847 times

Dungeon Master

Posts: 388

Joined: Monday, 18th August 2014, 20:04

Post Tuesday, 20th February 2018, 15:56

Re: Weird HP/MP bar colors in 0.21.1 windows tiles

I haven't heard of this one, and I'm not seeing it on a default windows tiles install in a VM. Does it affect the noise bar as well? (You could test this with `tt` for example.) The relevant rc options are hp_colour and mp_colour, but I'm not sure what settings you could pick that would get this result. Edit: are there any other visual oddities that you've noticed?

Snake Sneak

Posts: 124

Joined: Tuesday, 27th January 2015, 17:12

Post Wednesday, 21st February 2018, 02:20

Re: Weird HP/MP bar colors in 0.21.1 windows tiles

I confirmed that the problem also happens for me on my local tiles for download 0.21, so it's not just isolated to the 0.21.1 package.

I've identified a specific init.txt file setting that I can toggle from true to false, and make the HP/MP bars look "proper" versus the dim colors I showed above.

tile_filter_scaling = false
When this setting is left out of the init.txt file entirely, or remarked out with a '#' in front of the setting line, the HP/MP bar colors look right.

tile_filter_scaling = true
When this is set explicitly, I get the dim colored bars.

Dungeon Master

Posts: 388

Joined: Monday, 18th August 2014, 20:04

Post Wednesday, 21st February 2018, 04:01

Re: Weird HP/MP bar colors in 0.21.1 windows tiles

dolemite99 wrote:I confirmed that the problem also happens for me on my local tiles for download 0.21, so it's not just isolated to the 0.21.1 package.

I've identified a specific init.txt file setting that I can toggle from true to false, and make the HP/MP bars look "proper" versus the dim colors I showed above.

tile_filter_scaling = false
When this setting is left out of the init.txt file entirely, or remarked out with a '#' in front of the setting line, the HP/MP bar colors look right.

tile_filter_scaling = true
When this is set explicitly, I get the dim colored bars.


Thanks for tracking this down, with this information I was able to come up with a fix. For now on the 0.21.1 release version the workaround is to just not use that setting, sorry.

Slime Squisher

Posts: 368

Joined: Thursday, 11th April 2013, 21:07

Post Wednesday, 21st February 2018, 04:12

Re: Weird HP/MP bar colors in 0.21.1 windows tiles

advil wrote:Thanks for tracking this down, with this information I was able to come up with a fix. For now on the 0.21.1 release version the workaround is to just not use that setting, sorry.


https://www.khronos.org/registry/OpenGL ... ameter.xml

GL_LINEAR
Returns the weighted average of the four texture elements
that are closest to the center of the pixel being textured.

I think it's applying the average RGBA from the USE_TILE_LOCAL HP_Bar and MP_Bar definitions, which each contain 4 RGBA values (that are presumably being setup as overlapping textures?), to wit:
HP_Bar(LIGHTGREEN, GREEN, RED, DARKGREY);
MP_Bar(BLUE, BLUE, LIGHTBLUE, DARKGREY);

48, 95.75, 16, 112.5 (HP_Bar RGBA averages)
16, 16, 127.75, 112.5 (MP_Bar RGBA averages)

Plugging those RGB values into paint looks about right after accounting for the alpha (blending with black window background, probably?)

Dungeon Master

Posts: 388

Joined: Monday, 18th August 2014, 20:04

Post Wednesday, 21st February 2018, 05:19

Re: Weird HP/MP bar colors in 0.21.1 windows tiles

Implojin wrote:
advil wrote:Thanks for tracking this down, with this information I was able to come up with a fix. For now on the 0.21.1 release version the workaround is to just not use that setting, sorry.


https://www.khronos.org/registry/OpenGL ... ameter.xml

GL_LINEAR
Returns the weighted average of the four texture elements
that are closest to the center of the pixel being textured.

I think it's applying the average RGBA from the USE_TILE_LOCAL HP_Bar and MP_Bar definitions, which each contain 4 RGBA values (that are presumably being setup as overlapping textures?), to wit:
HP_Bar(LIGHTGREEN, GREEN, RED, DARKGREY);
MP_Bar(BLUE, BLUE, LIGHTBLUE, DARKGREY);

48, 95.75, 16, 112.5 (HP_Bar RGBA averages)
16, 16, 127.75, 112.5 (MP_Bar RGBA averages)

Plugging those RGB values into paint looks about right after accounting for the alpha (blending with black window background, probably?)


That's much more logical sounding than how local tiles actually draws those bars, which is to use text and draw the bar using a sequence of putwch(' ') with one of those colors as a background color and a black foreground, choosing color depending on where the space is in the bar vs. bar value. Nothing is intentionally overlapping. But it's possible that it was just blending the relevant colors with black, maybe twice, for each position, because of the way drawing an empty glyph is implemented.

For this message the author advil has received thanks:
Implojin

Snake Sneak

Posts: 124

Joined: Tuesday, 27th January 2015, 17:12

Post Wednesday, 21st February 2018, 20:31

Re: Weird HP/MP bar colors in 0.21.1 windows tiles

Ok, I'm glad to learn it was something that could be corrected in a future version! I have a large monitor, so I love setting the tiles to 64 pixels, turning on tile_filter_scaling and having the game tiles look smooth & not too blocky / pixelated. The dim HP/MP bar colors in 0.21.1 are an annoyance, but not game-breaking ... with 64 pixel tiles I can see the mini HP/MP bars under my character's feet well enough.

Thanks for diving in with a fix!

Return to Technical Support

Who is online

Users browsing this forum: No registered users and 4 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.