Scrolling background with Letterbox scale

0 favourites
  • 4 posts
From the Asset Store
Classic style beat'em up template. Punch & Kick foes across the screen.
  • Hi,

    I use a scrolling background in my project... It works well...

    But when I use it with the "Letterbox scale" my background don't cover all the layout.

    Someone can help me ? :)

    Or it's a bug ? :(

    This is my .capx :

    http://dl.dropbox.com/u/25194731/Z-contamination-2.0.capx

    tks.

  • What do you mean by 'letterbox scale'?

    I noticed you're trying to make the background scroll by doubling the size of the background at program start and then having repositioned once it gets off the screen. This is a little inefficient in my opinion.

    Just make a layer for the background, load the background image as a sprite, and then set that sprite to wrap. Have the sprite move some number of pixels on every tick, set the parallax to the background layer to something like 100, 30 and that should do it (you may have to make a few tweaks).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • why move the sprite every tick if you are setting parallax? And is there an advantage to wrap as opposed to using a tlied background object and setting it to the width of the layout?

  • No idea on the sprite and parallax, I'm probably just getting confused because I'm working on a space shooter that uses multiple moving backgrounds.

    There isn't one method that's better than the other in the case of sprite with wrap versus tiled background object. My claim was that he was doubling the size of the tiled background and repositioning it after it got off the screen, and I felt that it could be more optimized.

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