Conversation
This class will handle all queueing and checking if users are in queues via redis.
TODO: Add in event streams to notify of new queues and list queues. TODO: Upon max queue creation, begin team selections, this will require changing the data of the queue. TODO: Upon team creation, create a match with no server, or a publically available one. Allow users to update as needed.
3db9fe3 to
f4e95ac
Compare
This should allow us to hit the max player limit and automatically remove the queue descriptor and start bringing in team arrays. For now, let's just assume teams are randomized always with no captains.
At max players create a team from the queue that is inserted into the database.
Roughed in some general logic for game server acquisition as well, have yet to test so will leave commented out.
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This merge includes a new system that is controlled through redis to create queues on the fly.
These queues will hold a max of user defined limits, which should later be changed to allow an absolute max to avoid potential abuse.
After the queues are created and 10 people join a queue, the queue should "pop" and go to either a system of selecting captains, and choosing teammates, or randomly select people. The initial feature will most likely be using HLTV rating to balance teams so that it isn't too stacked during a queue.
After teams are created, a match will be spun up with either an available server provided, or a server ID of none where a user will be able to update the match and assign a server.
As for now, the rough layout of the redis queue should be sufficient enough to work, but will need to catch all the edge cases. There is still quite a bit of work to be done, but best to get this into a draft to ensure that it can still be merged (if at all).