Request: ProjectWindowWidth/ProjectWindowHeight

Discussion and feedback on Construct 2

Post » Tue Sep 02, 2014 11:58 am

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...)
B
66
S
22
G
14
Posts: 1,484
Reputation: 16,511

Post » Tue Sep 02, 2014 3:39 pm

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.
Scirra Founder
B
395
S
232
G
88
Posts: 24,371
Reputation: 193,762

Post » Wed Sep 03, 2014 7:46 am

@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.
B
66
S
22
G
14
Posts: 1,484
Reputation: 16,511

Post » Wed Sep 03, 2014 8:08 am

Yann wrote: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.
B
28
S
8
G
4
Posts: 553
Reputation: 4,924

Post » Wed Sep 03, 2014 8:09 am

Ashley wrote: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.
Image
B
96
S
36
G
17
Posts: 351
Reputation: 15,903

Post » Wed Sep 03, 2014 12:50 pm

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.
Scirra Founder
B
395
S
232
G
88
Posts: 24,371
Reputation: 193,762


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 5 guests