#How to make Sprite Fetch faster or be async?

21 messages · Page 1 of 1 (latest)

peak gorge
#

I would like Sprite_fetch to be faster or to work asynchronously. I've already tested the application on several devices and on almost all of them the waiting time is the same until the assets are preloaded by sprite_fetch, which is a time of 1 minute and 5 seconds, varying a few seconds more or less .

This waiting time, taking into account the fact that the window is frozen while loading, can be a problem that can lead users to uninstall the application, since the game tends to be more popular on mobile. That wait time wouldn't be an issue if it was a PC-only game.

If I can't find a solution by tonight, publishing the app like this will be tough but I won't have any other option. I need a solution that works on Windows and Android and that helps to at least keep the user on the loading screen, as the screen is completely frozen while the prefetch is in use.

south tendon
#

there is no way to make that async

#

how big is the sprite you’re trying to pre fetch

#

dimensions and frames

peak gorge
#

but its very much sprites

south tendon
#

if you are fetching them I’m guessing it’s cause they are huge and many frames long

peak gorge
#

my game is pre rendered 3d characters, all movement and 8 directions have pre render

south tendon
#

that’s pretty much what I thought you would say haha. the question tho, is what about dimensions and frames? cause if they are small there is no reason to prefetch

peak gorge
#

it's hard to say exactly how many sprites there are, as there are 6 characters with various animations.

south tendon
#

and how come you’re pre fetching?

peak gorge
#

but they all have the same dimensions and the "same" sizes.

peak gorge
# south tendon and how come you’re pre fetching?

Well, the sprites are written in a pattern, so I put a while to fetch the name of the assets, and then prefetch multi does the rest. I tried switching to using the while and loading the prefetch inside the while, but the timing doesn't change.

south tendon
#

why are you doing it tho

peak gorge
south tendon
#

Cool so what you have to do is make a list of all sprites that have to be fetched,then prefetch them one at a time, one frame at a time, so u can do a loading progress or animation

peak gorge
#

I just wanted the loading sprite to keep spinning in the meantime, or the person will get the impression that something has gone wrong and will exit.

south tendon
#

there is not a way to make it go frame by frame like that; sometime this summer we’re going to get async sprite_add so you can wait for that or fetch 1 sprite per frame

peak gorge