How do I make a sprite work like a tiled background

  • Hi everyone, so im trying to make a sprite work like a tiled background, i managed a way to make it work (like a year ago), but however it's not a good thing for mobile devices (as i tested a couple of days ago). I've tried multiple ways to make it work but it simply doesn't, there's a link to a test capx which it is the Auto Runner Example but modified to have the tiled background as a sprite. If you would like to test this, i would recommend to have both the original example capx and the modified one side by side, to compare or not lose track of what's going on. I've been trying this thing for about 4 days now and still nothing is working for me, maybe one of you guys have more experience in Construct 2 than me and would like to help, please if you have an idea test it in the modified capx i made, if it works let me know and if you want you can put your modified capx.

    Link to Test Capx:

    Thanks for your attention!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • What is the reason for trying to do it this way?

    Why it doesn't work?

    The tiled background in the original example is twice as wide (the same background is repeated twice)..

    Also the origin of the tiled background is in the top left corner and for the sprite is in the middle, which ofcourse makes a difference for the x-coordinate..

  • So im making a runner game, it utilities a very similar way of the background in my game (but with a sprite), i used a method which worked for me (at the time) but now as i test with the LAN preview on my device, the background texture reaches it's maximum. I used the sprite instead of the tiled bg because in the tiled bg you can't changed the image or texture as a sprite does which annoys me.

    And yes the background is repeated in the original example, in my solution i used the proportions that my game's tiled bg had, applied it in PS and repeated the BG over and over, made the sprite texture and applied it to the game, which it works just fine on pc, but when you test in on mobile it doesn't display because an error pop's out saying that the BG reaches it's maximum proportions.

    That's why im here asking.

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