Managing Arenas

Discussion in 'Plugin Development' started by bluegru, Feb 28, 2015.

Thread Status:
Not open for further replies.
  1. What is a good way to manage different arenas. So player can join a lobby and an arena from a file loads up for this game. Not just building an arena and save locations and other values into a file and load them when the game starts. I'd like to have a system where I can create arenas, store them into a file and load them when ever I need them. Something like those big server networks like Shotbow or Hive has with those walls full of signs. (I know that they have more server for that, but I wont use more than one server)

    I thought of building arenas, saving all blocks and the locations into a file, and when the game starts, create a new world, load the arena into that world and after the game, delete that world. So that player can play the same map at the same time.

    Is there a better way to do this?
  2. Offline


    @bluegru Well I work on a Lobby-System which handles already all the joining, leaving and all Players. So you would "only" have to do the part of the minigame itself.

    In my opinion this looks like a good idea, but could cause some troubles when you have to cerate the world when someone joins. You should create the new World already when the Game ends, so the Game can start propertly without any problems/lags/loading time.
  3. @PreFiXAUT
    That wont be a big problem, because I have a lobby. and while the player are waiting, the map loads the arena
    I just wanted to know if theres a better way to do this
    Last edited: Feb 28, 2015
  4. Offline


    @bluegru Just a try ;D Anyway.. I couldn't think off another/better way yet, but I'm not a Minigame Dev, so maybe someone else will have a better solution already. I will ask some buds.
  5. Offline



    Okay, you want to design your plugin in such a way that you only have to setup an arena ONCE... but yet it can have multiple games going on at the same time...

    If you have a simple scenario where only 1 game can ever be running... then any startup lag spikes do not matter at all. However, let's say you now have 10 games running. And an 11th game/world is created... now, we've just lagged those 10 games.

    In other words, imagine it from a players perspective: that you're playing in one of those 10 games, in the heat of combat against an enemy... And right at that crucial moment when one of you is about to kill the other, a lag spike occurs.

    This is definitely something to think about.

    Here's a guy who had the exact same problem:
  6. Offline


  7. Offline


    @Hex_27 No it isn't laggy, I was able to reduce the time to a mere 500ms, and I haven't finished, will probably try to do an AsyncWorldGenerator, if I can do it, I will probably post it to bukkit :D
  8. Offline


    @nuno1212sss Imagine tons of worlds being created and deleted for a mass server. Seriously, not a good idea.
  9. Offline


    @Hex_27 If you do it right, you won't have problems
  10. @Hex_27
    What would be a better way then? I cant just build one arena and save the locations, because I have more games that arenas, so I have to copy the arenas. Only other way I could think of, is to just copy the arena multiple times in one world so the player can play the same arena in different games.

    Is there a way to create a world and copy some blocks over time to reduce lagg? I have a lobby befor every game where the player have to wait for about 30 sec to a min. Would that help?

    It might not be laggy for some small servers, but for the bigger ones I don't think it wont get laggy. And for a pvp game its really frustrating to get laggs every few seconds

    Or is there a way to split one server into more virtual servers and put every game into one of theese servers? Like those big server networks does it with real server?
  11. Offline


    @bluegru That's what I do, and 10 ticks isn't that much of a lag, it is a VERY small break.
  12. @nuno1212sss
    A break of half a second is not that small in a combat game,
  13. Offline


    @bluegru Then split the load into small parts, like 35 ms each. The lag will not be noticed because 1 tick is 50 ms.
  14. @nuno1212sss
    Ok, so how do I split the load into small parts?
    (I should first learn how to work with multiple worlds :D)
  15. Offline


    @bluegru why would you want multiple world arenas instead of an admin setting up multiple arenas himself?
  16. @Hex_27
    Because if an admin builds an arena and sets the locations, there would only be one arena. And I want to use one arena as often as I need it. So I can have e.g. 20 games with only 5 different arenas
  17. Offline


    @bluegru Honestly it would be much more lag free, but your idea doesn't sound that bad yet.
Thread Status:
Not open for further replies.

Share This Page