How do I optimize loading time for project with many sprites

0 favourites
  • 5 posts
From the Asset Store
With this template you can create your own archer game and customize it however you want.
  • Hello

    We have a matching game with around 30 matching pieces (each with its own shape and color and size ) X 12 boards = ~ 500 sprites

    offline project loading time is expectedly slow on mobile . is there a way to optimize loading time with so many objects ? any other method that i could use ?

    Thanks

    Alon

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It depends on the way the pieces are created. If they were already set in place before starting, they will be all loaded at once. What usually works for me on mobile is leaving the layout as empty as possible and then generating things as it goes. To do so, I create a (or many) default layouts in which the only event is "go to next layout" with a wait of 0.1 and all their content are the different entities (pe 1 layout with 10 pieces, next with 10 pieces etc) so when the "game" layout is loaded, all the entities can be created from events without any problem (again, it´s my method, there will be many others that will be better but this one works for me).

    Hope this helps.

  • so you set an x and y for them on creation for the event sheet ? I thought that project load time is affected by the number of files in the project as a whole.

    I do use 12 layout each with its own pieces

  • I don´t really know what makes the issue, I´m just telling you what works for me on mobile. This might be close to what you are doing. I´m currently playing around with array procedural cave generation, testing how it behaves on mobile. As I said, I use a "spawn room" to load the assets in steps, so it does not collapse. (sorry for the placeholder art hehe)

    Then I create a grid of walls (very similar to pieces in a match game), which gets carved and set with enemies, items etc

    You could do the same with a simple line of code and a simple "spawner" sprite like

    spawn "tile" on "spawner", move spawner right tile.width pixels. If spawner is in border move downwards tile.width pixels and move to the initial X position. Repeat grid.width*grid.height/tile.width times only every 0.1 seconds, so it does not collapse.

    This way, you could leave the layout empty and let the code do the work slowly, so the device can take it.

    Without a .capx this is all pure speculation, I don´t know in what situation your game is.

    Hope this helps

  • gotcha, thanks for the help!

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