Is it possible to lazy load animation frames ?

Get help using Construct 2

Post » Fri Jun 07, 2013 4:27 am

I have a sprite with about 10 animations and the animation will be played in sequence throughout the life of the game like a hangman character , hence i need about 2 animation to load during the initial game play of the screen and rest in the background. Is it possible , i am trying to minimize the initial load time of the game ? or let me know if there are any other tricks as the C2's spritesheet export of 512x512 doesn't seem to work as it creates multiple files (around 50 ) for the game designed for retina display and it causes lots of time to load especially in mobile devices like iPad and iPhone basically when the number of http requests increases it really slows down the download time of image assets.
B
16
S
4
Posts: 248
Reputation: 2,267

Post » Sun Jun 09, 2013 1:57 am

I'm not positive that there is any kind of lazyload at the moment (there might be something in the plugins part of the forum though). Updating Construct 2 to the latest beta should definitely help you out though, as it raised the size of sprite sheets, and it can get rid of any duplicate images during compilation.
B
21
S
8
G
5
Posts: 89
Reputation: 6,017

Post » Sun Jun 09, 2013 2:02 am

Any word on when that beta will be released officially? I bought Construct through Steam, so I don't have access to the beta. :\ heh
B
6
S
1
Posts: 62
Reputation: 532

Post » Sun Jun 09, 2013 2:05 am

@wigriff Right click c2 in steam -> properties -> beta -> opt into beta updates.
B
46
S
14
G
7
Posts: 603
Reputation: 8,096

Post » Sun Jun 09, 2013 2:07 am

Oh EncyptedCow, that's silly. There is no way that would work. I mean, if that was an option, I SURELY would have known about it by... now...

...

I'm an idiot.

Thank you so much. :D
B
6
S
1
Posts: 62
Reputation: 532

Post » Sun Jun 09, 2013 2:35 am

Thanks for the information , hope it helps i had been breaking my head for couple of weeks on how to make it faster, finally i see a light at the end of the tunnel.

btw, I am not sure about how steam works but anyone can download the beta https://www.scirra.com/construct2/releases/r133/download

Again very thanks i wouldn't have definitely noted the release notes.

@Ashley , Also i wish if there is a way to remove the limitation of 1 spritesheet per sprite so that we can share the spritesheet across sprites and still minimize the download time.
B
16
S
4
Posts: 248
Reputation: 2,267

Post » Sun Jun 09, 2013 1:27 pm

All images are already lazy-loaded by all browsers, and in terms of memory usage they are only loaded in to memory per layout. However the layout-by-layout loading only works with entire sprites, so either all a sprite's animations are loaded in to memory, or none of them. Perhaps breaking your animations up across different objects would help with that.

Note in r133 the spritesheet size is upped to 2048x2048 (but it still might use smaller sheets to save memory).
Scirra Founder
B
383
S
225
G
86
Posts: 24,134
Reputation: 190,601


Return to How do I....?

Who is online

Users browsing this forum: luckyrawatlucky, R0J0hound, Yahoo [Bot], zenox98 and 1 guest