How do I use very large background

  • Hi,

    Construct 2 is telling me my game is going to be using a lot of memory because I have a large background. The background is currently 10000x10000 as it is a Google Maps image of the centre of Manchester with a high zoom in. The problem is I actually intend to make this as big as 100000x100000 to cover the area needed. How can I make it so memory on devices is not being over used? I thought using the Google Maps plugin may be a good idea but users were given the ability to move the map rather than it being static and also it overlapped all of the sprites.

    Thanks

    Jacob

  • Just some math:

    10000x10000x4 = 400.000.000 bytes = 400MB of image memory needed for just that one sprite..

    I would advise against it..

    Strongly..

  • What would you suggest to work around this? At the moment Google Maps seems the best way however the plugin available will only go in front of the sprites.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Windows is telling me my sprite is only 5MB, so I may just continue with the current method if their isn't a work around and split the background into different sprites so it is contained in 1000px x 1000px blocks

  • Windows is telling you how?

    You mean the size the sprite is "on disk" as opposed to unwrapped in your image memory?

    No matter how well your image is packed (as png or jpg) while playing the game it will take 400MB of image memory..

  • Do as google does, slice it up in parts.

  • Do as google does, slice it up in parts.

    Which will only help if you dynamically load and unload them from memory, right?

    Which construct 2 doesn't do as far as I know..

    All images on a layout are loaded into memory at start of layout..

    https://www.scirra.com/blog/112/remembe ... our-memory

  • why power of 2 is better for background or tiled background ?

    example ? please

  • why power of 2 is better for background or tiled background ?

    example ? please

    From the Manual

    Which you can visit with the link at the top of this page, by the way..

    Power-of-two sizes

    For best results, use a power-of-two sized square image for the Tiled Background (e.g. 16x16, 32x32, 64x64, 128x128...). This achieves best results in WebGL mode. The object will still work correctly with non power-of-two sized images, but the quality may be slightly reduced since the image has to be stretched to a power-of-two size before tiling. (Note this does not apply to Sprite objects, which can use any size.)

  • No idea if it still works.

  • > Do as google does, slice it up in parts.

    >

    Which will only help if you dynamically load and unload them from memory, right?

    Which construct 2 doesn't do as far as I know..

    All images on a layout are loaded into memory at start of layout..

    https://www.scirra.com/blog/112/remembe ... our-memory

    Slicing it up in parts will aid the rendering. (Image not on screen etc)

    Also, some devices are unable to handle image of enormous sizes.

    He could, divide the sliced parts over layouts too. i.e. have 4 pieces on each layout, the cross section in the middle, if you come close to one of the layout edges, load the other layout corresponding to images.

    example, the 4 squares would be layouts, the transparent squares image parts.

    This could greatly reduce the performance problem. It just requires a bit of smart approach <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

  • Yeah it works but unfortunately it covers all of the sprites.

  • >

    > > Do as google does, slice it up in parts.

    > >

    >

    > Which will only help if you dynamically load and unload them from memory, right?

    > Which construct 2 doesn't do as far as I know..

    > All images on a layout are loaded into memory at start of layout..

    >

    > https://www.scirra.com/blog/112/remembe ... our-memory

    >

    Slicing it up in parts will aid the rendering. (Image not on screen etc)

    Also, some devices are unable to handle image of enormous sizes.

    He could, divide the sliced parts over layouts too. i.e. have 4 pieces on each layout, the cross section in the middle, if you come close to one of the layout edges, load the other layout corresponding to images.

    example, the 4 squares would be layouts, the transparent squares image parts.

    This could greatly reduce the performance problem. It just requires a bit of smart approach <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    I agree this seems the best way, at the moment the background won't run on iOS due to how large the bg is, so hopefully this helps.

  • Does anybody know, how to compile static maps covering a large area with large zoom e.g. cover whole of Manchester on one image on 19 zoom? Other than manually.

  • >

    > > Do as google does, slice it up in parts.

    > >

    >

    > Which will only help if you dynamically load and unload them from memory, right?

    > Which construct 2 doesn't do as far as I know..

    > All images on a layout are loaded into memory at start of layout..

    >

    > https://www.scirra.com/blog/112/remembe ... our-memory

    >

    Slicing it up in parts will aid the rendering. (Image not on screen etc)

    Also, some devices are unable to handle image of enormous sizes.

    He could, divide the sliced parts over layouts too. i.e. have 4 pieces on each layout, the cross section in the middle, if you come close to one of the layout edges, load the other layout corresponding to images.

    example, the 4 squares would be layouts, the transparent squares image parts.

    This could greatly reduce the performance problem. It just requires a bit of smart approach <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

    an .capx example to understand better what you want to explain ?

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