How do I manage a huuuge background image ?

0 favourites
  • 13 posts
From the Asset Store
Elevate your games with our AI Chatbot Integration! Seamlessly connect your Construct 3 projects with GPT-4 for dynamic,
  • 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

  • You should stop, and design your game differently. Read: Remember not to waste your memory

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

  • Thanks guys...

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

    thanks

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

    thanks

  • 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 .

  • 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.

  • spacedoubt sorry I stand corrected

  • 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

  • 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.

  • I see

    AAASSHHLEYYY we need ur help !:) can U give us a few tips ?

    thanks

  • a single pixel wide image will not consume too much memory if tiled that way. tiling is just a rendering issue and pretty fast at that.

    it's not the same as having a 10K*20K image prepared and you are only showing part of it. that doesn't count as an off-screen object as it is partially on screen and thus must be rendered/handled.

    I think the big question is as Ashley said ... design your game better.. what are you trying to achieve

    someone else also suggested the debugger... it's pretty useful.. as is the simple memory usage counter at the bottom of the C2 window... have a try about just creating a single color image and stretch it as you need to... see how much memory it takes.. run a few tests with your tiles and see how fast it runs. experiment a little.

    however I suspect that with clever use of parallax and layered images/sprites you can get all the effects that you want.

    R

  • thanks I will try that

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)