Dealing with NaN

  • PTuniverse
    26th Jul 2014 Member 0 Permalink

    I think that there should be an option to do a "NaN Scan" somewhere. What the NaN Scan does is that it checks through all the important variables in the game; when it finds NaN in a variable, it automatically sets the variable back to 0, then continues the scan until it is finished.

     

    Quite annoying when there's NaN pressure destroying everything in your save.

     

    (Note: NaN pressure is possible; create a tight box of ACEL (life 65535, use in console !set life acel 65535) and put one pixel of something like BGLA inside it. Doesn't work for all elements, but it happens)

  • h4zardz1
    26th Jul 2014 Member 0 Permalink
    nan=less than -MaxNumberPossible(don't remember the numbers exactly)
  • jacob1
    26th Jul 2014 Developer 1 Permalink
    I don't think an "NaN Scan" would do anything, if there is a bug causing all the variables to be corrupted you need to restart the game. Also the only thing i've ever seen this happen with is pressure, and the next version fixes that by adding a cap on velocity (to some extreme number that won't affect anything).
  • PTuniverse
    26th Jul 2014 Member 0 Permalink

    What about the pixel velocities themselves? Sometimes, ACEL can also NaN the velocities of the pixels. I know that because I have a debug script I got from someone...

  • jacob1
    27th Jul 2014 Developer 0 Permalink
    @PTuniverse (View Post)
    The pressure and velocity grids are calculated from each other and are basically the same thing, if one has NaN the other does too. But that bug is fixed, it's caused when a particle velocity goes up to insane numbers that they should never be at, which causes that effect in the pressure / velocity grids.
  • jacksonmj
    27th Jul 2014 Developer 2 Permalink

    Alternatively, you could use less ACEL...

    Edited once by jacksonmj. Last: 27th Jul 2014
  • tmo97
    10th Aug 2014 Banned 0 Permalink
    This post is hidden because the user is banned
  • jacob1
    10th Aug 2014 Developer 1 Permalink
    @tmo97 (View Post)
    how is this cool? It's happened in some real saves before. Also it was already fixed.