Save Images from URL permanently

Get help using Construct 2

Post » Tue Mar 18, 2014 11:26 am

Hi!

I have another question for the C2 gurus.
I don't want my app to become too big. I thought it would be a good idea to load big images of the game only when the player needs them.
This is no problem.
But now I want to save the loaded images permanently on the mobile device, so the player has to load them only once.
Is this possible? Maybe with a plugin?
B
14
S
3
G
1
Posts: 255
Reputation: 2,027

Post » Fri Mar 21, 2014 11:43 am

@Ashley : Could you give me a hint if this is possible?

I have really huge images and it would be awesome when I could load them while the game is running and the device is offline.
B
14
S
3
G
1
Posts: 255
Reputation: 2,027

Post » Fri Mar 21, 2014 11:53 am

You cannot make the game download assets when needed (it will download all at once), however, C2 create an offline.appcache, this file makes the app totally offline after downloaded for the first time (it needs a little time to store everything permanently after the game is launched though), and so your app will load instantly next time.

However keep in mind that the update to new version of the app should be taking care off, More informations about this can be found.

For your images, try to not have them too big when not needed, also you can change the compression to lossy PNG-8 on some images, could save so download size.
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
53
S
22
G
18
Posts: 2,122
Reputation: 17,123

Post » Fri Mar 21, 2014 11:56 am

I don't want to download them. Currently I'm planning to have a mobile app with cocoonjs. I was wondering if it's maybe possible to already store the images in the app but load them during gameplay, when needed.
B
14
S
3
G
1
Posts: 255
Reputation: 2,027

Post » Fri Mar 21, 2014 12:06 pm

This is not supported. You should not use lots of large images anyway. See Remember not to waste your memory.
Scirra Founder
B
398
S
236
G
88
Posts: 24,441
Reputation: 194,661

Post » Fri Mar 21, 2014 12:20 pm

@Ashley: Is it just not supported or not possible? Would it be possible with a plugin?
B
14
S
3
G
1
Posts: 255
Reputation: 2,027

Post » Fri Mar 21, 2014 12:49 pm

You can load sprite images from a URL.. that's about it but if your images are static that's enough. Storing them permanently isn't possible though without jumping through some crazy hoops (like writing a custom plugin)
B
9
S
3
Posts: 37
Reputation: 749


Return to How do I....?

Who is online

Users browsing this forum: Artcadev, brunopalermo, Euduardo, Jackriduk and 31 guests