The Resizable Toy

  • LBPHacker
    14th Apr 2024 Developer 2 Permalink
    Many have requested the feature of being able to change properties of the simulation pertaining to size.

    So far, this has been denied for two main reasons. Firstly and most importantly, the general opinion is that this change would negatively affect performance even in the case of a simulation that is the same size as the vanilla one. Secondly and nearly as importantly, it is a large undertaking to refactor the codebase to allow for this feature, and an even larger one to verify that it works correctly afterwards.

    So what if one were to take the low-quality service approach?

    The refactoring effort argument is valid but not impervious to it; indeed, I have successfully refactored the codebase to support loading the simulation size from the game's configuration file once at startup. This is a low-quality solution; the ideal solution would allow changing the simulation size at runtime. I have not verified and do not plan on verifying extensively how well this works, which completely ignores the verification effort argument, but that is fine as this is just a mod, not the base game. This is once again a low-quality solution.

    This leaves the performance argument, which is what this mod is meant to prove or disprove. In other words, I would like to gather real-world data and experience on what a simulation with dynamic size parameters is like and how well it runs. It might also amuse some of you, as an added bonus. Have fun.

    The mod is based on the 99.2.382 stable version of the game. There are currently no known issues.

    Download links below. Builds naturally are hosted by @jacob1 and updated from starcatcher.



    This mod shares the data folder with the base game and tries its best to minimize interference with it. That said, oversize saves created with this mod will naturally be impossible to open with the base game, which will report them as broken. It will however happily open undersize saves.

    Simulation size and max particle count can be changed in Simulation settings. Changes take effect on restart. Invalid simulation parameters are rejected ahead of time so they do not even make it into the configuration. If invalid parameters do make it into the configuration, they are normalized at startup and a notification is shown about the issue. If for some reason this is not enough, resetting the simulation config to the initial value can be requested with the
    resetsimconfig
    command line option.

    Note that simulations larger than 255 by 255 cells cannot be saved because the save format does not support such dimensions. Simulation settings warns you about this ahead of time.

    Important note: If your antivirus solution has decided that this mod is a threat, add the mod to its list of exceptions. See further information here. I refuse to deal with this problem in this thread; please refrain from leaving comments about it.

    The mod's source is available on the resizable-sim branch of my fork of TPT.
    Edited 12 times by LBPHacker. Last: 7th February
  • z4dg9ssw135
    16th Apr 2024 Member 0 Permalink

    ive accidentally made its window bigger than my screen, how do i fix that lol

    edit: nevermind i fixed it myself by seeking this goddamn shared preferences folder (worst thing added so far imho)

    Edited once by z4dg9ssw135. Last: 16th Apr 2024
  • GigaCars
    18th Apr 2024 Member 0 Permalink

    quite a silly tech demo, completely unsure how the cell thing will affect this TPT, i always do trial and error with this mods feature XD

     

    for one, i made it's size be equal to a small phone, was lucky i could change it back

  • bonzaithe2nd
    20th Apr 2024 Member 0 Permalink

    i needed this
    pretty low fps tho

  • LBPHacker
    17th January Developer 0 Permalink
    The mod has been updated to 99.0.379 (this is actually a snapshot build in vanilla terms but we think it's really close to what will eventually be 99.1). These known issues (copied directly from the original post) have been fixed:
    • Newtonian gravity is broken; this is not for any good technological reason, I just made a mistake; I'll fix this for the 99.0 release
    • configuring a small enough simulation size makes it impossible to open settings; again, no good technological reason, I just haven't gotten around to fixing this
  • LBPHacker
    2nd February Developer 0 Permalink
    The mod has been updated to 99.2.382, and changing the max particle count has been made possible. The limit on the max particle count is somewhere around 4 million right now, with PMAPBITS being 9. I could have made PMAPBITS configurable, but seeing as it's required to be at least 8 to accommodate all vanilla elements, I didn't think it was worth the trouble just to raise the limit to somewhere around 8 million.
  • LBPHacker
    7th February Developer 0 Permalink
    The mod has been updated to 99.2.382 for reals now: I rebased to the wrong commit the previous time around and the mod ended up thinking that it was 99.1, despite being 99.2 in every other aspect. Sadly, this meant that opening saves made with 99.2 would show a confusing warning. The new command line option
    resetsimconfig
    has also been added.
    Edited once by LBPHacker. Last: 7th February