Godot-proposals: Increase the resolution of the default icon.png

Created on 31 Aug 2020  路  12Comments  路  Source: godotengine/godot-proposals

Describe the project you are working on: I've noticed the lack of resolution in a variety of projects.

Describe the problem or limitation you are having in your project:

Many people use icon.png as a placeholder, or even a part of their game. It's even become a meme.

However, icon.png has a fairly low resolution by default, it's only 64x64 pixels:

icon

Describe the feature / enhancement and how it helps to overcome the problem or limitation:

I propose increasing it to 128x128 pixels. Here's a 128x128 version compressed with oxipng:

icon

Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:

Godot will place this into the project instead of the existing icon.png.

If this enhancement will not be used often, can it be worked around with a few lines of script?:

This problem is very easy to work around, but this will be used very often (by anyone who creates a project, nearly 100% of users).

Is there a reason why this should be core and not an add-on in the asset library?:

icon.png is a core feature.

core

Most helpful comment

Instead of either a the 64x64 or 128x128 rasterized version, why not generate the project with the icon.svg instead of icon.png?
(sorry @Xrayez if that's what you have already been saying, I'm not sure I understood what you are trying to say)

The icon.svg would generate the same 64x64 texture like the current icon.png, therefore not breaking any tuorials or default settings in other nodes like the Tilemap node.
If the user then wants a larger resolution on their icon, they can simply reimport it with svg/scale 2 to get a perfect 128x128 or anything bigger. Scaling down the icon resolution to work as placeholder for pixelart games with 32x32 or 16x16 tiles would be just as easy.

All 12 comments

If we consider icon.png only as a placeholder, I find that 64x64 is a good size. In 2D, it fits ok in high res game while still being usable for pixel art games, where the resolution might be smaller.

In 2D, it fits ok in high res game while still being usable for pixel art games, where the resolution might be smaller.

There's even a related proposal for this: #457. 馃槂

I'm definitely in favor of this, as this will ensure the default icon always looks good on hiDPI displays. Right now, if you create a project on a loDPI display then switch to a machine that has an hiDPI display, the icon will look blurry.

This can be changed in https://github.com/godotengine/godot/pull/41430 by forcing a scale of 2.0 instead of 1.0.

One thing to consider is that with oxipng we can get an PNG which is 40% smaller. Since we should use the same icon across all devices (since it's saved and it would be confusing for different computers to generate different projects), I think it would make sense to store the optimized PNG file inside of Godot instead of generating it each time.

Why not just copy icon.svg instead of generating icon.png? Should be more lightweight. In both cases, these are imported anyway.

Instead of either a the 64x64 or 128x128 rasterized version, why not generate the project with the icon.svg instead of icon.png?
(sorry @Xrayez if that's what you have already been saying, I'm not sure I understood what you are trying to say)

The icon.svg would generate the same 64x64 texture like the current icon.png, therefore not breaking any tuorials or default settings in other nodes like the Tilemap node.
If the user then wants a larger resolution on their icon, they can simply reimport it with svg/scale 2 to get a perfect 128x128 or anything bigger. Scaling down the icon resolution to work as placeholder for pixelart games with 32x32 or 16x16 tiles would be just as easy.

@golddotasksquestions That could be done, but at the default scale, the icon will still look blurry in the Project Manager on hiDPI displays. This is why I would prefer to replace the icon with a 128脳128 PNG instead. (SVGs will be rasterized on import, but you can't have them imported in multiple sizes at the same time.)

@Calinou Currently the artboard/canvas dimensions of the icon.svg is set to 64x64 by whoever made it. Since it's vector art, you can change that to whatever you want, save it again, and now the default resolution of the icon.svg will be that new value. Case in point:

DefaultProjectIcon_128x128.zip
(containing the icon.svg importing with 128x128 texture in Godot, can't upload the svg 'cause Github doesn't allow the filetype)

Now the Project Manager icon on hiDPI should not appear blurry, because the texture Godot generates from the icon.svg is 128x128 by default.

However this still breaks compatibility with all other default values in Godot that currently work really well with the default 64x64 icon. It also breaks a lot of tutorials.
Given that there is only a much smaller percentage of users using the Godot Project Manager on hiDPI displays, I would consider another solution to fix the ability to perceive the low resolution of the icon Project Manager icon in hiDPI screens (which is, let's face it, only really an aesthetic issue for Macbook users). For exported projects which are in fact much more commonly viewed on high dpi hardware such as mobile devices, Godot users will create their own icons in larger resolution anyway.

To my surprise, the SVG file (5.0 KiB) is larger than the existing PNG file (3.2 KiB) and the compressed 128x128 PNG file (4.3 KiB). While there are still benefits to SVG files, a bigger file is a downside, Godot only imports a single size anyway, and PNG is a more universal format. This is worth a discussion but I'm not sure it would be worth it to go SVG.

@aaronfranke It's not like a 0.7 KB file size difference is the end of the world. :stuck_out_tongue:

@Calinou Yes, but a 116 byte difference is according to some users :stuck_out_tongue:

Note that to implement this, we can't just force the DefaultProjectIcon icon scale to 2.0 or save the SVG as 128脳128. Otherwise, all project icons will display twice as large. We'll also need to modify project_manager.cpp to solve this.

While making changes in project_managere.cpp, it would be good to avoid resizing the default project icon every time it has to be displayed in the project manager as this is a relatively slow operation.

Was this page helpful?
0 / 5 - 0 ratings