Hello! So, in my game in development, ‘A Mystical Life’, i have a loading screen loading in the game. It works great, accept for one thing. First thing, when the game loads you can see the map from above as all the terrain is loading, and it appears in chunks, as well as when you load into the game, all the assets aren’t showing up-- which the game map itself is very large so i’m assuming that that is the reason. The Loading screen i guess is in fact registering that all the assets are accounted for as it is using ‘RequestQueSize’, but it still finishes before everything is REALLY truly loaded up and visible. Any thoughts on how to solve this? THANKS!
Unsure why the link was removed but it was, on the docs look up " RemoveDefaultLoadingScreen" and follow that. It uses what Rezault is saying with the game:IsLoaded() thing.
game:IsLoaded(), as well as @Lua_Basics’s suggestion.
It would be super helpful if you could attach an image or GIF!
Anywho, good luck with your project!
RequestQueueSize isn’t an accurate representation of your game’s loading. It is literally just a number indicating how many assets are in the download queue. Using this number for loading screens is not recommended and it also teeters on bad UX design if it ends up waiting a while for the size to become 0.
If you’re looking for a real loading screen, the best you can do is to set up a custom queue yourself and call PreloadAsync on each item lf that queue. PreloadAsync pushes the content ids of an object and it’s descendants to the front of the download queue and yields until they are loaded.
Using loading screens to wait for everything to load is bad UX design. Allow the engine to load the game in the background. Only add loading processes for assets that the user should see immediately, such as assets for the loading gui itself.
IsLoaded will not help with this problem.
First of all, the script for the default loading screen uses IsLoaded to determine when to remove the default loading screen, or it is removed after a hard coded 5 seconds if RemoveDefaultLoadingScreen is called or there are children in ReplicatedFirst.
Second of all, the function itself and why IsLoaded does not help; IsLoaded only determines when the server has finished replicating initial snapshots of the DataModel to the client. It has nothing to do with the loading of assets at all. Unloaded items will still be present and the engine needs to handle other tasks once the replication is finished, such as rendering the terrain and loading the related textures for it.
The proper way to construct asset loading screens is with PreloadAsync. PreloadAsync itself does not load but it’s the closest you can get.
Something I haven’t seen anyone mention yet is that you should always keep any loading screens in ReplicatedFirst. This is because this is well… replicated first. It’s the first thing sent to the client when they join a game, even before workspace. This guarantees the gui is placed on the player’s screen before anything else.
I use RequestQueueSize for my Loading Gui because I’m too lazy to get all the ID’s for things I actually need, but it’s true it takes forever (I added a skip button). It’s not the best practice, but if you turn on StreamingEnabled, it’ll speed it up to a reasonable amount.
Why would you need to do that? PreloadAsync supports passing instances in order to get content ids for both the asset you pass and its descendants.
Thank you ! This Was Very Helpful! I’ll give it a try. Is there anywhere you might direct me for tips on good UX design. I’m doing this all by myself so it would be helpful. thanks!
UX design is a very broad topic that varies from game to game. There are some general principles that you need to keep in mind such as tailoring your game to be friendly for users to enjoy, while others are more specific to what kind of game you’re running and what features are implemented.
I don’t quite have any resources on UX design specifically, but loading screens are definitely one of those general to-adhere-to principles. You don’t want to stall a user from playing your game for a long time with a loading screen; a lot of the audiences you receive will be young audiences, a lot of who don’t have the patience to sit through a loading screen.