I am looking to program something similar to a simulation game, but free-form in its customization and scripting to the point where no strategy game will get me close enough.

I initially thought to start from scratch, simulating all the basics. Simulating money, people, resources, maps, etc. Obviously this is very ambitious.

Are there any libraries or frameworks that could help me with this? I don’t want something opinionated that decides the model for how to simulate, for example, money or a person. I want to preserve the ability to simulate those with the models and math of my choosing. But maybe a library that has the foundations of simulation in general, so that I don’t have to build everything completely from scratch?

I understand what I said sounds very vague. This will be something I will discover as I do more of it, so forgive the vagueness.

  • deegeese@sopuli.xyz
    link
    fedilink
    arrow-up
    6
    ·
    1 month ago

    You want a library or framework that lets you make models and you can do it all from scratch?

    Sounds like you’ve narrowed it down to just the 90% of languages that support OOP.

    Your request is so vague all I can say is get started with a language you already know well. If you could at least commit to making a game, you could skip ahead to using a preexisting game engine like Godot.

    • matcha_addict@lemy.lolOP
      link
      fedilink
      English
      arrow-up
      1
      arrow-down
      1
      ·
      1 month ago

      Will Godot be helpful? Given what I’m making is non graphical and I don’t really want to use pre-simulated stuff.

      I don’t want to do it absolutely from scratch. I do want something that makes the math easier, but not restrict me in how I simulate something.

      So I want something that would give me common functions used in simulations, but not something that gives me “here’s a model for money or person”.

      • xmunk@sh.itjust.works
        link
        fedilink
        arrow-up
        5
        ·
        1 month ago

        I’d suggest choosing a mature language with a large number of utilities/libraries available - Java, Python, Rust spring to mind but the graphical shit is really what you’d want to lean hard on a library is. I don’t know enough to say for certain but it sounds like most of your work will be defining objects and how they interact… off the shelf solutions can’t really help with that.

      • deegeese@sopuli.xyz
        link
        fedilink
        arrow-up
        3
        ·
        1 month ago

        You need to be more specific about what you’re making if you expect useful advice.

        Start building something before you rail against the restrictions you haven’t hit.

  • StrikeForceZero@programming.dev
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    23 days ago

    With such a complex system like that it would probably be beneficial to actually build the parts you care about and take advantage of libraries handling the querying of Data like ECS and rendering with bevy. Otherwise you’ll run into the risk of being limited by the library in one way or another.

    Define a bunch of structs that you can use compositionally in bevy’s ECS. Create specific systems that react to components being added, removed, or changed. Set conditions like Burnability, Durability, Temperature… etc. React to those conditions or thresholds being met. Your reaction could even be a component. Damage(5), IgnoreArmorDamage(3), CurrencyUpdate(-5), GiveItem(Item::Sword(Stats {…}))

    It basically gives you a foundation that feels like scripting but with the power of compile time safety for virtually everything. You get to “model” the data how you want instead of being limited or overwhelmed. And with ECS it really helps make things feel like Lego blocks that you can easily reuse across the entire project.

  • UFODivebomb@programming.dev
    cake
    link
    fedilink
    arrow-up
    1
    ·
    28 days ago

    Check out the field of multi agent simulation. There is a variety of related software there.

    There are also actor systems. That’s a low level model of computation. Seems like it would be suitable for building agent simulations. I’ve wanted to try that but no luck yet.