How to use a large sliced bg image

  • Hi!

    This is my very first Construct 2 project and I'm wondering how I should load up my background.

    I have a huge background image (originally something like 8000 x 1000 px) which I have sliced into 1024x1024 chunks in Photoshop.

    How can I now accurately place these slices as a background in Construct 2 without leaving any gaps between them? I tried to use the "tiled background" feature but couldn't figure out how to load multiple images side by side..

  • Hi,

    you may wanna use a couple of different approaches here.

    Tiled Background is for repeating parts, there is no way of putting in multiple images here.

    So either go reduce your background to a repeated part, and parts that differ and place those parts as sprites or as tiled backgrounds as well.

    There is a tutorial in the tutorial section by Ashley which covers performance.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi!

    The background is a photograph and every pixel is unique so I can't make use of repeated tiles.

    Was the tutorial you are referring to called:

    "supporting-multiple-screen-sizes"?

    I'm not sure which part of that tutorial applies to my situation.

    How would you approach adding multiple background slices together without leaving small gaps in between?

  • You could place them on the layout manually.

    But I guess you have a reason for slicing the image up.

    Why do you need such a big background without repeat?

    Even with slicing it will take a considerable amount of graphic memory.

    8000x1000x4 bytes to be precise.

  • I had to slice it up because otherwise I got errors from crossing the 2048x2048 image size boundary. I need such a big background without repeat because the game happens in a real place (photograph).

  • Simply place them all next to each other like this. (assuming you have 6 pieces)

    on layout start

    part 1 - set position 0,0

    part 2 - set position part1.width, 0

    part 3 - set position part2.width, 0

    part 4 - set position 0 , 0-part4.height

    part 5 - set position part4.width, 0-part2.height

    part 6 - set position part5.width, 0-part3.height

    this puts them in a 2x3 grid

    im sure there's a fancier way to do it with an array, but im not as good that those.

  • slice them up as you have them. Pute them in 1 single sprite as different frames(don't foget to turn set animation speed to 0)

    turn on snap to grid then you can place manually.

    if you need to place dynamically. Then justifun is the better method to do it programattically.

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