Jase00's Recent Forum Activity

  • Thank you for your understanding reply!

    We marked it deprecated in r421 back in January

    ...oops, I missed that. Not an abrupt suprise after all. I seemed to have confused with the various community chatter where some of it is "What if X gets removed, prepare!" and some is "X will be getting removed, prepare!". As with r450, indeed a lot was going on at once.

    This also came up on Reddit and I explained in much more detail why we've done this in this comment. I won't repeat what I wrote there here, so do go and read that for the background on this.

    Thank you, and I fully read both reddit posts. I suppose a number of points are echoed in what I had written originally, like the experimental flag thats not recommended - It's just a shame we can't "choose" to risk it for a possible outcome we desire. I wonder about "--in-process-gpu" - Isn't it a Chrome flag, so should work in any Chrome engine, or is it that WebView2 is just built different for that one specific case? If there were a way for WebView2 to have this flag, and devs can choose to run the risk, then, that'd be a major incentive imo

    Broadly speaking it is time to move everyone over to our own desktop export options. The maintenance work is a key consideration as we are a small company with limited resources, and maintaining two options for desktop exports is a significant drain on resources, particularly given how tricky NW.js is to maintain and customize.

    Completely understandable - One query: LTS is supporting NWJS for another year or so, does this mean build server gets new NWJS versions, Steam plugin gets new SDK update still, and any bugs to C3's NWJS plugin introduced from a new NWJS version would be looked at? Or is LTS frozen in time with no added NWJS build versions, no fixes if C3 reacts buggy to a newer NWJS version? If the former (which I'm thinking is not the case lol), wouldn't it be good to keep NWJS until the LTS version has finished, since workload remains the same and is just excluding the fixes added to LTS from main C3?

    Oops, that shouldn't happen - fixed that for the next beta.

    ... I gotta quit with walls of text, I apologise. This was the main crux - I presumed too much from this error, I thought it was a strict "yep we have ripped it out, you gotta remove NWJS plugin if you want your projects to remain alive", which was painful, as mentioned with the desire to test my project with r450 but unable to. Roll on Tuesday!!

    I am well aware how difficult these transitions can be, and I can assure you we absolutely plan to stick with WebView2 (and our other desktop export options) permanently, and would only change technology again in extraordinary circumstances.

    I hear your commitment and it is reassuring. Your community cheered loud in that Steam thread for you (inc myself and I argued with someone being unhelpful there, too bad it was more of a public-facing forum and not the dev area which is restricted), we do believe in you.

    I do hold opinion that bundling the browser engine is preferable. I have nightmares back in C2 where Audio broke in all exports in latest browsers, and Scirra fixed this, but everyone had to re-export their projects. I like the possibly-ill-perceived stability of a bundled browser (its why I mention Fixed version of WebView2 being desirable within C3, rather than a separate guide to build it), where at least things like that old C2 Audio issue won't strike (but I am also aware a simple windows update can have a similar affect. Can't win really. I suppose if had to choose, I'd go the "blame windows update" path, as it feels like it's more likely to have affected other games due to a win update).

    It was different in the past, but at this point, the entire node.js component of NW.js is basically redundant. It provides a large API surface, but geared towards server-side development.

    I find this interesting and will take it as a warning. I have explored node modules and found various useful things that help with communication to the desktop, to other apps, etc - Though I am relying on existing npm modules whom have done the work of coding this and prob used C++ and such - and maybe most are indeed Server-related usage, and I only found the odds and ends that do light communication with desktop.

    Our new wrapper extension model basically means you can write C++ code that directly interacts with JavaScript via a simple messaging system, which makes it much easier to integrate custom native code.

    I really hate to ask, but I'd love to see a guide/blogpost on writing a C++ addon for WebView2, even if you're not explaining the C++ fundamentals, but just the process. Inb4 you already done this and I missed this, like I missed the year-long warning of NWJS deprecation. FWIW I read all blog posts, even some chapters of your latest Typescript entries, when I'm a noob at JS and not even planning to touch TypeScript, and yet I pick up a number of things that I then learn and find useful.

    I do apologize for the inconvenience of these technology switches, but in the long term they are absolutely necessary. I know they are painful and these are not decisions we take lightly. As I mentioned in the r450 release notes, Construct 3 has been around for about 8 years now, and we need to think about where we'll be in another 8 years and longer. These kinds of decisions are difficult but important to ultimately ensure Construct is still a great product that keeps improving and remains competitive.

    It's ok, it is less painful after learning that preview error is a mistake, I again apologise for being so reactionary. I was a week late to checking the update out due to stupid life issues, then see I can't begin to preview at all, and just thought here we gooooo another fork in the road, nobody else reported it it seems, so it must be fact that we gotta nuke any projects we wish to upgrade beyond r449

    I feel I will pursue NWJS still. I keep an eye on literally everything that goes on and I drift to things that unlock further functionality or are more optimal, so I will turncoat as soon as I find WebView2 appealing, even if it's due to some other new features that make file handling/management/listing/creation easier (these are things I had been exploring with NWJS, accessing further "List Item" parameters for subfolders or "list only specific extensions".

  • Use "Add key" instead of "Set key" for the dictionary.

  • EDIT: Rewrote to be more concise, despite being a wall of text still.

    Is NWJS "fully" removed on r450?

    If I save a project that has the NWJS plugin, then upgrade to r450, then preview, I see error along the lines of:

    runtime.js:1 Uncaught (in promise) TypeError: this._runtime.IsNWjs is not a function

    I presumed that NWJS was deprecated, so that you can still use your project with NWJS if you had the plugin added, but most stuff is "hidden away", so no exports and no adding the plugin. But judging by this, I take it that NWJS is removed from the core of C3 in whatever way C3 used to detect NWJS? This would mean all past projects with NWJS plugin cannot be run on r450 until it is removed?

    I also presumed that we could still choose to use NWJS, but no support provided from Scirra, so we would be on our own to export via HTML5 and mash it together with NWJS if we wish, or if a new NWJS version broke the deprecated NWJS plugin, then Scirra won't support this.

    If it is intended that existing projects with NWJS plugin must remove the plugin entirely to use their project:

    This feels rough, my choice to use NWJS has backfired and stalled me. I abruptly need to remove NWJS plugin, which is deeply ingrained into my project. Maybe there were warnings (or maybe it is unintentional that projects are erroring), but oh mann I was eager to try the new Text improvements in r450 (which deeply affect my project when I unexpectedly encountered this when migrating my project to WebGPU-only effects. I had worked around it for a month or two, with poor results, but didn't want to pester Scirra, and assumed it was a Chrome bug, but then got excited to see the update).

    Repeating what is known - WebView2 is not quite there yet. Very close but not equal to NWJS. Steam Overlay (fallback not ideal), supress the "fullscreen/Mouse pointer lock" popups. WebView2 feels more restrictive whereas NWJS feels more adaptable. I liked how C3 integrated fixed builds for NWJS, but WebView2 we must follow a guide externally. An advanced user may enjoy other aspects of NWJS, such as using Node Modules for further enhancement of their game (e.g. enabling Toast notifications on desktop).

    NWJS's Steam Overlay relies on an experimental Chrome flag, a risk that some players cannot play or get crashes. Personally? No hesitation, I'd enable that flag, it's important for my case. I'd rather my game behave like a standard game and not split into many processes, I want Steam Overlay/Achievement popups, I want OBS to behave as it does with any other game that is a single-process (Yes you can still record a window, but, if there's a choice to make it consistent with how OBS detects other games, I'd choose that). I don't care for any performance/stability reasons to avoid that flag, it is an optional flag that we can choose to use, it works fine for most, but if it didn't, you can offer a 2nd build on Steam with the flag disabled. All doable with NWJS, but WebView2 prevents all of this, there is no choice, and that sucks bad.

    I feel distrust towards WebView2 and slight distrust on following the Scirra path of EXE solution (again, only if this NWJS plugin issue was intentional and expects us to remove the plugin to preview our projects). Had I used Electron years ago, I wouldn't be suddenly panicked about what to do to update to the next beta. I'm thinking "what if" since this is now occurring: What if Scirra decide WebView2 is not the path to go with, due to slow rate of Microsoft response to WebView2 bugs/requests (such as the slow response to the "fullscreen" popups), or if Microsoft/Valve both say "No" to resolving the Steam Overlay issue and C3 cannot ever have Steam Overlay unless changing EXE solution - Some plausible situation like this happens, then Scirra move on to the next EXE solution, repeat this loop of killing projects until they remove the old plugin, etc. Such a time-sink for us trying to work on our games (and I empathise with the headache this causes Scirra to deal with). Where I mention distrust to Scirra's EXE solution, this means that I currently seek to find a way to continue using NWJS and am opposed to moving to WebView2, at least as of now. Still love practically every other decision Scirra makes, I am not going anywhere.

    Another point of distrust to WebView2, was what we saw with WebView2 being cross-platform - a promise then a rejection, so it's not far-fetched to distrust the future of WebView2.

    I also struggle to find "real-world" examples of WebView2 games on Steam, I think I encountered one months ago, but it's so rare to find, whereas NWJS has indeed had success out there with big named titles from RPG Maker and such. I can't peek at reviews to gauge what players experiences are like with WebView2, I can't Google info about it, it's way too new/experimental.

    I think I've missed the point of why NWJS is no longer viable. It had been for years, since C2 days. I recall FileSize being the downside, but surly I am mistaken - FileSize matters for browser-based games, but rarely for Steam games.

    I want to crack on and work on my game, but I'm rewriting stuff to fit in with SDKV1, WebGPU, and now WebView2. I'm happy to, and really try to recognise Scirra's goal and follow the philosophy. SDKV1 feels necessary, WebGPU provides a tangible benefit, but WebView2 is a downgrade as of now.

    LTS will support NWJS still and have build server and presumably NWJS gets new versions added and bugs that arise will be fixed for LTS, the workload for Scirra still happens for the duration of LTS to support NWJS but the primary version of C3 won't benefit from this work.

    I could use LTS version, it's a great addition, but what awful timing for my case with the WebGPU Text improvements, it's vital I can utilise that, especially after all the months of effort of mangling my project to not use WebGL effects.

    Last lesser point, it feels antithetical for WebView2 to rely on C++ addons. I don't believe there's many addons for over a year, besides one companion addon? I imagine it's more difficult than the typical addon to create, and may have less chance of attracting community members with the skillset to make these. I'd have thought encouragement of Node.JS would be the path to promote - More JS shenanigans to mess with and unlock more power for desktop builds (not to mention the huge repo of nwjs modules that exist now).

    The community has aided me to understand that, you can still use NWJS, just do it as JS event blocks. This is viable, but must I really have to re-interpret every NWJS action (as I made essentially full-use of NWJS plugin) into a JS event block/function, and figure out the more complex ones like loading into a Binary Data object (which again, heavily used in my case). Whyyy when it was working so fine just one version ago. :(

    My apologies for the reactionary post. I fear the workload of having to move to FileSystem plugin, which may not be a simple swap-n-replace since NWJS was sync and FileSystem is async - And it feels like work that will just result in a downgraded end result when it comes to exporting.

  • Say you have array that is 10x3 (e.g. Each X is Y0 = Apple, Y1 = Food, Y2 = £5... And then 8 other foods in the array).

    Have your array be 10x4 instead, and the first Y0 is now a number (then Y1 = Apple, Y2 = Food, etc).

    For each X, set Y0 to random number.

    Sort via X.

    Random shuffle that keeps relationship!

    ... I think, just guessing.

  • This should work in theory, but it will clash with a basic restriction of the Files folder, no duplicate file names.

    Importing the files of the first export will be fine, after that if you try to import a new file that has the same name as an existing one, the old file will be updated.

    Even if a new unique name was assigned to each file so everything was imported as expected, the name changes would probably break the exports.

    A possible solution I am thinking about would be compressing each export in it's own zip file, then importing each zip file with a unique name. Doing that you should be able to keep each export intact because C3 doesn't actually get to see the compressed files.

    Then you would need some scripting to decompress a zip at runtime and show the contents in the iframe. Assuming you also import zip.js to handle decompressing the zip files at runtime, it shouldn't be too difficult... depending of course on how comfortable you feel about scripting. What I just described will be pretty difficult if you are not comfortable scripting.

    Just wanted to say thanks for this writeup, I've been wondering about zipping stuff and have minor experience with scripting (but managing to get somewhere these days!), and have been mixed on available zip addons, but this has encouraged me to explore zip.js a little further.

  • Everything can be hacked but webrtc is encrypted and can only really be exploited with complex man-in-the-middle attacks where the attacker already had access to the victims device (which, as you'd know as a pen tester, is already the worst possible situation if the attacker has admin access to the victims device).

    The fake game scenario, what message could be sent that allows RCE attacks? And if an exploit was found, this would be patched by Google/other browser devs.

    Let's assume an attacker could send messages to fire "execute javascript" actions - this would be limited only to the game/tab and would behave accordingly as a browser does, e.g. The attacker tries to get geolocation, then the victim will see a popup asking to allow/deny geolocation, which they would likely deny.

    File transfer, again I would not worry: let's say someone sends a virus exe file. Victim receives this... The victim cannot run this exe through a Construct game (unless very specifically using NWJS - Open Shell action, which, I would imagine is rarely used). Even if somehow the exe could be transmitted and executed, the victims device would have windows defender/antivirus software, most of which test an exe in a sandbox, or simply delete the exe if it is potentially dangerous, so no worries there.

    But, yeah, any game engine, godot, unreal, unity, anything - can be used to make malicious software, esp with multiplayer functionality.

    It's not the company's or Scirra's fault if someone designed their game poorly where geolocation data is easily sent unwillingly sent due to an oversight from the game dev, or easy packet sniffing/sending (I presume webrtc makes resending packets not viable).

    Things like NWJS have already been used maliciously outside of Construct, to make cryptominers and such that run silently on the victims device. It's probably why antivirus software flag innocent exports of NWJS (or it relates to the exe being signed, who knows).

    All in all, I wouldn't worry about this, and would only worry about how a game dev designs their multiplayer code - hopefully not having a game that relies on geolocation to play and has multiplayer, and peers have a button that a peer can click, to get host to gather all peer's geolocation data to send back to them. That'd be foolish and that game dev would certainly have a tarnished reputation after a stunt like that!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Could you give an example?

  • - If have big project open, and you open a 2nd new project to test or measure something, chance of red crash whilst navigating this new project. Possibly to do with using the "project file search" but cannot reproduce. I always close my project or open C3 on different browser.

    - Randomly when adding instance vars, red screen crash saying something like "already exists". You could add 5 vars in a row and it crashes on the 5th. Load back in and add the 5 again, no crash.

  • The object that "cuts a hole" into the drawing canvas, must have the blend mode "destination out" set on it.

    When you set this, it won't always look how you're expecting in layout view, but once you paste, it will do exactly what you hope.

    If you still need a visual sprite to show the area you're about to make a hole, then I'd suggest 2 sprites, one with destination out, one without. (you could do 1 sprite and "set blend mode to destination out, paste, set blend mode to Normal, but it will change it's appearance during the paste).

    If you used many layers with Force Own Texture, just for this hole system, you may not need all of this - even 1 layer, without Force Texture, will still punch a hole when you paste a Destination Out sprite.

    Hope this helps!

  • It does seem tricky to implement. My first thought would be a tick box on a Sprite's properties to change whether it does what it currently does with load url, or use new method of unique images (thus ALL instances either have the old way or the new way), but I assume that's not ideal as it's a "global" setting, not per instance.

    Thankfully we do have dynamic animations to fill the gap, although few bits needed to fully fill the gap, such as setting origin point or image points at runtime and such - iirc if you had origin point at mid, and then load url, it keeps origin at mid, which could be desirable.

    Definitely something I'd love to see, very interested in anything allowing "modding" support, such as loading external images.

  • EDIT: Ninjad by dop2000, lol. I echoed similar things, but yeah.

    for example, if he using the global object as invisible while the Construct says is invisible cause is a html5 interpreter u are correct... but u have to take in consideration all objects in screen are rendered by canvas... even if the system is saying is "invisible" once in screen they are actually transparent

    This is incorrect. An object marked as invisible is simply not rendered. You can test this with a blank project, have 3000 onscreen objects (and 1 other object moving so that the game ticks and provided measurements in the debugger), make them visible and invisible, and see the gpu improvement when they're invisible.

    now in ur suggestion if is 1 object shouldnt do a big impact... however stacking that invisible object with 100000 variables that will take over globals to save "events" is a trade off i wouldn't even consider.

    Its worth considering, but it's nice we have the choice on which path to take. An object's instance variable list, for all intents and purposes, is a dictionary - you can have 1000s of inst vars and would barely notice cpu difference, even if reading/writing to them often.

    from mistakes like "forgetting what that invisible sprite does" to lets say u have a project team member coming in sees a object that has "seemingly no purpose" and deletes it, then all the game engine brakes.

    This should never happen, because a team of C3 devs would know to right-click and use "find all references" on object they are unsure about. If they find references on the mysterious hidden object, they'll quickly realise what it's for in all the events they are listed. If they use "find all references" for the specific instance variable, again, helps here. Lastly, when you delete an object that has any events, it will warn you about deleting and ask if you'd like to "find all references", which the dev should be checking before deleting.

    thats why i suggest better use json, arrays, dictionary anything that its purpose is to keep number values, text values by default.

    I do agree with this! Dictionary is like an enhanced "instance variable" list, with extra benefits like getting the variable by name (which inst vars cannot do) deleting and adding new ones at runtime (again, inst vars cannot do) and link them to many different objects at once if ever needed, rather than adding inst vars repeatedly to multiple objects, or using family instance vars (which, both are great, but a dictionary being able to just link up to any object type, or even a family, is excellent).

    The one benefit to a hidden sprite, is behaviours, like tween or line of sight. But you still could use a hidden sprite for those, but store vars in the dictionary.

    i find myself more then 50% of the time, implementing ideas, patching things, then not commenting and going back to comment and i forget what everything does, and just stare at it and im like "it works, it made sense at the time, but what does it all mean" xD

    Lolol yes, many times this happens. Or better yet, you think "wow wtf why did I design it this way, it could be way better!".

    but considering C3/C2 is mainly used for tablets and phones, i know from past experiences sprite objects, and many instance variables on them, will glitch, like the variables will fail to be read and written.

    This, I have never heard of, nor encountered. It should be reported as a bug if you can reproduce it. Does this bug happen with like 1000 inst vars, and does it happen with a dictionary with 1000 keys?

    especially a sprite is easy to delete by mistake, or change its designated state by simply adding it in a familly by mistake, and then "woops" the familly gets destroyed when shot, and now ur invisible sprite that holds all user data gets removed or cleared.

    I disagree - you could add a dictionary or JSON or array into a family by mistake, too! But if someone does this, then that's user error. Even ignoring the topic of a hidden sprite, if it's just regular game and someone decided to add an FX into a family that doesn't belong there, then they would indeed get unexpected results and must fix this or remove them from the family.

    now memory wise you are correct once outside the screen no memory is used, C3 engine doesnt render nothing that is outside the screen.

    Correct, and it doesn't render when onscreen but invisible. (it renders if visible but opacity is set to 0, iirc).

    but is easy to remove a sprite by mistake once outside the screen.

    But why? What if a preloaded particle was offscreen and invisible, why is it easy to delete it? Devs need to be more alert when they're tampering with the unknowns in a project!

Jase00's avatar

Jase00

Member since 5 Jan, 2012

Twitter
Jase00 has 12 followers

Trophy Case

  • 13-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • x25
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x8
    Lightning Draw First person to up-vote a new Construct 3 release
  • x8
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

27/44
How to earn trophies