TetroniMike's Recent Forum Activity

  • Well... More than 7 characters.

    "MYSEED_1234567" is 14 characters, hence why I ask. I suppose I can test myself and figure it out :P

  • So pre-generating numbers is great but what if I need like 8,000,000,000 of them? Since the game generates as you progress, I can't be sure how far players will make it. Granted, 8 billion will most definitely be enough, but yeah.

    Now that I've thought about it, re-seeding each step is an idea, I'll look into it. Does Advanced Random have a seed string maximum length? Because like I mentioned the game could potentially get into the millions of steps.

  • Ok so let's simplify the problem. When using seeded randomness I am guaranteed to always get the same numbers in the same order, if I use the same seed. So let's say I do the following:

    Start of Frame:

    - Set AdvancedRandom Seed to "SOMESEED"

    Repeat 10 times:

    - Set Var to Floor(Random(0,10))

    - Set Text to Text.Text & " " & Var

    AdvancedRandom has now generated 10 random numbers. The above code will output the following, for example:

    1 5 7 6 3 8 3 2 4 6

    Now, let's say at this point I want to save my game and come back later. So I save the seed "SOMESEED", I save the string of output numbers (in bold above), and I quit. When I load up this save file, and generate 10 more numbers using the same string, my string will be:

    1 5 7 6 3 8 3 2 4 6 1 5 7 6 3 8 3 2 4 6

    Which is just the 1st 10 numbers twice.

    If I do all of the above without saving, quitting, and loading the save file, I'll have 20 random numbers. The intended functionality would allow me to save, quit, and load while resuming at the "step" that AdvancedRandom left off at. But there's no way to do that that I can find.

    Basically, I'd like a player that uses "SOMESEED" and plays for 20 steps to get the same results as a player who plays for 10 steps, then quits, then resumes and plays for 10 more steps.

    Does that make sense?

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

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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

  • Will do when I get a chance, hopefully this afternoon, thanks :)

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

TetroniMike's avatar

TetroniMike

Member since 18 Sep, 2016

None one is following TetroniMike yet!

Connect with TetroniMike

Trophy Case

  • 9-Year Club
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

12/44
How to earn trophies