The Big NW.js Roundup - News & Tips

From the Asset Store
Jump over the small square and avoid hitting it as long as you can!
  • EDIT: If anyone needs this to be ported to C3, also do tag me, or I'll just eventually port it one day when I have some time.

    skymen Yes please, port it to C3 :) That would make my life much easier! I would super appreciate it.

  • Sorry, I am a bit new at this tactic of raw code input.

    How abouts do i plug these lines of code into C3?

    (i do apologize because you basically explained it already. but i just cant seem to wrap my head around it.)

  • When you right click on the event sheet, select Add, then Add script (with the JS icon).

    Then just paste the code there as it is.

  • Oh wow, that was easy.

    Thank you HeadBang.

    I've never played with the JS features, haven't even known they existed TBH. lol

  • Hey,

    After speaking a bit with Dannyyy, I cleaned up the updated ForceRedraw addon I made.

    https://www.construct.net/fr/construct-2/addons/435/greenworksredraw ...

    Thanks! I've tested "Activate constant redraw" using letterbox integer scale and it worked as expected. From my measurements, this has next to no noticeable performance impact but it might vary based on the device.

    Updated the Roundup with this new info. If you decide to port it to C3, please add a "tip" with a C3addon link to the top of your addons page. Should be good enough for people to find it that way.

  • I ported the addon to C3 and I updated the C2 addon (I fixed a bug that I noticed when porting the addon lol)

    Here is the new C3 addon:

    construct.net/en/make-games/addons/436/greenworksredraw

    And please download the new version of the C2 addon if you happen to have the older one.

    construct.net/en/construct-2/addons/435/greenworksredraw

    There you go Fib :)

    I ported this and didn't test it (since the code is pretty simple).

    If for some reason anyone does encounter any issue, I'll get my dumb ass to fix it and actually test this time.

    EDIT: Ended up testing it, it was unsurprisingly broken, and had 2 bugs in it lmao. Good times. Haven't tested the Steam export yet, cause I don't have a Steam project setup for C3 at the moment.

    (Update is up on the addon exchange)

  • Thank you skymen! I may be able to test it out as I have a C3 game on steam. We'll see if I can get it up and running.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have a question related to NWJS export, is it possible to disable some of the export options (Mac, Linux, Windows) to speed up the export? I guess it is in C2 script files but I can't figure which one;

    I currently export only on Windows, so removing the extra Linux/Mac export time would be nice, thanks!

  • I think the only way is foul play.

    Go to the NWjs installation directory and delete the mac and linux folders.

    This will generate an error notice when exporting but you can avoid the export time for those systems.

  • It's pretty much as PabloDev said. Keep the folders but remove the contents. Construct 2 will then complain about missing files, if possible skip or just add back some of the files it requires. I'd also recommend running Construct 2 on a fast SSD and exporting to the same SSD to speed things up.

    I think all the exporting code is inside "html5.exporter.dll" and the Construct 2 executable but I don't want to get into legal trouble with Scirra by finding out.

  • Alright, I'll do that, thanks for the help!

    EDIT :I forgot to ask another question, is it possible to install the most recent versions of NWJS without the NWjsforC2 installation file?

  • So I've been doing tests of viewports between two computers, one is 1366x768 (on left) and the other 1920x1080 (on right), the game start resolution is 854x480, letterbox scale integer, NWjs V0.47,

    however I have 2 different results :

    Top text is browser inner width/height and the one below is NWJS width/height;

    The size is correct on the smaller screen, but on the bigger one, if sized to 854x480, the windows is larger than the game viewport and creates large black borders, I had to resize it to the dimensions on the picture to obtain the same visual dimensions (one pixel before the letterbox down scaling);

    The un-resized NWjs window on the HD screen is equal to 1074x640, which is way bigger than the intended 854x480;

    Is it how NWjs handle different screen sizes/res, or is it a know bug? Thanks for your time

  • So I've been doing tests of viewports between two computers, one is 1366x768 (on left) and the other 1920x1080 (on right), the game start resolution is 854x480, letterbox scale integer, NWjs V0.47,

    however I have 2 different results ...

    Is it how NWjs handle different screen sizes, or is it a know bug? Thanks for your time

    Please upload something for reproduction. Images and long explanations just make things confusing and difficult to debug. I have a 1920x1080 screen, so it should break on my end.

    EDIT :I forgot to ask another question, is it possible to install the most recent versions of NWJS without the NWjsforC2 installation file?

    Install to a separate location and copy the files manually. If you do things manually, you also have the option to download the SDK versions from here. There will be no more installers after C2 is sunset, better to get started with it now.

  • I'll upload a test file in a moment when I can access the other PC, I want to be sure it happens with an empty project;

    Also by installing, you mean download the new version and drop the folders in the NWjsforC2 directory (the one created by C2 installer) or this is a different method of installation? Thanks

    EDIT : I made an empty project (854x480, letterbox scale integer, not resizable, NWjs V0.47, C2 r275)

    with a text indicating dimensions of viewport, browser and NWjs, same issue happened, based on the text viewport and browser inner size are almost the same, yet there are borders around it :

    drive.google.com/file/d/13id6x3ygOSt6UgpGremQ9eRfLgaMi3t0/view

    Tell me if you need anything else

    Also a friend with a screen the same size of mine tested it , and this time it scaled down, I don't get what is happening

  • EDIT : I made an empty project (854x480, letterbox scale integer, not resizable, NWjs V0.47, C2 r275)

    with a text indicating dimensions of viewport, browser and NWjs, same issue happened, based on the text viewport and browser inner size are almost the same, yet there are borders around it :

    https://drive.google.com/file/d/13id6x3ygOSt6UgpGremQ9eRfLgaMi3t0/view?usp=sharing

    I could reproduce it. Looks like NWjs version v0.47.3 [SDK] fixed it. Would you mind trying to reproduce it on your end to confirm it's fixed?

    (Please don't use single process anymore. It's always bugged and gives no advantages in general.)

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