TheRealDannyyy's Recent Forum Activity

  • This seems to be a roadblock that cannot be worked around. Webview2 could become a solution in the future when it's ready for multi-platform distribution but the NWjs side of things looks pretty bad.

    It would either require Valve to add very specific support for "fake" Chromium window titlebars or Chromium to offer a version of their custom titlebar that integrates with the native Windows DWM.

    Their recently added Windows 11 mica titlebar support doesn't seem to fix this issue either and it would be useless on Windows 10 anyway. NWjs will probably never support Mica to be begin with but it was worth a shot I suppose.

    TL;DR:

    • Valve: Doesn't care enough to implement specific workaround.
    • Google/Chromium: Doesn't care about issues for 3rd party projects that use their browser engine.

    The Steam overlay is usually not picked up by streaming software anyway. So it's only a slight inconvenience for players who prefer playing in windowed mode for the time being.

  • Ok, got something working. Though, I am doing it for local user who's avatar may already be cached. So it may require another ACE to get the userInfo, wait for that to be available, then getFriendAvatar.

    The test project includes the function to change the data to a dataURL which a sprite can load.

    Let me know if you have any questions - it's a basic test case.

    I find that I need to use the steam ID from looking at my profile on steam website my profile URL.

    (Put the steam ID in the top text box, then press Get Avatar button. Need to export as nw.js 0.82 and add steam_appid.txt to the usual spot.

    https://www.construct.net/en/make-games/addons/244/greengrinds

    ...

    Thanks a lot Mikal. This seems to work perfectly fine in Construct 3 as is. Also thanks for updating the plugin!

    Since you are well experienced with this. Would it be possible to make this more compact and JS only? I basically want this to be compatible with C2 as well. The customer would just need to use the existing Greenworks plugin and execute your code. The resulting image data could just be passed using: c2_callFunction("steamAvatarData", ["DATAHERE"])

    It's alright if you are too busy to do backporting work. I still appreciate solving this long issue of mine and making me ditch JIMP for good.

  • It looks like it ultimately is calling this method, in which case "an integer handle" is really just an actual "int", i.e. a normal 32-bit number. So you can just pass that around the event system as a standard number parameter.

    I'm a bit confused and not sure what this means. Does that mean that the sprite object can make use of the 32bit number already?

  • So Chromium 115 has hit and with it goes the reliable workaround of using the --disable-windows10-custom-titlebar command line argument. While the titlebar will now be fancy and respect the users Windows theme, it also comes with the same set of issues.

    NWjs Steam Overlay issues (v0.78.0+):

    1. Fully covered window titlebar (overlay renders above or below it)
    2. Broken titlebar features when overlay enabled (e.g. drag, close, minimize...)
    3. Titlebar overlay "ghosting" after closing it

    Known Workarounds (15th Nov 2023):

    1. [Unresolved]
    2. [Unresolved]
    3. Use "Set Title" NWjs plugin action (e.g. combine with "On overlay deactivated" condition and repeat action for 5sec)

    I'm not that active anymore and can't provide help for all NWjs and Steamworks related features like in the past. I'll periodically play around and see if I can find better solutions for this specific issue.

  • I've been battling with this specific Greenworks (Steam API) feature for years now. So I figured I'd give it another try in 2023, since a lot has changed.

    My Goal:

    1. Fetch user steam avatar using Greenworks (returns integer handle)
    2. Convert integer handle to any format that Construct can use
    3. Apply converted image data to sprite using "Load image from URL" action (e.g. base64)

    The official documentation states to use a node module called Jimp. This process basically works by converting the integer handle into a buffer (in RGBA format) and then write it to an image. After many attempts, any resulting written images were always just black or corrupted for me.

    Now to my question. Are there any modern Javascript or 3rd party Javascript API alternatives to convert the integer handle that the Steamworks API provides into something usable in Construct?

  • If it works in Chrome, it probably means Construct is working correctly - if the problem was with Construct then it wouldn't work in Chrome either.

    I think Brave has very strict privacy settings by default. This may mean it intentionally deletes local storage (confusingly also referred to as "cookies", although the term means any locally saved data). If it does that, then all you can do is change the browser settings to not do that.

    Not sure if this will work but maybe giving the local storage plugin a "request persistent storage" option could be a workaround for stricter browsers?

    The editor itself already has this option and it works fine for me on Brave. However, I don't know the requirements and limitations of this feature but I assume ideally we would have an action to request it and conditions to validate it.

  • TheRealDannyyy Sorry for the mention but I know that you are very familiar with NWjs, and that maybe you can enlighten me on that topic

    I have no idea honestly. Are you sure it's NWjs doing it? I ask because the name of the folder is in uppercase. Also what's inside the folder anyway?

    Edit: I tested running NWjs v81.0 and it didn't create that folder for me.

  • > I don't agree. Steamworks SDK is quite extensive and the only feature we have access in Greenworks now is achievements.

    I forgot to mention that I use the official plugin for importing the modules and access the rest of the features through executing js. The plugins by themselves might not support all features (yet).

    The point was that Greenworks itself (not the plugins) support most Steamworks features up to a certain point and Steam is backwards compatible with those.

    As I understand from Mikal's comments, the addon is based on the same abandoned Greenworks JS library as the official Greenworks plugin.

    The Greenworks node module exists as a "communication layer" between web and native tech. Construct plugins just make it more convenient to use those features.

  • > Ashley Could this be simplified by providing an "execute c++" feature similar to the existing "execute JS" action inside the browser plugin?

    No - C++ is a compiled language and also needs to be configured with the necessary SDKs, libraries, etc.

    Oh yeah, it's been a while since I used a language which isn't interpreted.

    Really appreciate that Scirra would be up for adding proper Steamworks support for Webview2 down the line. Sounds like it's up to Microsoft to add something similar to the single process feature in NWjs or Valve to update their overlay.

    To get back to the main topic. I personally don't see a big issue with Greenworks as it stands. Steam is backwards compatible and Valve doesn't force developers to only publish with more recent versions of their SDK. Sure, we won't get support for any new groundbreaking Steamworks features in our games but that should be the only downside for now.

  • Compare that to WebView2 where we already have our own simple, minimal C++ wrapper, which we could directly integrate with the Steamworks API - no middle layers and it wouldn't need updating with every version. IMO that's a much nicer architecture and puts us in full control of the Steam integration.

    I had no idea that Webview2 comes with a C++ wrapper. I'm personally still a bit skeptical since Microsoft decided to pull the plug on UWP in the past but overall I would also be in favor of Webview2. It's still going to be a challenge for devs and their node plugins to be ported over to the C++ wrapper.

    It's common for game engines to at least partially provide access to supporting the SDK/API's below:

    Quick overview:

    (*supported through Node plugin in Construct 2/3)

    In theory it would be possible to have some kind of plugin model for WebView2. But I don't think it makes sense to consider that any further until it's clear we can solve the aforementioned issues for Steam.

    Ashley Could this be simplified by providing an "execute c++" feature similar to the existing "execute JS" action inside the browser plugin?

  • Would Electron be a worthy temporary solution until WebView2 is supported on all desktop OS's? Though I guess this would just move us to a bunch of different potential issues, or maybe even the same exact issues as NWJS. Or maybe another alternative altogether, just to tide us by if NWJS is not seeming to resolve major issues?

    I don't understand why you decided to discard this idea. Electron is still the industry leading standard and widely used to distribute desktop apps with many active developers and guaranteed long-term support because of its community.

    Node Modules which the Greenworks addon relies on aren't supported by Webview2 either. I'm not aware of any alternatives besides using the feature incomplete Steam Web API.

    Ashley I'm aware that this could be one of those "grass is greener" situations but has this ever been on the radar for Scirra? Electron is feature complete, supported by Greenworks and has on-par performance with Webview2.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You do not have permission to view this post

TheRealDannyyy's avatar

TheRealDannyyy

Member since 30 Sep, 2014

Twitter
TheRealDannyyy has 18 followers

Trophy Case

  • 10-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
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

18/44
How to earn trophies

Blogs