TheRealDannyyy's Forum Posts

  • Hi all, I have a topic on the main C3 board, but perhaps I should have just asked in here... how do you all get your games to start in fullscreen on desktop? The method I have used for the past few years doesn't work anymore. Is there an Chromium arg for this?

    Depends on the type of fullscreen you want. "Kiosk mode" can be selected while exporting, which forces the game to be in fullscreen forever. Default fullscreen can be achieved by simply running the Browser action "request fullscreen" on start of your 1st layout (ideally based on in-game settings).

  • I know C2 stores the default package.json that it uses to compile each time. Does C3 keep a default one somewhere so you don't have to edit the file each time you export?

    I think C3 generates that file on the fly while exporting. You should create a topic in the C3 section of the forum and ask the Scirra team directly.

  • TheRealDannyyy - Thanks, Got the "always_on_top": true, working.

    One final question. Is it possible to enable/disable the click-through feature ? I'm thinking since its enabled with the chrome flag via a shortcut there might not be a way of doing that while the app is running?

    Not aware of it. I think it requires a complete app restart to work, so I doubt it.

  • Clickthrough works great, but the window gets sent behind the new window you clicked on. It there a setting/flag for "always on top"?

    There should be an action for that inside the NWjs addon.

    Where do I find the package.json file for C3 Exported projects?

    With C3 you have the option to uncheck "package assets" and access it that way or as you already mentioned, rename "package.nw" to "package.zip" and edit it that way.

    NW.JS only opens its default loading screen after adjusting that file.

    Rememeber to name it back to "package.nw" after you're done. Also make sure that your package.json file has valid json code.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • TheRealDannyyy I've been trying to see if i can export nw.js and utilize the transparent window feature -http://docs.nwjs.io/en/latest/For%20Users/Advanced/Transparent%20Window/

    I'm hoping to make an overlay with elements on top of the users desktop as if the background of the app is see through. But i'm not having much luck. ...

    This is fairly easy to achieve but it comes with some limitations. You basically need to add "transparent": true to the window options and disable the window frame while exporting. Then you have to set the layer background in Construct 2/3 to transparent: Yes. You can now either set the body tag CSS code manually or execute some JS (might not work in C3).

    Code to make body transparent:

    "$('html,body').css('background','rgba(0,0,0,0)');"
    

    I did this example project a while back. Making it click-through is a bit more complicated. It requires you to disable GPU rendering, which will kill performance but I guess this won't matter if you make some sort of software. It's all up to you really, feel free to play around and ask more questions.

  • jobel here is a quick list of problems that started when I upgraded:

    • Firstly a lot of issues with opening local folder saves, once every 4 or 5 saves it tells me I don't have permission to save to that folder, but if I keep trying it eventually works. Tried multiple projects and locations and still get the issues.
    • Previewing just gives me a black screen about 30% of the time, so I have to restart everything.
    • Putting the app into fullscreen no longer seems to work on a trigger, as I'm making games for desktop then I have a function which sets the application to fullscreen on startup. This has worked for years but now doesn't. I even made a small file with a single 'on start of layout' event to set the application fullscreen. This works on the browser version of C3, but not in nwjs.
    • Finally I am seeing some weird visual issues, like hidden objects showing for a single frame when the application first previews.

    Please report all C3 editor related issues on GitHub. Scirra still looks into them, even the NWjs related ones. Make sure to provide all the info they need.

  • I've asked a question in their Google Group about the constantly refreshing canvas requirement. Maybe they know of a way to disable the "power saver" FPS limiting feature that Chromium is using.

    I'll get back to your addon, if that leads nowhere.

  • Hi, I noticed that sometimes the ForceRedraw plugin failed to redraw the whole window.

    That's because the addon changes the CSS values of the <body> tag, but sometimes, <body> doesn't span on the entire window, and so, on Letterbox Integer scale, the bottom part of the window would not get redrawn, and it would cause some tearing effect where the overlay properly redraws up until the bottom of the canvas, and not the black bar under it.

    I fixed it by making it change the css value of <html> instead, and by forcing <html> to cover the entire window at all times.

    Here is the fixed plugin: mega.nz/file/gllGna5D

    Thanks for providing an updated version of the addon. I'd recommend refeshing for an interval of at least 5sec or more and see of that helps. Maybe you could try to refresh both HTML and BODY at the same time.

    I'll further investigate this and try to find a solution to perhaps, stop Chromium's fps power saving behavior somehow, so that it always renders at 60fps.

    We'll further try to figure out why the overlay workaround doesn't work on your end on Github.

  • The Roundup has just been updated!

    Minor changes. Simplified and cleared up some confusing wording. Separated the "Steam Overlay Not Appearing" workaround (specifically: --disable-direct-composition).

    Changes:

    • <Added> How To: Workaround Steam Overlay Rendering Above Window Title Bar
    • <Added> How To: Workaround Game Canvas Not Rendering At All
    • <Improved> How To: Set Your Own Application Icon
  • I found the cause. The "--force-device-scale-factor=1" Chromium arg is messing up something when used in combination with "--in-process-gpu". Remove it and check it out yourself to confirm please.

    Edit: For some reason putting it as the last chromium arg seems to work. I personally still don't recommend the use of it. Same goes for disabling vsync. It will cause screen tearing and possibly more issues, since parts of the Chromium engine heavily depend on vsync.

    (The order of chromium args can also affect how things work. You'd generally want to move more impactful stuff like "--disable-gpu-vsync" for example, to the end of the list.)

  • Could you please upload a minimal project for reproduction (package.nw is good enough). You can use "480" as a testing Steam appid. Although it shouldn't matter for testing.

  • Whoops, turns out I was using NWJS 0.46.0. I made sure I was using the correct prebuilds (Chromium 83), and have a constantly refreshing canvas (every tick I rotate a 0-opacity object that stays in the middle of the screen). I've tried running it after uploading to Steam and running it as a "non-Steam game". Do you have any other ideas I can try to fix this?

    And to be clear, the game does indeed detect that it's being run from Steam, and achievements work. Just the overlay appears to be borked.

    I tried with the exact version, prebuild and your chromium args and it works. Is this happening with the Windows release or OSX; Linux?

  • Danny can you post a full list of the chromium args you're using?

    Your mentioned chromium args are all fine.

    I'm pretty sure you have the wrong prebuilds or you are not constantly refreshing your canvas. Also keep in mind that you need to add your game as a "non-steam game" and launch it there, if you don't have it up on Steam yet.

  • Anybody else having issues with Steam Overlay in NWJS 0.44.0 on Windows? Here's my chromium args, am I missing something or is something I added in addition to in-process and direct-comp breaking it??

    Tested using NWjs 0.44.0, matching prebuilds and the required "--in-process-gpu" chromium arg. Everything works fine on my end.

    Only thing that comes to mind is that your game canvas might not be constantly refreshing. Check out "How To: Workaround Steam Overlay Not Refreshing" for more info on that.

  • If I press F12 in preview to open developer tools, and then close the preview window, Construct crashes. I've trained myself to save the project every few minutes and always close the dev tools window before closing the preview, but still forget about this sometimes and lose my work...

    Is there any fix for this issue? I'm using the latest NW.js SDK version.

    Please report it as a bug on their Github, instead of posting here.