1.17.x Best way to create a minigame plugin

Discussion in 'Spigot Plugin Development' started by xLengoBug5, Jul 31, 2021.

  1. Hello,
    I'm wondering what's the best way to develop a minigame plugin where there can be multiple instances of the game running at once?
  2. Develop a strong program structure. Use the principles of object-oriented programming. I would recommend having an abstract class named something similar to MiniGame. Then, create a list of these on a MiniGame Managing.

    Then whenever you create a mini-game, add it to that list.

    Things to pay attention to:
    - Separating chat/tab/other things to make it seem sectioned off per minigame (At least, that gives me a sense of "multiple games")
    - Loading/Unloading worlds. Would highly recommend using ASWM (Advanced Slime World Manager) for loading/unloading worlds async and with ease and no lag. Otherwise, it may cause lag while a different mini-game is running.
    - Creating "phases" or "states". Most mini-games have a Lobby, Game, End states that different things should occur.
    - Event Listening. I would recommend working on a system to listen to specific events on specific mini games.

    The best advice I can give is to structure everything as best and effectively as possible. Take some time planning out your system and how it works. Even drawing it out on paper can be beneficial.
    #2 Potatoes_Duck, Jul 31, 2021
    Last edited: Jul 31, 2021
    • Agree Agree x 5