Fullscreen crop working in r262, but not r263/264/265?

0 favourites
  • 6 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • Any thoughts on what's going on here?

    In my game, I use the Browser object to request Fullscreen in "crop" mode, and in all C2 versions from r262 and earlier this worked as expected.

    In r263 and all later versions, Fullscreen in "crop" mode acts much differently, or at least it does in my game, and a few test projects I made to check that it wasn't just my game.

    Image 1: The game in a window, before going Fullscreen:

    Image 2: The game in Fullscreen "crop" mode, as previewed from r262, working as expected.

    The rendered area extends to fill the entire screen. The apparent scaling I'm doing in events.

    Image 3: The game in Fullscreen "crop" mode, as previewed from r263.

    The rendered canvas area remains the same size as the non-fullscreen window, and the rest of the monitor is just filled black.

    The blocky pixelation is occuring because my game's events expect the scene to be scaled up in fullscreen mode, and there's a post-process pixilation shader that gets likewise scaled up to match it. In this case though the larger "fullscreen" pixilation is being applied to the window-sized scene, which hasn't actually been scaled up, due to the new Fullscreen "crop" mode behavior.

    I saved the game in r265, and I now get an error when openning the project in r262. With the Fullscreen issue, I'm not able to work in r263 and beyond at the moment.

    Is there a way to manually edit a project's xml data to allow it to open in an earlier version of C2?

    I've made nearly no edits to the project in r265, so I think there shouldn't be too much worry about backwards compatibility.

  • Hey there Ashley, I don't want to bother you, but I was wondering if you had any suggestions regarding this change in Crop mode functionality.

    I'm not sure who else to ask, since I believe this change occurred between r262 and r263.

    Overview:

    In r262 and earlier, Crop mode behaves as expected, but from r263 and onward Crop mode behaves quite strangely in fullscreen, at least on my computer.

    One way to describe it is that it doesn't actually go fullscreen, but instead just stays the default window size and blacks out the surroundings.

    Example capx:

    This is a capx that makes it easier to test out what I describe below.

    dropbox.com/s/azvikt5jc23j2kf/r262%20r263%20Crop%20mode.capx

    If you preview it from C2 version r263 or later you'll see the strange fullscreen behavior.

    If you preview in r262 or earlier fullscreen works as expected.

    Example capx - Images:

    r262 Windowed, just for reference:

    r262 Normal fullscreen Crop behavior:

    r263 Strange fullscreen Crop behavior:

    Notice that the WindowWidth and WindowHeight readouts are showing the values of the default original window size.

    Details:

    In all my games, I've been setting the property "Fullscreen in browser" to "Crop" mode.

    Up to r262, Crop mode did no scaling of the game visuals when the window size changed or went full screen. Instead the game visuals stayed at a fixed scale, and the changing size and shape of the window would simply reveal more or less of the layout.

    So going fullscreen in crop mode, would just show more of the layout, and the layout would remain at 1x scale. (Or whatever scale it was at prior.)

    From r263 onward, Crop mode still doesn't adjust the game's scale when the window size changes or goes full screen. However now, when a game enters fullscreen, the new area revealed by the expanded "window" is solid black.

    As a result, the game is only rendered in a centered rectangular area, with the dimensions of the "Original Window" width & height, and it's surrounded by solid black out to the edges of the monitor.

    (By contrast, in r262, the game would be rendered out to the edges of the monitor, with no black letterboxing.)

    Additionally, when in fullscreen, the System object's WindowWidth and WindowHeight expressions return the width & height of only the rendered area, which as mentioned above is the "Original Window" width & height.

    (Conversely, when in fullscreen in r262, the WindowWidth and WindowHeight expressions would return the dimensions of the current screen resolution, as the game would fill the entire screen.)

    Possibly related:

    The only thing I can think of is that it might somehow be related to the fullscreen 'Centered' change in r263.

    "Browser: Request fullscreen 'Centered' incorrectly did 'Letterbox scale"

    scirra.com/construct2/releases/r263

    Otherwise I'm not sure what caused the change in the Fullscreen Crop behavior.

    Anyway, if you get a chance, I'd be interested if you have any thoughts, or questions.

  • It looks like it is this intentional change:

    Browser: Request fullscreen 'Centered' incorrectly did 'Letterbox scale

    Your project requests "centered" fullscreen mode, and now appears to correctly go in to centered mode, which is comparable to fullscreen mode "off".

    Maybe you should just change the type of fullscreen mode requested?

  • Thanks for the quick reply! :)

    So I just tried changing the action from,

    "Request fullscreen - Centered"

    to,

    "Request fullscreen - Stretch (crop)"

    (Looks like this now)

    (Tried posting the image several times but it doesn't show up, so linking instead.)

    i.imgur.com/nLuE9q1.png

    but I get exactly the same issue, an original-window-sized rendered area with solid black fill out to the edges of the monitor.

    I got this testing in both r263 & r265 just now.

    After that, I rolled back to r262, to see how the "Stretch (crop)" would work there, and I get the behavior I'm used to, where the game fills the screen.

    So it looks like the fullscreen actions "Centered" and "Stretch (crop)" both do the same thing, at least on my computer. In r262 they both make the game fill the screen, and in r263, they both make the game stay window sized and black-fill the rest of the monitor.

    I tested in NW, Firefox, Chrome, and Iron. I also tried disabling my second monitor and re-testing, just in case that was somehow involved, but there was no difference when using 1 monitor or 2 monitors.

    Updated capx:

    I updated the capx to use the "Stretch (crop)" action:

    dropbox.com/s/wn1h3d2lqwcvwbh/r262%20r263%20Crop%20mode.capx

    Just noticed something:

    Is the "Centered" action actually supposed to do the centered window and black fill that I'm seeing in r263? That would make sense going by its name. The problem I'm running into is that "Stretch (crop)" is also doing the same thing in r263.

    It seems like in r262, "Centered" and "Crop" both act like a "Crop"; and in r263, "Centered" and "Crop" both act like a "Centered".

    Is it possible that's what's going on?

    I could also be overlooking something, so I don't want to get ahead of myself.

    Is there anything else you can think of that might be worth testing?

  • I think you should file a bug for this, it wasn't intended to change the crop mode, only centered mode.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Okay, just posted a bug report, as per your suggestion.

    Thanks again for helping me look into this Ashley. You're the best. :)

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