Skip to content

Add more control over resources loading #2093

@arthuro555

Description

@arthuro555

Description

When GDevelop loads up, it takes much time preloading everything. Sometimes though, you may want to have a game that loads fast initially and then have some loading screens to load the missing stuff.

Solution suggested

Instead of forcing preloading resources to the user, we could take a similar approach to what was done in #2006 :

  1. Add a property on the resources to choose if it should be preloaded or not
  2. Add actions to preload and unload resources
  3. Modify the loaded resources getters to load the resource if it hasn't been loaded yet or has been unloaded

That way, the game never breaks, but it gives a way for users to control what is loaded or not to have a better memory management, and to make their own "loading screens" by initially loading only the loading screen assets so that the gdevelop splash screen can be hidden as it is too fast to see anyways, and using a GDevelop scene using the actions to load what they need and display the on screen feedback they want in the meantime.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions