i have a question

Discussion in 'Spigot Plugin Development' started by thanhtrung, Jul 24, 2018.

  1. Hey!

    I've been working on this dungeon system currently. The plugin places WorldEdit schematics with mobs, spawn location, etc. When dungeon is complete, it undo's it.

    I was wondering how demanding this would be, if lets say ~100+ players generated individual dungeons. Would it require more RAM or processing power? I can always set the paste to "fast mode" so it speeds up, but the lighting is sometimes messed up. If it's so bad, I could create the dungeons before-hand and set them up. (Main problem with that is that they're not unlimited, so dungeons can run out, which can't really happen in a RPG server).
    thanks all
  2. If you're worried about taking up a lot of processing power, you might want to look into this: https://www.spigotmc.org/resources/fast-async-worldedit-voxelsniper.13932/
    As for memory consumption, that should not be too much of a difference, unless you're keeping all your schematics in a map of some kind (which in itself wouldn't be affected by the number of players)
  3. Loading a bunch of schematics into the world quite often would definitely require more processing power as it's working to set blocks & data in game as well as updating the players which are around it with chunk & block updates etc. The more players you have, the more dungeons you have loaded in, the more memory you need to keep it all loaded. If you have some sort of "async" way to paste schematics or at least not slow down the server then it would most likely work faster.

    It would definitely help to keep the schematics loaded in memory if you expect to constantly paste them in as loading them from file each time is slightly time consuming (depending on the schematic/file size)

    tl;dr it'd generally require more processing power than needing more RAM, but it depends how you actually do it.