Fullscreen on start of layout: Am I missing something?

0 favourites
  • 12 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • I'm working on a PC game, so I will export the project with NW.js.

    I want to start my game on fullscreen using the Browser plugin. "On start of layout -> Request fullscreen" on the first layout just doesn't work, nor using preview, neither if I export the game with NW.js.

    I can set the game fullscreen only if I click on a button or take an action.

    Am I missing something? What I'm doing wrong?

  • From the manual : Note the browser may ignore this request unless the action is in a user-initiated event, such as a mouse click, key press, touch event or button press.

  • From the manual : Note the browser may ignore this request unless the action is in a user-initiated event, such as a mouse click, key press, touch event or button press.

    I've read the manual, and there was (now it's gone) another line after the one you quote:

    "(The one exception to this is NW.js which can request fullscreen at any time.)"

    Is this no longer true? And, even stranger, if I put the same condition ("On start of layout -> Request fullscreen") on the fourth or fifth layout, it works fine...

  • Then it's resolved. I guess the request is too early for the browser if it's the very first event

  • Well, the game can't automatically go fullscreen only after the loading layout, the splashscreen and the intro...it doesn't make any sense.

  • Ok, it seems that you have to click on something on the screen to "activate" it, and after that any conditions can trigger the "Request fullscreen" action.

  • Click is a "user-initiated event". So either the manual is wrong saying that it's not needed in NWJS, or it's a bug.

    I suggest reporting it:

    github.com/Scirra/Construct-3-bugs/issues

  • I mean you're asking me if a line that doesn't exist is still true, not sure how I can help with that. All I can see is the manual and I cannot see this line about user event not required for NW.js.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Found it here

    construct.net/en/tutorials/exporting-desktop-apps-nw-js-15

    FULLSCREEN MODE

    To run NW.js exports in fullscreen mode, as with other platforms use the Browser object's Request fullscreen action. Normally in a browser this cannot be used automatically, and requires a user input event to work; however it can work automatically in NW.js. Therefore you can use Request fullscreen in On start of layout to automatically put an NW.js game in to fullscreen mode.

  • Hello!

    I was wondering if you have yet to find a way to bypass your fullscreen issue on starting up the game.

    I'm having the same complication, having the game require a click (keyboard) input in order to set it to fullscreen.

    Would love to hear if there's a fitting solution out there.

    Cheers

  • Hello!

    I was wondering if you have yet to find a way to bypass your fullscreen issue on starting up the game.

    I'm having the same complication, having the game require a click (keyboard) input in order to set it to fullscreen.

    Would love to hear if there's a fitting solution out there.

    Cheers

    Not really: I've added a selection when the game starts between Fullscreen and Windowed, forcing a click of the user, but I know that it isn't the best solution...

  • Okay! Thanks!

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