layout by layout -loading?

Discussion and feedback on Construct 2

Post » Wed Oct 17, 2012 7:54 pm

@Ashley When do you expect to have the "support for memory management" integrated with CocoonJS/AppMobi??
B
5
Posts: 25
Reputation: 377

Post » Wed Oct 17, 2012 7:58 pm

@BrianOD - I don't know, you should ask Ludei and AppMobi what their plans are!
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Thu Oct 18, 2012 5:34 am

@sqiddster & Ashley - Thanks for further clarification.
It seems that I knew less about rendering than I thought.
B
7
S
1
G
4
Posts: 31
Reputation: 2,241

Post » Thu Oct 18, 2012 6:15 pm

Wow, I read the description briefly when it was released. But I only now really understand it. This is great, I guess this will really speed up loading time.

Good work Ashley.
B
36
S
10
G
6
Posts: 948
Reputation: 11,101

Post » Thu Oct 18, 2012 6:17 pm

@Rory, I don't think it would speed up loading time, but it will reduce the amount of images stored in the RAM. Basically, you are OK to use hore high-res graphics now.
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Thu Oct 18, 2012 6:25 pm

Ah damn. So it doesn't stop it from loading everything on start?
B
36
S
10
G
6
Posts: 948
Reputation: 11,101

Post » Mon Oct 22, 2012 5:36 pm

We have been talking to Scirra on this but can't give a ETA. We are working hard on many different things right now (even some minor optimizations for texture reduction on our side too) and are pretty busy to solve this really soon. Please, check the new release soon to be released to check if some problems have been solved.

Regards and keep up the great work!
B
9
S
4
G
4
Posts: 383
Reputation: 3,616

Post » Thu Dec 13, 2012 9:04 am

Hi!!

I'm desperate... :( I tried everything I though would work... but it's impossible...

I started a project, months ago, a "tale book" for kids with static images and some extras, etc... that must work on an iPad. I decided to use CS2 and CocoonJS... bad idea :(

The main problem I have is, altough when I was starting everything went well, now the app crashes all the time (at first it crashed on ipad 1 and 2, but now it crashes on the ipad 3/4 too (1 gb RAM). I think the problem is the memory usage.

The images are retina-size 2048x1536 (jpg/png doesn't matter). I have 30 of them. I tried EVERYTHING I thought would work.

The first thing when I didn't care about memory waws to use invisible layers and make bvisible when requesting page change. Error, the app doesn't ewven start... crashes in the loading stage.

Then i tried with different layouts. Same thing.

Then tried with empty 2048 sprite and doing "Load from URL" and putting the jpgs in "files". App loads ok, but when reaching 5th image.. booom! it crashes..

I'm really desperate. I don't know what to do. As this is not a "game" techniques like tiling or so, commented in the forum doesn't apply to my project. Yes, I know maybe I chose bad with CS2 and Cocoon for this project. But it's done, I paid for it and I like it a lot to work with...

Really the layout-by-layout loading, or the free-mem when not used images, or... anything that works.... would help.

I hope you can help me! Thanks!!!
B
8
S
1
Posts: 19
Reputation: 724

Post » Thu Dec 13, 2012 2:26 pm

@Quest - while layout-by-layout loading may help, I'm afraid part of the problem is what you have described is just about the worst possible way you could design your game from a memory use point of view.

A single image at 2048x1536 will take about 12mb of memory. Having 30 of them will take around 350mb of memory! That's so much even some desktop computers will have problems dealing with that, let alone mobile devices.

You need to design your game differently for it to work well on mobile. See the manual entry on best practices:

[quote]Memory use
Some designers are tempted to design entire levels as single large images, for example 10,000 x 10,000 pixels. This method should be avoided at all costs. Not only is this extremely wasteful on memory, many devices also do not support images above a certain size, meaning your game does not work at all for many users. Generally the largest image size supported on all systems (including mobile phones) is 2048 x 2048 pixels. You should still avoid using images this size; a far superior way of designing levels is to use a few medium-sized Tiled Background images (e.g. 512 x 512) to cover the layout, then compose the level design from placing multiple instances of other Tiled Background and Sprite objects. Each instance can be freely stretched and rotated individually which can help avoid a repetitive appearance.

Consider a single 10,000 x 10,000 image will use 400mb of memory, which will make all but the most powerful desktop computers run out of memory. On the other hand, a level composed of three 512 x 512 Tiled Backgrounds and 50 different Sprite objects sized 200 x 200 will use under 20mb of memory (20x less) - small enough to fit in to the memory of low-power mobile phones.[/quote]
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

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

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 12 guests