Best Practice - Sprites on Dedicated Screen?

Discussion and feedback on Construct 2

Post » Fri Feb 14, 2014 3:24 pm

Hi there,

I'm working on a new project that deals with a lot of text fields. I'm spawning these text where they need to be, but i'm wondering if maybe it's better to just put all the sprites i create on a separate scene that never gets used, but just holds all the assets. Because having numerous unique text sitting on the sidelines around a given scene can be a bit unruly to manage. Thought maybe putting them all on some other scene that never gets viewed might be a way to better organize and manage things.

Also, when it comes to memory usage, if i have a single background that gets used in many scenes, is that going to save memory or is each scene going to allocate it's own memory for that scene?

My prior project had a lot of problems with memory when bringing over to mobile so I'm trying to be sure that I don't run into the same problem this time around

Thanks!
Calebpart12studios2014-02-14 15:27:44
B
59
S
9
G
1
Posts: 942
Reputation: 6,553

Post » Fri Feb 14, 2014 7:11 pm

it is very common to have a layout that holds an instance of every object. This keeps your playable layouts cleaner and also gives you a sand box for testing things like aligning image points for pinning etc... without having to mess with your playable layouts.
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,583

Post » Sun Feb 16, 2014 5:13 pm

ok cool glad to know that's an acceptable practice. i just wasn't sure if it cause any issues with say. memory management

does anyone know if having the same background in each scene uses more memory or perhaps i should instantiate everything at "on start of layout"? Basically have as few assets in the scene before runtime as possible.
B
59
S
9
G
1
Posts: 942
Reputation: 6,553

Post » Fri Feb 28, 2014 4:21 pm

take look to this Blog: https://www.scirra.com/blog/112/remembe ... our-memory
the part where they say :

"In Construct 2, images are loaded layout-by-layout. This means when a layout starts, every object on the layout is loaded in to memory immediately."

I understand for this that is important to reduce as much images as yo can in the game, and avoid large images in the game.
B
9
S
4
Posts: 49
Reputation: 1,239

Post » Mon Mar 03, 2014 4:30 am

@juannn91 yea we read this but they mean when C2 is running a game in a normal browser.

In our extensive testing (I'm working with my partner who's a capable HTML5 developer and experience with OSX / Android) he could see very clearly when the game was being loaded using I believe XDK or maybe Ejecta, that EVERYTHING was loading into ram at the start of the app, not scene by scene..

This is unfortunately probably something that C2 has no control over, once its wrapped in another container system, memory management gets lost in the process.

Our 2nd project is being made for mobile and going much smoother, although I sill have to watch out for large audio files causing problems. Asside from that our 2nd project which has considerably less content and content optimized for mobile (keeping things in powers of 2 and starting with a 720p screen instead of 1080p)

So yea our next move is to simply go back and scale down all of the art considerably. this will cause some issues with visual quality, but we're optimistic that on an ipad it will be less noticable than if it were on a 26" monitor.
B
59
S
9
G
1
Posts: 942
Reputation: 6,553


Return to Construct 2 General

Who is online

Users browsing this forum: Refeuh and 20 guests