Example: infinant tiled background

This forum is currently in read-only mode.
From the Asset Store
Unlock platyers earning coins, and save it with Localstorage
  • Yea, i know, I'm new to the forums but I've been lurking around for a month or so. But i noticed there is a lack of example of how to setup an infinite background so i decided to make one.


    Although i have a feeling that I'm missing an easier way of doing this, but on the bright side it shows how to expand adjustable background scrolling to outside the normal layer "window"

  • Nice example!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • There is a way to do it with a single event.

    • First, you need a tiled background with texture in size of power of two (16x16, 32x32, 256x256 ex.)
    • Put the tiled background on a layer that has 0% X and Y scroll rates. Make it cover the whole display.
    • Make an Always event like this: +Always TiledBackground: Set offset to ScrollX, ScrollY[/code:2bejle25] (You can add a factor like ScrollX*0.5, ScrollY*0.5 to make it scroll more slowly)
    • You'll also need to scroll the display, just add this to the Always event: > System Scroll to X ScrollX+(MouseX-ScrollX)*TimeDelta

    System Scroll to Y ScrollY+(MouseY-ScrollY)*TimeDelta


    (This will always scroll the display smoothly toward mouse coordinates)

    Make sure you have Unbounded scrolling ticked in Layout Properties


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