-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Add Seasonal backgrounds #10586
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
Add Seasonal backgrounds #10586
Conversation
No offence, but I think it would have been wiser to ask your questions in an issue comment. Fetching the images every time is pretty shocking. Here's a proposal of a completely different flow instead:
Could also have seasonal as a separate option, I guess. It can't be as done currently as every switch to seasonal will then require users to revert back manually. I would need confirmation on this, though. This is only my idea that I came up with on the fly. |
All at once sounds like not a great idea. Stable currently downloads each time a new one is required asynchronously, and caches after retrieval. |
I guess it's a pretty huge footprint, true. The seasonal background API response should probably persist across the current session, though, to avoid re-querying to check if there is a need to fetch a new one ( |
For reference, the current Halloween event has 15 images, so ~6Mb. |
I was suggesting storing the API response there, not the textures themselves. For textures, the framework |
A suggestion: We might want to split the settings into two |
Thanks for your feedback, and sorry I didn't get to this earlier.
This still leaves:
|
"Sometimes" is based off whether we are currently "in season". This is provided by the api response already in the form of a timestamp ( I think the re-fetch of textures is fine for the time being, for what it's worth. |
For the record I've fixed the test failures locally and am currently in the process of writing a test scene for this. |
I've fixed the test failures, made a few stylistic changes, added test coverage, and also added support for delayed fetching of the backgrounds if API is not immediately available on launch, as the game would actually hard-crash if network was not available. The side effect of that change is that even though the API endpoint seems to be guest-accessible, the backgrounds won't be loaded until login, as we don't have an online-but-not-logged-in API state. Another wonky thing about the API endpoint is that it seems to be responding with an There's one transition at load that looks a little off that I want to look at but other than that I guess this is ok if we don't want to deal with caching the downloaded assets yet. |
It should be sliiightly better now. The fade in |
Resolves #7055
PRing this as a first draft because I would like some assistance with the remaining issues.
stable gives the user the option Seasonal Backgrounds:
Always
/Sometimes
(default) /Never
Not sure if this is worth keeping around in lazers Background source. For now, I only added
Seasonal
(default)we definitely need some way of caching or prefetching, but I would like some guidance on which level to do that.
In
BackgroundScreenDefault
I had to change the initial load toLoadComponentAsync
because of
[LongRunningLoad]
but chainingLoadComponentAsync
s like that looks very wrong to me.