1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

World backup

Discussion in 'Development' started by fevio, Apr 22, 2020.

  1. fevio

    fevio Spider Jockey

    Messages:
    33
    For the backup in one minigame , what are the best method for save multiple aree in same world? My idea was to save 25 chunk in a radius and overroload they when finished the game, the are better methods and more optimized?
     
  2. HimbeersaftLP

    HimbeersaftLP Fish

    Messages:
    2,402
    GitHub:
    HimbeersaftLP
    Disable world autosave and reload the world when the game ends
     
    fevio and GamakCZ like this.
  3. fevio

    fevio Spider Jockey

    Messages:
    33
    with Multiple game in same world ,and not One world for each minigames
     
  4. lunix

    lunix Spider

    Messages:
    8
    There are multiple ways to do this.
    The easiest is, as @HimbeersaftLP said, to disable auto-save and simply reload the world.
    But since you're using the same map for multiple games, you could for example either log the chunks that are edited on-the-go and then reset those(i.e. serializing/unserializing) or log all changes and undo them.
    Depends on how much effort you want to put into this, how many games & players you have and especially on how much the world is changed.
     
    Last edited: Apr 23, 2020
    fevio likes this.
  5. GamakCZ

    GamakCZ Zombie Pigman

    Messages:
    598
    GitHub:
    GamakCZ
    Try serialize chunks used for the game and then userialize them after restart. Changing every block manualy will take hours with php...
     
    fevio and HimbeersaftLP like this.
  6. fevio

    fevio Spider Jockey

    Messages:
    33
    Ok
     
  7. wolfdale

    wolfdale Zombie Pigman

    Messages:
    535
    GitHub:
    diamond-gold
    If you do not have the intention to save any part of the world, you could disable auto save, teleport players away from the area, unload any chunks you want to reload. The chunks will be fresh when they are loaded again when in player's view
     
    fevio and GamakCZ like this.
  8. lunix

    lunix Spider

    Messages:
    8
    Meh. What if all the players are in one spot of the map and the chunks on the other side are unloaded? This is not the way to go.
     
    fevio likes this.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.