Does anyone know of a mod that, given the seed for example, could locally generate chunks so that they can be displayed before the server generates them?

IE if multiple people are exploring and the server’s struggling to keep up, it would be awesome if the client could generate them locally and fill in the gaps locally until the server gets around to generating them proper

(Kinda like how I imagine distant horizons does it)

  • MrStetson@suppo.fi
    link
    fedilink
    English
    arrow-up
    5
    arrow-down
    1
    ·
    edit-2
    9 months ago

    I don’t think it’s possible to generate server chunks on client live, this would make it vulnerable to different kinds of attacks and exploits.

    Best way to do this would be pre-generating the world or some server side pre-generation mod

    • flashgnash@lemm.eeOP
      link
      fedilink
      English
      arrow-up
      5
      ·
      9 months ago

      How so? The client at no point would send these chunks to the server, it would only be local and would be generated completely clientside. In my mind all that would be needed is the seed and at that point no extra communication between client and aervery is necessary

      Pregenerating works but it’s not perfect when travelling at high speed on a populated server, can still struggle to send down large amounts of chunks to the client, users with more powerful machines may be able to generate/load them faster than the server can

      • MrStetson@suppo.fi
        link
        fedilink
        English
        arrow-up
        3
        arrow-down
        2
        ·
        edit-2
        9 months ago

        If the client generated chunks are not sent to server then this doesn’t make sense to me. You can’t do anything on these fake chunks and server still lags.

        I would look for other solutions to make generating chunks faster

        • flashgnash@lemm.eeOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          9 months ago

          It would be useful for the same reason distant horizons is, if the chunks aren’t loaded you at least still see them instead of just seeing a hole in the world

      • Wolfizen@pawb.social
        link
        fedilink
        English
        arrow-up
        1
        ·
        9 months ago

        I think your idea is a good idea. You could keep the view distance low on the server to reduce the number of real chunks being generated. Clients can render whatever they want.

        I think one issue would be when you approach a player structure from the outside, the client might see an unmodified world first and then the player structure would pop in and overwrite the client-side terrain. Its not a technical issue, but more a player experience concern.

        • EarMaster@lemmy.world
          link
          fedilink
          English
          arrow-up
          3
          ·
          9 months ago

          Any chunk with a player structure would already have been generated by the server so there should be no popping in.

        • flashgnash@lemm.eeOP
          link
          fedilink
          English
          arrow-up
          2
          ·
          9 months ago

          Personally I would rather the world rendered in first then player structures than nothing rendering in at all

          Theoretically that shouldn’t be as much of an issue as the server will already have loaded those chunks by definition, and it priorities nearby chunks first anyway

          I think the server render distance would stay high but prioritise loading the immediate 8 chunks around every player first, then after all players have a decent radius loaded it can focus on further out ones. Any gaps can be filled in by the client if it has spare processing power