Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increasing max picture size for player icons. #75

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Somebodyisnobody
Copy link
Contributor

@Somebodyisnobody Somebodyisnobody commented Mar 2, 2022

  • Size of Picture.png increased to 900px 450px max as the file is only used locally and has no effect on resource loading over the network.
  • Size of BigIcon.png increased to 200px max for screens with higher resolution (means higher scaling ingame).
  • Log entry is now written when BigIcon is too large and removed for network games.

Due to the resize of BigIcon.png the maximum filesize for BigIcon was raised from 20 to 100 Kibibytes. Testing the limit with converting a noisy flower meadow (1200 * 901px @ 2 MBytes original, set as profile picture), BigIcon size was about 65 KBytes.

@maxmitti
Copy link
Member

I like the changes, but I am not convinced of the 900px limit. It seems much too high to me.
I believe the Picture.png is only shown in the player selection screen and also there it is displayed quite small (less than 200x200 apparently).
The main problem I have with this is increased player saving time due to bigger file size without a clear benefit.

I propose to change the limit to 450px instead.
It would more closely match the approximate 3x increase of the BigIcon and should be more than big enough for the use case.

@Somebodyisnobody
Copy link
Contributor Author

Somebodyisnobody commented Mar 13, 2022

The main problem I have with this is increased player saving time due to bigger file size without a clear benefit.

That's an argument I didn't saw. My argument is that users may loose the original picture and then only have a low scaled Picture.png (I was wrong it is actually named "Portrait.png").
I see the problem more at the packing of c4player files i mean we're talking about 1,5 Megabytes. What makes it so slow?

@maxmitti
Copy link
Member

This is an interesting perspective, but picture archival is not in the scope of a game engine.

(200px BigIcon.png, 100 Kibibytes; 450px Picture.png)
Copy link
Member

@Fulgen301 Fulgen301 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The frontend should also finally use the same file size check like the network system, otherwise you can set a BigIcon that doesn't actually get used.

Grp.Delete(C4CFN_BigIcon);
{
Grp.Delete(C4CFN_BigIcon);
LogF("OptimizeStandalone: BigIcon is too large! Maximum allowed file size is %" PRId32 " Kibibytes. Deleting BigIcon.png for distribution of the player file in network.", C4NetResMaxBigicon);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be translated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants