How do I preload sprites?

0 favourites
  • 8 posts
From the Asset Store
Build your map with these isometric objects and terrains
  • Hello,

    I made a simple 2D game with a lot of images (mostly tiled-backgrounds, but also many sprites). Since I didn't want multiple layouts (loading between scenes), I just put everything in 1 layout. This works perfect, the only problem is the loading of the game. I have a loading-layout, start-layout and game-layout. In the loading-layout I preload some of the images. When it's finished I move on to the start-layout where I load some game-data. After that I move on to the game-layout. This step needs a bit of time, since everything needs to be loaded before the layout is displayed.

    How can I get there more performance / reduce loading? All images have a total size of 30mb. I already made them as small as possible...

    Thanks for the help!

    Best regards.

  • The main way to reduce loading time of sprites into memory is spread out the loading by not loading what you don't immediately need... using separate layouts.

  • Hey,

    thanks for the response, but that doesn't work for me. I've tried it and that makes a game like this unplayable since you need to change scenes multiple times per minute... And there you don't want any loadings between them.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You're probably going to need to post your game to get more detailed help. 30 MB of images is not a lot. There could be many possible other reasons for slow loading.

    Depending on the scope of your game, loading time is just something that needs to happen.

  • Loading time seems reasonable to me. Not sure what else there might be to optimize besides smaller sprites and scaling up. It loads significantly faster cached so it might just be downloading the game slowly the first time, which is dependent on Kongregate's content servers.

    Game looks great though!

  • Ok thank you for the help, just one more question :)

    What do you think would be best to use for "max spritesheet size"? Higher or lower? Just for the loading / downloading.

  • I would not presume there would be any noticeable difference. construct.net/en/tutorials/construct-3s-export-4 has more details.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)