garbagemule / MobArena

MobArena plugin for Minecraft
GNU General Public License v3.0
191 stars 150 forks source link

MobArena Queue #672

Open Pikaronga opened 3 years ago

Pikaronga commented 3 years ago

Feature request

Short description

You should make a way to join a queue and when a arena is available it sends the players that can fit in the arena that are in the queue to the arena.

Implementation details

This could either be made so you queue for all arenas or that you make it possible to specify different queues I'm the config. For example /ma joinqueue - joins the queue for all arenas. /ma joinqueue Example - Joins the example queue that are a list of arenas configurable in the config.

Additional info

Don't think so.

garbagemule commented 3 years ago

Thanks for the suggestion!

I'm a bit surprised we didn't already have an issue with this feature request, because it has been requested on several occasions in the past. Thanks for making it :)

A queue is not a particularly difficult concept in and of itself, but as with so many other things that touch on the way sessions are run in the plugin, it's difficult to fit it properly into the current code base without unraveling and reassembling parts of the plugin and potentially introducing breaking changes. So it probably can't be done right now (it will have to wait until the Sessions Rework), but that leaves us plenty of time to flesh out the idea a bit more.

A couple of initial thoughts on possible conflicts:

Some thoughts about features/implementation:

There's definitely not a clear spec yet, so please feel free to chime in and help flesh this out.

Pikaronga commented 3 years ago

I think that if there is a arena that is not currently active it should ofc sent the players directly to the arena. But if they are on-going and when they become available there should be some kind of gui that pops up and ask if they want to accept the mobarena game or not.

And It should be first come first served with who joins the arena. So the first person who joined the queue should be sent. But there could be some permission to get prioritisemt in the queue.

"How would this play together with the join interrupt timer? Let's say you join the queue and do something else. At the moment that the arena becomes ready, you are currently flying through the air with an Elytra and fireworks rockets. So your joining is interrupted and you are effectively denied access to the arena."

In that particular situation, there could be some feature that teleports them to the ground into a safe location or something and then there they can decide if they want to accept the mobarena. An alternative idea could be that in the config you can specify if you want them to accept thru commands or with a GUI. depending on the game-mode the mobarena is for.

I like your ideas with how the acceptment would work.

I don't really have any idea on how it works with building on commands but i think adding a new command would make it a bit better in some case? I don't know really.

Nesseley commented 3 years ago

In that particular situation, there could be some feature that teleports them to the ground into a safe location or something and then there they can decide if they want to accept the mobarena.

No, the player should simply get a "a MobArena is starting, please stand still to get teleported" or something alike that. No need to teleport people around and make a mess

Pikaronga commented 3 years ago

In that particular situation, there could be some feature that teleports them to the ground into a safe location or something and then there they can decide if they want to accept the mobarena.

No, the player should simply get a "a MobArena is starting, please stand still to get teleported" or something alike that. No need to teleport people around and make a mess

That is indeed better.

fireheart3911 commented 2 years ago

In that particular situation, there could be some feature that teleports them to the ground into a safe location or something and then there they can decide if they want to accept the mobarena. No, the player should simply get a "a MobArena is starting, please stand still to get teleported" or something alike that. No need to teleport people around and make a mess

That is indeed better.

You could also make the players spectate the arena they queued or just make another lobby for that.

fireheart3911 commented 2 years ago

Some ideas on how this could work:

Queue Groups and Fill-Ups

Create your MA Party (using sth like /ma party) and invite your friends to it (/ma invite) You may now queue for your desired arena -> here you could have a requirement for a full party If one of your teammates leaves (maybe a 3 minute buffer to rejoin) then your lobby gets filled up. Example:

You and 3 of your friends queue for game of MA and one of your friends leaves the queue. Behind you in the queue is a 2-Player-Party and 2 independent players, so the player who joined first and is not in a party gets moved into your group (not party ofc).

Queue Positions and Ready Check

Once your group is next up in the queue (The group before you just joined the class selection lobby) you will get a teleportation request to the arena (more on that later). Until your turn you can spectate the current game, finish your popcorn and maybe bet on who will survive the longest (There is a skript for that).

Ready Checks

Once you are next up there will be a Ready Check to see if you are still there. These consist of a GUI that will give you somewhere between 10 and 60 seconds to accept. If your party fails to complete it, there will be actions taken depending on how often you failed it.

  1. Fail: You will be set back to rank 10 in the queue
  2. Fail: You will be set back to 15% of the queue
  3. Fail: You will be kicked from the queue

Note that a Ready Check goes per Party not per Group. To give an Example:

Next up in the queue for an 8 Player Game is a Group with a 4 Player party, 2 independant players and a 2 player party. One of the players in the 2 Person Party fails the ready check so this party will be set back in queue. There will be a check if there are 2 Players Ready for fill-up, if so those players will get a ready check as well.

  • If there are enough ready players, the new group will succeed to the Arena (Spectating)
  • If there aren't enough players or the fill-ups fail the ready check, the remaining players can vote on playing the round with less players ore requeueing at 5% of queue.

Priority System and Multiqueues

I have no idea how this can be made fair yet, imma make a new comment as soon as i figures something out.

Summary

I think that, due to the complexity of this, it is worth to make a seperate plugin for queues so you can use it for other games too.