Request: ProjectWindowWidth/ProjectWindowHeight

0 favourites
  • 6 posts
  • Hi,

    Here's the problem:

    We currently have:

    • WindowWidth,WindowHeight being the size of the area used to display game: it's the screen-space available width and height (minus the size of the black bars in letterbox)
    • LayoutWidth, LayoutHeight: always equal to the layout sizes set in the project
    • ViewPortRight,Bottom,Left,Top: which allows us to get the projected width/height of each layer (how wide the viewport is, in layer-space coordinates)

    But, in all that, unless I missed something, we lose the windows size defined in the project.

    It can be a good information when we want to implement "manual" letterbox... (for instance in cocoonJS...)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Do you have any use cases for this other than "manual" letterbox? Only CocoonJS lacks this feature, and we will likely deprecate support for CocoonJS in the near future due to problems like this.

  • Ashley

    Well, as a general rule, I'm usually for exposing as much information as possible.

    Now for other use cases, I could imagine some people wanting to personalize the letterbox scale mode either by having other colors instead of black bars, or even some special images/background/animation/ads

    The scale outer could almost do the trick, but you need to know the original windows size set in the project if you want to emulate viewportRight/Bottom/Left/Top and Viewport Width/Height (here viewport means the playable area without the letterbox areas)

    Also, in some games, like infinite scrollers, I handle the scaling myself to fit any screen ratio (using crop mode, unbounded scrolling and tweaking layoutscale and scrolling by hand). Having the original window size allows for a more consistant "game-space" through the different ratios.

    Though, since I use unbounded scrolling, the size of the layout doesn't really matter anymore and I use those values instead.

  • Now for other use cases, I could imagine some people wanting to personalize the letterbox scale mode either by having other colors instead of black bars, or even some special images/background/animation/ads

    +1. I have plans on using special image for this case so I support this request.

  • Only CocoonJS lacks this feature, and we will likely deprecate support for CocoonJS in the near future due to problems like this.

    Please make sure PhoneGap (and iOS userbase) is ready before you do AND notify us early enough. CocoonJS is still the fastest option when publishing on iOS. If you drop support out of the blue, that would cripple my next 2 upcoming games for good and I think I am not the only one.

  • Deprecating means hidden-by-default but still accessible, not completely removed. We know people still depend on it.

    I'll try get the expressions in for the next beta.

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