I am very much stuck I think.. I downloaded Node.js and then exported my construct project with NW.js.
But after that I feel helpless because I am a noob with these software Node.js.
I open the Node.js and all I have is a black command screen.
I don't know how to use it with my NW.js export and where to find index.html in order to use your code.
It is such a shame that NW.js does not allow us to change the resolution in-game and I think that this is a feature that any game engine should have. I am making a game with resolution 1920x1080 and trying to give opportunity for example 1366x768 resolutions to play my game. This is essential and if someone wants to publish a game on Steam (like me for example) it becomes a frustration.
So I started searching for solutions, I think maybe this is possible by using "windowed fullscreen" because regarding my tests I get these resolution change results if I resize my game in a window. So maybe this is a workaround if we can have this result in a borderless windowed fullscreen.
Ashley should as well come-in this topic and explain us how we can publish on Steam without having this essential option to change the resolution for desktop users like any game engine does.
Thank you for replying loneDreamer and I would like to ask you if you can explain me how to add your code like you would explain it to a 10 years old. I am not familiar with software like Node.js and need help with this.
Take note, I'm on Windows so if you are on another operating system such as Mac the instructions may differ slightly.
1: Open your project (your created game) within Construct, test it to see if your game is working by previewing it, if you have a black-screen you should search through the other posts related to your issue as there is probably someone that has the same issue and has had it solved, if not, lodge a post asking for help in the forums if you cannot solve it yourself, ..also I sometimes get a black screen during previews but after restarting it resolves itself
2: Ensure you have the "NWjs" object added to your project in the project pane on the right under the Objects folder, if not, go to one of your layouts right click > add object > NWjs, save your project, test and save
3: Click on Menu at the top of the screen within Construct, then Project > Export, "Desktop (NW.js)" should appear, click it then next, choose your options, on the next page take note of whether-or-not you tick "Package Assets" and then continue through the export process, save the file to your desktop
4: Extract your game from the exported zip (if zipped) to your desktop and open the folder. If you chose to package the assets, you will see "package.nw" in your exported game folder, explore (open) it with an archive program (7z) and then edit index.html by right clicking > edit with notepad--Otherwise if you chose not to package the assets, simply edit index.html and forget package.nw
5: Within the Body /Body tags of the html code, create the tags Script and /Script, within the script tags, add the code in my previous post, then save the index.html document, your archiver will detect that package.nw has made changes and will ask you to update the changes once you close index.html
6: Running your game should open it in full-screen mode and through the assigned key in the code I posted earlier you can press "F10" to toggle between full and windowed-mode.
I don't know if you can change the window width/height (other than canvas) through Constructs events, however, I think it might be possible through Node.js Chromium as the arguments are on NW.js Documentation page under Docs » References » Window. Javascript might also work which can be added through the scripting area of the index.html or possibly in the scripting area in the events area within Construct but you'll need to test it yourself
Good Luck