Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce new poll feature 🗳️ #43

Merged
merged 24 commits into from
Sep 22, 2023
Merged

Introduce new poll feature 🗳️ #43

merged 24 commits into from
Sep 22, 2023

Conversation

applenick
Copy link
Member

This PR introduces an exciting new in-game polling feature that enables the seamless and efficient conduction of surveys. The system is designed to facilitate the effortless creation of polls, offering various options to choose from, such as command-based, set-next, player kicks, and more to come.

Example of a custom question (can be combined with any end-action)
Screenshot 2023-08-01 at 1 37 38 AM

Example of the player kick action
Screenshot 2023-08-01 at 1 38 38 AM

Example of the set next map action
Screenshot 2023-08-01 at 1 38 02 AM

Example of poll results broadcast:
Screenshot 2023-08-01 at 1 39 35 AM

Still a WIP 🚧

@applenick applenick added the new-feature New feature or request label Aug 1, 2023
@cswhite2000
Copy link
Member

I'm wondering if optional custom thresholds would be a good idea. For example, for setting a time-limit or kicking a player you could have a 2/3 threshold instead of a 50% threshold for actually executing the endaction.

@applenick
Copy link
Member Author

I'm wondering if optional custom thresholds would be a good idea. For example, for setting a time-limit or kicking a player you could have a 2/3 threshold instead of a 50% threshold for actually executing the endaction.

It's indeed a good idea! Do you have any thoughts on how best to implement this? One approach could be to introduce a /poll threshold, followed by a disclaimer under the main poll broadcast to ensure that players are aware ahead of time. Perhaps some preset buttons under the setup message too, to make it easier for staff to select 1/2, 2/3, etc.

On a related note, I was considering alternatives to time-based polls, such as a poll with a required player vote count.

Scenario:
/poll question Do you want to skip this map?
/poll require all
/poll start
In this scenario, the poll would automatically end once every online submits a vote.

However, one potential issue to address is how to handle players joining or leaving the server during the polling process. We might need to determine a fair way to draw the line when it comes to counting votes in such situations.

Brainstorming a bit further, there could be other interesting scenarios to consider, such as requiring a specific percentage of online players, just participants, observers, etc. Speaking of which, another idea just came to me – adding a vote filter to the polls for specific groups of players (participants/teams/observers) might be worth exploring too!

Thanks @cswhite2000, for sharing your idea! If you have any further thoughts on any of these ideas, feedback would be much appreciated. 👍

@cswhite2000
Copy link
Member

I like your suggested approach for poll thresholds 👍

On a related note, I was considering alternatives to time-based polls, such as a poll with a required player vote count.
Scenario: /poll question Do you want to skip this map? /poll require all /poll start In this scenario, the poll would automatically end once every online submits a vote.
However, one potential issue to address is how to handle players joining or leaving the server during the polling process. We might need to determine a fair way to draw the line when it comes to counting votes in such situations.

I don't think getting 100% of players to vote in a poll is feasible in most cases since some players will be afk or simply won't want to vote. An alternative though would be to have the option to have usage such as /poll require 75% and then once the threshold is reached have it automatically start a shorter timer to end the poll, to allow last-minute votes / or vote changes.

With regards to players leaving during a poll, I feel like it would be better to only count votes from players who're online at the point in time when the poll ends, as they'll be the ones actually affected by the result of the poll.

You should also consider having an automatic default expiry for such polls, to prevent them from lasting longer than their relevance.

Filtering polls for specific groups of players is a good idea.

Other ideas:

  • for the command polls allow the requester to describe what the command will do
  • for the mutation poll add the mutation's description to a hover
  • disable mutation action/poll
  • for the map poll add the map info, or the map tags to a hover
  • Incentivizing voting in polls with rewards such as raindrops, to get higher participation.
    • Presumably, this would just be adding an event on Community's end
  • Add a sound with alerts for players who haven't voted, possibly optional
    • could be too annoying for players
  • polls with non-boolean votes
    • possibly too complicated for a poll
  • map party polls ie dev.pgm.community.party
    • unsure of if this would have benefits over just doing a question poll.

@applenick
Copy link
Member Author

I'm beginning to explore how to implement multi-answer polls. Does anyone have any thoughts on the most effective way to implement them?

Ideally was thinking to have a maximum of 4 options, and simply executing multiple end-actions commands will be how staff can add multiple options to a poll. When no custom question is defined we'll auto-generate one based on the options. Here's a few examples to illustrate it:

Example: all mutations
/poll mutation rage
/poll mutation bread
/poll mutation mobs
/poll mutation blitz
/poll start

----------------- Server Poll -----------------
  Question: Which mutation should we enable?

	[Rage] [Bread] [Mobs] [Blitz]

-----------------------------------------------

Example: 2 different maps
/poll map Race for Victory
/poll map Directrix
/poll start

----------------- Server Poll -----------------
  Question: Which map should we play next?

	[Race for Victory] [Directrix] 

-----------------------------------------------

Though let's think of a more complex example. We have a 3 hour match going and staff wants to spice things up.

Example: multiple end actions
/poll command /spawn wither 100
/poll mutation fly
/poll kick applenick
/poll start

----------------- Server Poll -----------------
  	Question: What should we do?

[/spawn wither 100] [Fly Mutation] [Kick applenick] 

-----------------------------------------------

When multiple end-actions are included in a poll, the question will be more general (unless a custom question is defined). Depending on the type, the button will also feature additional text to provide clarity about the option.
Command -> display the command
Mutation -> <name> Mutation
Map -> Set <name>
Kick -> Kick <name>

If anyone has further thoughts or ideas, please feel free to share! I won't be starting on this right away, but I wanted to brainstorm beforehand to ensure we keep a clear implementation and simple command structure in place for staff.

@applenick
Copy link
Member Author

Polls on OCC have remained stable for some time now. As just about all suggested features have been implemented, going to merge now! 🎉

@applenick applenick force-pushed the new-polls branch 3 times, most recently from de69872 to 2ccc564 Compare September 22, 2023 06:46
* Also refactored poll components into a new interface

Signed-off-by: applenick <[email protected]>
Signed-off-by: applenick <[email protected]>
Signed-off-by: applenick <[email protected]>
@applenick applenick merged commit 604a5a4 into dev Sep 22, 2023
2 checks passed
@applenick applenick deleted the new-polls branch September 22, 2023 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-feature New feature or request
Development

Successfully merging this pull request may close these issues.

4 participants