Change layout width and height at runtime

0 favourites
  • 5 posts
From the Asset Store
Plugin Transition Layout C3. Layout opening and closing animation for C3. Quickly set up transitions between lay
  • You can set the width and height of the layout at runtime(from the events?).

    I see that you can set the canvas size, but you can change the layout size?


  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Bump? lol

    If you're trying to build a real desktop game then being able to change the resolution is a pretty standard (and expected) feature.

    Any possibility of this happening?

  • DLZ: This tutorial is what you need to read and do

    gonpla: There is no way to change the layout size at runtime.

    You don't really need it normally.

    A useful trick might be to go in the layout proeperties and set "Unbounding scrolling" to "Yes".

    May or may not be useful, it depends on the game you're making.

  • Another option is to use crop fullscreen mode. Then your canvas is the maximum size possible, you have entire browser window to play with. You can make a massive background (e.g. from a single pixel tile), then put your game anywhere on it by moving your objects, incl. level backgrounds around. You can put sprites and text objects into two different families, then use bullet behavior on them to move them, or pin all your objects to a background and move that. you can also set the layer scale to make the game bigger or smaller without having to do anything (this is basically letterbox scaled mode but with the ability to set your own background colour)

  • The proposal of nutmix is interesting. I'd like to go that way, because I think that to have flexible screen resolution is important and really needed feature.

    It would be very appreciated to have integrated functions in C2 to "detect" the users browser and screen resolutions and to have the possibility to "set" the window size to that.

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