layout by layout -loading?

Discussion and feedback on Construct 2

Post » Thu Dec 13, 2012 5:18 pm

@Ashley, thank you! but, asi I already mentioned in my post (in hope to not to receive again an answer about the best practices for GAMES -mine is NOT a game-):

""I started a project, months ago, a "tale book" for kids with static images and some extras""

And:

""As this is not a "game" techniques like tiling or so, commented in the forum doesn't apply to my project. ""

Please, read my post again.

Every page of the tale book is an image (it MUST be an image, as every page is designed and painted by an artist who did it for me)

So, the question is.. Are there any option to make this type of "no game" based in "image pages" to work?

Thanks!!!
B
8
S
1
Posts: 19
Reputation: 724

Post » Thu Dec 13, 2012 7:12 pm

@Quest

Here are my "two cents" contribution, despite do not solve your problems, maybe could point you to another way.

- first you can reduce the colors of the images, instead of full color, you can try monocolor or posterized, but do not forget to change the image setting, this can reduce a lot of image size.

- second, do you know "iBooks Authors" from Apple? I already did some works with it and it has a good memory otimization for lots of images, BUT, it only works in IOS and you need to release the iBooks by AppStore.

I hope i have helped you.
B
90
S
5
G
8
Posts: 165
Reputation: 7,648

Post » Thu Dec 13, 2012 8:58 pm

Even though it's not a game, you're still limited in the same way games are, which is why games came up with the techniques they did to work within those limitations.

The only idea I've got is upon switching pages, perhaps using the iframe plugin to navigate to another web page which contains another image/c2 app will unload the previous from memory. I'm not sure if cocoonjs supports the iframe plugin though, so if it doesn't you can try one of the other solutions out there, such as appmobi or phonegap.
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

Post » Fri Dec 21, 2012 3:58 pm

lets say i have 3 layouts.

each layout has just 1 large image sprite.

C2 starts up on layout 1. image 1 is loaded and displayed. images 2 and 3 are not loaded since they are on layouts 2 and 3. is that right?

now the big question.

layout 2 is started. image 2 is loaded and displayed. what happens to image 1? is it flushed from memory or it keeps occupying video ram?

thanks a lot
B
41
S
11
G
4
Posts: 428
Reputation: 7,356

Post » Fri Dec 21, 2012 4:01 pm

Quest, C2 looks like the perfect tool for making animated books for kids... until you come across the issue of using large pictures, each page with a different background!

check out the top story books on the app store: they are made with native toolkits not in html5! you need total control of what assets you load, and which ones to flush away, page by page even on an ipad with 1gb ram.
B
41
S
11
G
4
Posts: 428
Reputation: 7,356

Post » Sat Dec 22, 2012 2:29 am

That's a good question.

How does layout-by-layout page loading works?
Especially for mobile devices.

B
4
Posts: 41
Reputation: 407

Post » Sat Dec 22, 2012 2:49 am

I'm fairly sure the images are flushed from memory. If not, it seems like layout-by-layout loading would be pretty much useless. @Ashley can you confirm?
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Sat Dec 22, 2012 2:54 am

Layout by layout loading requires webgl, which mobiles don't have, so it's up to the browser to manage the memory. I've read ludei is going to hopefully implement the layout by layout loading even without webgl, though.
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,432

Post » Sat Dec 22, 2012 3:34 pm

In the WebGL renderer the previous layout's textures are released.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,580

Post » Sat Dec 22, 2012 3:56 pm

so for ipad, layout by layout is pretty useless for now right?
B
41
S
11
G
4
Posts: 428
Reputation: 7,356

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 11 guests