TetroniMike's Forum Posts

  • Are you familiar with tokens? You could load in the CSV as a string variable (myCSV) and use one other variable to iterate through rows (thisRow).

    I tried to copy/paste in my code but "Copy as Text" is not working for me for some reason... here's a screenshot:

    https://1drv.ms/u/s!AnfGCnwpFF_Yg8YoDCB6uA5KXGoflQ?e=tL6KHs

  • I'm making a minesweeper clone where levels are of infinite size and generated as you progress, and I'd like to implement "seeded" randomness so that you can, for example, compete against others with the same exact grid.

    I've figured out how to implement custom seeds, but when saving then loading the custom seed the AdvancedRandom object's random sequence of numbers will "start over" instead of resuming at the seed's step where you saved and quit.

    How can I resume at the same point I saved at within my sequence of seeded random values?

    My current solution works like so, but this is inelegant:

    1) Player loads up their game

    2) Game loads in the grid with player's progress

    3) Repeat [n] times: Set someVariable to random(0,1)

    4) Player continues at the point where they left off

    #3 is the inelegant part... variable [n] in #3 is the number of times I've had AdvancedRandom give me a random value since starting the save file. Looping "output random value" n times puts us back at the step where the player left off.

    Thanks for any help you can give me here!

  • Found a workaround!!! You can use the Browser plugin's Execute JavaScript action and "win.close()" instead of the Browser Close action :)

    I have yet to test this on Mac and Linux, I will see if the problem persists there and if the same solution works next week.

  • Same problem here. It appears to have started in NWJS 0.47.0, I think, and the latest version 0.49.0 definitely has this issue as well.

  • Sorry to bring this back from the grave, but does anyone have the PlatformInfo.SafeAreaInsetTop/Bottom/Right/Left expressions working? They just return 0 for me no matter what I do :/

    Edit: Using Cordova export to Android on a Pixel 3XL (which has a notch).

    Viewport Fit: Cover

    Fullscreen Mode: Scale outer

    Hide Status Bar: True

  • Thanks all, with Danny and Skymen's help I was able to get Overlay working again :)

  • Okay so I tried a minimal project as you suggested and it's still not working.

    I'm using:

    - NW.JS 0.46.0

    - Construct 2 r277

    - Greenworks 0.30.4

    - Chromium 83 .node files

    - Steam SDK 1.42 files

    - steam_appid.txt with contents "480"

    I also had a friend of mine confirm that Overlay is not working for him with 0.46.0 either.

    Here's the package.nw file from my test project:

    https://1drv.ms/u/s!AnfGCnwpFF_Yg6tEj4K8BPNWl5oyaQ?e=YeBjgS

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Will do when I get a chance, hopefully this afternoon, thanks :)

  • Windows, haven't tried the other two yet.

  • 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.

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

  • 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??

    "chromium-args": "--disable-plugins --disable-internal-flash --disable-popup-blocking --enable-gamepad --enable-html5-camera --allow-file-access-from-files --ignore-gpu-blacklist --force-device-scale-factor=1 --disable-gpu-vsync --limit-fps=60 --disable-devtools --in-process-gpu --disable-direct-composition"

  • Thank you for the response! I'll look into this guide. I might also try High Quality full screen, and apply a (relative) 1px Mosaic effect on any scaled images.

  • Okay so to work around this issue I had to do the following:

    1) Set the original canvas size to a square, 180 x 180. This allows me to adjust the height manually to fit screen size.

    2) Set Fullscreen mode to "Letterbox scale". This centers the square canvas on the screen with black bars on the top and bottom.

    3)On Start of layout -> Set canvas size:

    - Width = OriginalViewportWidth

    - Height = floor(PlatformInfo.ScreenHeight/(PlatformInfo.ScreenWidth/OriginalViewportWidth))

    This sets the height of the canvas to the size of the screen, but to an integer value. I use Floor instead of Ceil or Int because if the height ended up larger than the screen height then we'd get tiny black bars on the right and left sides of the screen.

    ADDITIONAL NOTES:

    In my tests this only works on Mobile, not in preview mode in my browser on PC. So when setting the size you'll want to use PlatformInfo to check "Is on mobile". If so, use this scaling technique. If not, you must figure something else out. In my case, when not on mobile I decided to force the canvas size to [OriginalViewportWidth] x [floor(OriginalViewportWidth*(16/9))].

    Code to copy in to C3 if you want to use this method:

    {"is-c3-clipboard-data":true,"type":"actions","items":[{"id":"set-canvas-size","objectClass":"System","parameters":{"width":"OriginalViewportWidth","height":"floor(PlatformInfo.ScreenHeight/(PlatformInfo.ScreenWidth/OriginalViewportWidth))"}}]}

  • I just tried converting to Scale Outer instead, but this did not help the problem. I also tried manually setting the canvas/viewport size to integers but when using the Scale Inner/Outer modes it appears the engine overrides any manual changes.

    I'd really rather avoid turning off automatic scaling and doing it myself, but if I have to I guess that's what I'll do :/