Scroll the window view left of the layout view

  • I'm creating a vertical shooter for desktop. The particular mechanics of this game require a playing field 4:3 in proportion, but of course most desktop screens are widescreen HD, 16:9, so I've decided to use the surplus screen to display a hud at the sides of the playing area. In the screenshot, the layout is 900x675 (4:3) and window size 1200x675 (16:9). Thus the dark green area to the left is outside the layout, and this is where I'd like to display my hud.

    So far so simple, but I would like to give the option of choosing the location of the playing field. Left, as in the picture, centre, or to the right. This would require setting the window position to something like x = -300 (playing field shown on the right) or -150 (centre). Can it be done? I think the alternative is going through my entire project and shifting every object +300/150 pixels, which would be pretty time consuming.

  • Set the layout property "Unbounded scrolling" to YES.

    You can scroll manually or create an object with the "scroll to" behavior.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Wow, surprisingly simple after all. Thank you!

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