Minetest_game: heart.png and bubble.png are distorted

Created on 22 Apr 2020  路  14Comments  路  Source: minetest/minetest_game

The heart and bubble textures look kind of distorted.

Probably that's because 12脳12 is expected, but 16脳16 is the actual texture size.

2 possible solutions:

  • A: Change the texture size to 12脳12
  • B: Overwrite the builtin statbars to use MTG's size
Request / Suggestion Supported by core dev Textures

Most helpful comment

Perhaps the engine should just fix its texture scaling.

All 14 comments

I prefer solution A.

Perhaps the engine should just fix its texture scaling.

I prefer an engine change; but a 12x12 heart icon could probably work:
image

Top: 16x16
Bottom: 12x12
image

Note that the default size of these icons isn't 12x12 but 24x24, so they shouldn't be scaled down to 12x12:
https://github.com/minetest/minetest/blob/master/builtin/game/statbars.lua#L12

Applying the engine's gui scaling filter (scales to 24x24) to the images would look like this (old | new):
screenshot_20200513_201510
screenshot_20200513_201135

Looks much less pixel art-y so maybe not desirable to use these.

Ok, 24x24 then.

I prefer crisp pixel art to what that scaling filter does.

Is there any way to disable the scaling filter for the statbar icons?

The scaling filter is not enabled by default, but if someone chooses to enable it you cannot avoid it.

I prefer crisp pixel art too.

So this issue can't be fixed at all? No matter what we do, we always might end up with blurry textures if a user decides to use weird settings?

Is there really no way to force pixel art in the statbars?

we always might end up with blurry textures if a user decides to use weird settings?

Yes? The user gets what he chooses.

When the size on screen is not evenly divisible by the texture size you can have either distorted scaling or smoother scaling (at the expensive of some blurriness).

So how should this issue be fixed in your opinion?

Change the textures to be either 12x12 or 24x24 so they don't look distorted with default settings on the default DPI.

Long term the "gui scaling filter" (yes it's called that) in the engine should probably be improved if necessary and enabled by default so that textures do not look distorted if the user is on an "odd" DPI.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cx384 picture cx384  路  6Comments

PilzAdam picture PilzAdam  路  4Comments

Wuzzy2 picture Wuzzy2  路  4Comments

Fixer-007 picture Fixer-007  路  6Comments

paramat picture paramat  路  3Comments