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

Force sounds to download even when "preload in cache" is unchecked #5984

Merged
merged 12 commits into from
Dec 1, 2023

Conversation

D8H
Copy link
Collaborator

@D8H D8H commented Nov 30, 2023

Changes

  • Force sounds to download even when "preload in cache" is unchecked (to avoid them to fight with other resources downloading)
  • Fix background color not showing up
  • Display the background image for intermediate loading screens too (they maybe scaled and cropped differently than the 1st one)
  • Add an icon for the "scene pre-loading" actions, conditions and expressions
  • Ensure that the logo will actually be shown if enabled.
    • If users try to be smart and add a big delay or fade-in duration for the logo, they will see the pop-up
    • Default timings are set when the watermark is disabled.

@D8H D8H changed the title Fast loading improvements Force sounds to download Nov 30, 2023
@D8H D8H marked this pull request as ready for review November 30, 2023 18:26
@D8H D8H requested a review from 4ian as a code owner November 30, 2023 18:26
@D8H D8H changed the title Force sounds to download Force sounds to download even when "preload in cache" is unchecked Dec 1, 2023
@@ -245,6 +252,13 @@ namespace gdjs {
);
this._progressBarGraphics.endFill();
}
} else if (this._state === LoadingScreenState.FINISHED) {
// Display a black screen to avoid a stretched image of the loading
Copy link
Owner

Choose a reason for hiding this comment

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

Nice, great polishing work.

} else if (resource.preloadInCache) {
} else if (
resource.preloadInCache ||
// Force downloading of sounds.
Copy link
Owner

Choose a reason for hiding this comment

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

Isn't there a risk to download large files that have not been tagged as "preload as a music" by the user?

Copy link
Collaborator Author

@D8H D8H Dec 1, 2023

Choose a reason for hiding this comment

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

In this case, we have the choice between:

  • the previous behavior, the sound won't play the 1st times which sounds like a bug in the engine (pun intend)
  • the new behavior, the loading takes more time which is easy to understand for users to try and fix it

I didn't update the UI because we may make it asynchronous if it's a good trade off.

Copy link
Owner

Choose a reason for hiding this comment

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

Ok! What do we do about the other TODO "Decide if sounds should be allowed to be downloaded after the scene starts"?

@D8H D8H merged commit 8830bb9 into master Dec 1, 2023
5 checks passed
@D8H D8H deleted the fast-loading-improvements branch December 1, 2023 15:30
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.

2 participants