How do I manage a huuuge background image ?

Get help using Construct 2

Post » Sun Sep 21, 2014 7:11 pm

HI GUYS, I have a huge layout 10000x20000 pixels....If I would like to have a biiig moon as background image with a slow parallax scrolling...what should I do now ????
Shall I do a photoshop blury moon of 1000*1000 and strech it ? will a streched image slower my game ????
Is that layout size something crazy ????


thanks :)
B
38
S
16
G
2
Posts: 453
Reputation: 4,902

Post » Sun Sep 21, 2014 9:46 pm

You should stop, and design your game differently. Read: Remember not to waste your memory
Scirra Founder
B
402
S
238
G
89
Posts: 24,644
Reputation: 196,095

Post » Sun Sep 21, 2014 9:51 pm

you have to consider 2 things.. the visual resolution if you are going to scale up by that amount... I think each pixel becoming a 10x20 blob would be very blurry.

the second thing is that the memory storage I think is based on the expanded image size and not the stored image size. Stored image is for download, but in-game, it needs to be expanded. in that case you could be looking at a huge memory issue.. 10K*20K*4 (rgba) = 800 MB for the backdrop...

I think you could achieve whatever you want with appropriate parallax scrolling of layers. if you look at how some other games have done it, they've overlayed a number of simpler images to create a complex composite.
B
7
S
3
G
1
Posts: 184
Reputation: 1,352

Post » Mon Sep 22, 2014 4:34 am

Thanks guys...
to Ashley: ok the image size I understand is totally crazy...but the layout size , is the size relevant for memory ?

thanks :)
B
38
S
16
G
2
Posts: 453
Reputation: 4,902

Post » Mon Sep 22, 2014 4:47 am

I mean if I make only many smale sprites...can the big layout size still be ok ?

thanks :)
B
38
S
16
G
2
Posts: 453
Reputation: 4,902

Post » Mon Sep 22, 2014 5:29 am

Unless there arent that many sprites, use debug mode to measure memory usage .

Even though not all images will be on screen at once all those images/objects must be rendered, taking up memory .
B
6
S
2
Posts: 151
Reputation: 1,366

Post » Mon Sep 22, 2014 6:02 am

EyezWidee wrote:Even though not all images will be on screen at once all those images/objects must be rendered, taking up memory .


Gonna have to disagree on that point.

From the Performance Tips section of the manual:
Off-screen objects are not still rendered. Construct 2 does not issue draw calls for objects that do not appear in the window, and the GPU is also smart enough to know not to render any content that appears outside the window - even when a single image is only partially on-screen.

@mariogamer Also from the Performance Tips section:
Number of layouts also is unlikely to have any effect other than the download size. The layout size also does not have any direct effect; larger layouts do not use more memory or require more processing, unless you use more objects.
B
88
S
43
G
71
Posts: 601
Reputation: 43,669

Post » Mon Sep 22, 2014 1:47 pm

@Spacedoubt sorry I stand corrected
B
6
S
2
Posts: 151
Reputation: 1,366

Post » Mon Sep 22, 2014 2:16 pm

What would U guys suggest to have a large gradient sky ...if I make a gradient 1pixel x 200 pixels...and trech it...it would be still to heavy if I go to cover huge layouts...did I understand that correctly ? how would u guys manage that ?

thanks to all :)
B
38
S
16
G
2
Posts: 453
Reputation: 4,902

Post » Mon Sep 22, 2014 7:09 pm

If it's just a straight gradient I'd recommend a tactic used in web development from before native gradients:

Make a gradient 1px wide and however tall you need, then use the "tiled background" object. I'd say you can stretch it horizontally but after reading ashley's post I'm not sure if the engine will render as a giant mess or not.
Last edited by skelooth on Mon Sep 22, 2014 7:39 pm, edited 1 time in total.
Developing Surolace, the survival role playing space game.

surolace-survival-role-playing-space-game_t116953
B
14
S
4
Posts: 303
Reputation: 1,730

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 8 guests