1.14.4 Separate minigame sessions

Discussion in 'Spigot Plugin Development' started by GhostSHAURMA, Jan 30, 2020.

  1. Im developing a minigame and right now Im about half way through. Thing that I never thought about is having multiple sessions runing at the same time. I cant come up with something better than having multiple servers on different ports. Is there any better way of doing it? Or should I do different servers?
     
  2. FrostedSnowman

    Resource Staff

    You can likely run 3-4 instances of a game, given your machine isn’t a potato.

    Your project should be able to manage game instances. If you are not able to adapt to such a structure, rethink your project design to encompass such capabilities.
     
    • Like Like x 1
  3. yeah but what if ill need like 10?
     
  4. Your question is basically about running multiple instances on one server.
    However, there are two underlying aspects resulting from your post.

    The first one is about the speed of execution and the ressources available on your machine.
    Obviously, that would strongly depend on the type of game you're coding and your machine.
    But if I were you, I wouldn't worry too much about this part. Instead, I would first try to focus entirely on the code.

    And that is the second aspect: your project structure (the model you'll use for implementing such a game).
    You need to find a way that allows you to run (without considering machine ressources) an infinite number of games.
    This is the key part of your project. If you want to do it well, you need to come up with such a model without compromising your server (e.g. registering multiple instances of Listener that do exactly the same thing is wrong).

    Good luck!
     
    #4 SpeedWolf13, Jan 30, 2020
    Last edited: Jan 30, 2020
    • Like Like x 1
  5. Depends on your server cpu and memory
     
  6. Depending on the game and your code structure, you could have multiple mini games instance running for the same mini game. (Just like pvp kit duel does).