Headbang Games's Forum Posts

  • Headbang Games do you mean you are using browser text rendering or composing letters from boxes used as pixels?

    If browser rendering, across all browsers it seems difficult to turn off 'font-smoothing'.

    I think I understand the problem better, the issue is with how C3 implements the text object and how it is blitted to a lower resolution canvas.

    I think HBG means to use HTML rendered canvas separate from c3 canvas (e.g. using C3 HTML layers) to render at screen resolution to get a sharp effect. I've tried a quick experiment and talked with the OP about this and they are doing experiments. They are also using High quality scaling.

    Yes, browser rendered separated html object, it also allows for more types of css styling, like shadows and backgrounds. In the not so distant past it was also the only way to get outlines and RTL support, but that's been added to the text object as well.

  • I use html boxes for my texts, so no matter the project resolution or setting you get a sharp clear text in all sizes. It might be a little trickier to place them if you need them embedded in the scene, but it's doable with the new html layering feature.

  • Oh well, can't blame a dude for wishful thinking :)

  • That hasn't shipped in Construct yet. I was just testing an experimental WebView2 feature and reporting back my results to Microsoft.

    I thought you were referring to permission prompts when you said "skip the user verification" - it is already the case that NW.js and WebView2 should both skip permission prompts when using the File System object. However it can currently only access files and folders previously chosen by a picker dialog. The experimental feature was testing was for the ability to access known folders (e.g. Documents) without needing a picker dialog. Support for that should come in future.

    Great, that's exactly what I meant, being able to access the user's savegames directory and read/write files without any user input.

    So just to be clear, once this will ship to construct, these features will be accessible in normal preview too? And possibly in NWjs? So I can have just one set of saving/loading events for both platforms.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • > But I saw in your opened ticket, that the File System api was worked around to skip the user verification, which is still in the beta branch.

    I don't recall what you're referring to here. Can you link to your reference?

    IIRC we already shipped the skip to user verification some time ago and so that should already be in the current stable release.

    This:

    github.com/MicrosoftEdge/WebView2Feedback/issues/3706

    It looks like only last month you tested it while still being in beta.

  • Thank you for the info!

    > 1. I noticed that the FileWebView2 plugin's folders expressions do not work in preview (I didn't test any of the other functions). Is this a bug or something that will not be possible with this WebView2 file system plugin?

    Construct's normal preview runs in a browser, not WebView2, so WebView2 features are not available there. You can however check 'Export for Remote Preview' when exporting WebView2 to more conveniently test WebView2 features via Remote Preview.

    Yeah, that is what I figured. But I saw in your opened ticket, that the File System api was worked around to skip the user verification, which is still in the beta branch. Once that will get in the stable branch, will the File System api be able to show this data in preview, or will we still need another plugin just for the webView2 features?

    > If not, what is the suggested work method for supporting all operation systems in the same project?

    If you still need macOS and Linux support, for simplicity I would advise to keep using NW.js for the time being. If you only need Windows support (and note that about 97% of Steam users use Windows) then I would recommend using WebView2 instead.

    That might have been the case a few years ago, but the Steam Deck is running Linux and it grows in popularity every day. I can do without macOS, but Linux is a must these days.

    > 3. Will it ever be possible to set a WebView2 app window to maximize in runtime?

    It's already possible via a custom wrapper extension, but support is not yet built-in. You can however request fullscreen on startup with WebView2 just like you can with NW.js.

    Yeah, I'm already using the fullscreen request, for when the player chooses Fullscreen mode, but if they switch to Window mode, I would still want the window to be maximized. Both when switching between the two and when running again in Window mode.

  • 1. I noticed that the FileWebView2 plugin's folders expressions do not work in preview (I didn't test any of the other functions). Is this a bug or something that will not be possible with this WebView2 file system plugin?

    I'm not reporting it as a bug since I know that the official file api got support for the missing features and will probably update once it goes in the stable branch, so there's no point on working on the temporary one now.

    2. Are there any plans on adding Linux support and macOS+Linux support for the steam plugin?

    If not, what is the suggested work method for supporting all operation systems in the same project?

    Can a project work with both the NWjs and WebView2 steam plugins or will they conflict one another?

    Will it be possible to use the WebView2 file system to save and read files in NWjs or will I need to have two sets of saving/loading events?

    3. Will it ever be possible to set a WebView2 app window to maximize in runtime?

    Or even a startup arguments, which is supported in the WebDriver:

    learn.microsoft.com/en-us/microsoft-edge/webdriver-chromium/capabilities-edge-options

    Ashley

    Tagged:

  • It was moved into the sprite editor instead, for easier access per import.

    Click the 3 vertical dots icon in the sprite editor to change the settings.

  • Oh wow, that's interesting, I haven't thought about that.

    So let me see if I got it right.

    The pathfind grid will be fixed within the layout and off screen and the actual scene will be outside the layout.

    The player image sprite will get the X/Y position based on the current section is at + the pathfind object X/Y offset?

    I guess that means when the pathfinding object reaches the right edge I need to move it back to X = 0, then he should continue walking from there with a new path based on the remaining distance from the mouse click X/Y spot.

    I wonder if that'll work seamlessly, without stopping the movement mid walk.

    I don't think I'll be venturing into making my own pathfinder, at least not at the moment. But that sure is an option.

  • Thanks for the answer, I appreciate your input.

    I figured there is a limit and I would have stress test that but yeah, it's not an optimal solution.

    Though basically the whole layout area is 1920px (6 sections of 320 that loop). The area is just a round corridor with doors, so I don't imagine anyone walking in circles more than 2-3 times, but I would probably want to have 10 loops just to be sure. Hopefully pathfinding can handle 20,000px.

    If I really have no choice I thought of maybe breaking the 3rd wall as an option, "hey you reached the end of the world, please turn back" or something like that :)

    As for EasyStarJS, I prefer not use 3rd party addons, as I've been burned before with unmaintained and broken addons.

    P.S I'm already using an invisible tilemap to set the blocked cells, I didn't intend on centering it on the player, as I would probably need to regenerate the map every tick, I just have a tilemap for each section, and when I push that section to the other side, I regenerate the area around it.

  • Ashley Do you think an action to set the pathfinding cell area bounds is something feasible, should I bother with posting it as a suggestion?

    I understand that the bounding was added to avoid infinite memory usage.

    But in my case I really don't need more than 600px, I just need to be able to move it around.

  • So, in my game I use pathFinding to control my character.

    Now, I want to make one layout with infinite scroll.

    My problem is that pathFinding cannot move outside of the layout, and basically the layout size doesn't play a role here, since I'm using unbound scrolling and just move sections from left to right or right to left as they leave the viewport.

    Is there any way to get around pathfinding outside the layout bounds?

    A few other solution that I thought of were to:

    1. Make a really really really big layout and hope no one walks that far in circles :)

    2. Use a different move behavior or keep the player centered and scroll the scene around him, though those will open some cans of worms with a bunch of logic I already have setup around the pathfinding. Which I'm hoping to avoid.

    Anyone has another idea?

    Tagged:

  • OK, so I found that with js I can get screen.availLeft and screen.availTop

    These return the left and top edges of the screen the app is running on, which fix the positioning issue when running on a secondary screen.

    Are those values available anywhere in C3?

  • Hi everyone,

    I'm trying to preset the window size and position for webView2 exports and I'm running into a few issues.

    1. This is probably a bug I should report, but I noticed that when using Windows Scale to anything higher than 100% the platformInfo.ScreenWidth return a lower value than what the screen actually is. On 1920x1080, I get 1536 width with scale set to 125%. Though setting the window width to screenWidth does cover the whole surface, so maybe it is by design.

    2. Another small issue I noticed is that setting the window position (with the browser object) to 0,0 doesn't really put it on the edge, I need to set it to -7.5,0 for it to be aligned left, this also happens with 100% Scale.

    3. Probably the most important issue, If I use two screens with extended layout. When running the exe from the first screen it works fine, but if I run it from the second screen, using -7.5 position for the X puts the window on the first screen (screen width does return the second screen width, so I get a big window that overflow into the second screen).

    Is there a way to get the X,Y coordinates of the screen the app runs on?

    Alternatively, is there a way to know if two or more screens are used, get the width and position of each of them and know on which of the screens the app is running?

    4. Is there a way to set the window to maximize?

    Ashley Any insight?

  • Thankyou Headbang Games

    I tried it but still is not working.

    Any suggestion?

    I meant you don't even need the variable, user "compare two values", where the first value is missile.count (that's how many missile instances are currently existing in runtime).

    Using a variable should also work, but you don't really need it. If you're using a variable, make sure you destroy the missiles in every event and reduce the variable number (outside of bounds, hitting something, or whatever other events you have for the missiles).