tetrio / issues

Report issues and discuss improvements / feature requests around TETR.IO
https://tetr.io
401 stars 21 forks source link

Tetrio URL with URL parameters that create & set private room config #965

Open rajun274 opened 2 years ago

rajun274 commented 2 years ago

Checklist

Is your feature request related to a problem? Please describe.

Background: several months ago, I posted on the Discord channel how I was co-hosting a tetris tournament using Tetrio for a bunch of coworkers. For all games [besides the finals], we asked pairs to play on their own and report back their results. They all played FT5 games.

The problem: 50% of our participants (30 people) were brand new to Tetrio (some of them were very casual gamers), and we were worried they wouldn't know how to (1) create a private room, (2) how to set "First to" to "5", and (3) how to invite their opponent to the room. We didn't want a flood of pings, and so we created both a Google Doc with instructions as well as a screen+audio recording explaining the steps. Although that worked, a less manual solution that didn't require educational content would've been nice.

Describe the solution you'd like

[Higher priority] It would've been great if I could just ping the pairs of players a special URL that I've generated on their behalf. The URL would (1) create the private room for them and (2) initialize the game's config. Example:

tetr.io/multiplayer/custom/private?commands=meta.match.ft=5

[Lower priority] For a better solution for (3) how to invite their opponent to the room, one idea is maybe another /set command can be a user-defined room code. Example: ?commands=meta.roomCode=SOMERANDOMLETTERS. In reality, I would just type a bunch of random letters (ex: roomCode=FOEIJOFDSW) which would guarantee that both players entered the same room.

So in summary, I would be able to ping the pair of players this example URL:

tetr.io/multiplayer/custom/private?commands=meta.match.ft=5;meta.roomCode=NSJGNJEWK

Note: it would be nice if any solution allows me to easily copy/paste the list of /set commands into a room so I can quickly verify that they are valid commands.

(I'll leave it to you whether you actually want to go with relative paths, URL parameters (? symbol), and/or # symbol.)

Describe alternatives you've considered

Alternative for (1) and (2): I could pre-create the rooms myself and send out those links. I think that's a bad idea b/c that means I need to open a crapton of tetr.io tabs (slow down browser), I can't leave any of the rooms or else the room code will not exist, and make sure each one is properly managed (update game config; make sure I'm spectating). Players may get confused why I'm in the room, and wonder why I'm not responding to in-game messages.

Alternative for (3): have a new /set command that invites the given list of usernames. Example: ?commands=inviteList=player1,player2. However, this means I need to know all my coworkers' usernames upfront, which I don't have and would be extra work for me to gather. And some just played as guest.

Additional context

No response

ZaptorZap commented 2 years ago

This is a pretty great suggestion, although I can't help but see the potential for abuse coming from allowing certain attributes such as the room title being encodable, or the general possibility of coordinated mass creation of public rooms. For example: imagine following a masked URL redirection service while opening TETR.IO Desktop. Login is skipped, and you end up inadvertently creating a public room with an offensive room title, specially crafted to bypass swear word filters. Options like the room code would also definitely have to be restricted, since you cannot set custom room titles without the purchase of TETR.IO Supporter. (truth be told, nobody's going to just use "random letters" if that functionality spreads.)

I also see a potential discoverability issue with this functionality. It's analogous to replays supporting specific round highlights with the addition of an @ symbol at the end of your URL, such as https://tetr.io/#R:eNBCPZ57a@6. Many players just don't know about this functionality—I could even add it to TETR.IO's trivia section on the Tetris.Wiki. That's just how obscure this functionality is. Of course, better UI could be developed, and with some creative framing, it'd even solve #157.

Mass invite systems would certainly be abused—as has our existing social system for unsolicited advertisements. I personally believe such a feature is a bit unnecessary anyway, especially for a conventional 1v1 tournament. There's a line on how much room setup should be automated, and I think automating user invites definitely goes past that.

These issues could be worked out, and I understand that the functionality for this feature would be a godsend for tournament organizers such as yourself.


As an aside, validity of your /set command can be easily checked by just trying the /set command in a private room. If any option defines a value outside allowed ranges, you'll get verbose information about what went wrong. Furthermore, there's a primary source of information regarding /set commands (such as automated tools to create them, or lists of options) right here. image If the command doesn't run at all(like, it actually stays in chat when you press enter), then you're trying to set a value that doesn't exist. In fact, trying this out potentially points to a new issue, where there's not really good handling for this scenario. (it throws an error in the console with some scary nulls)

An alternative not supplied in the original would be the use of approved bot accounts to automate this functionality as well. As of now, current solutions are still in closed testing, but something to look forward to is Zudo's "Autohost" project.

pikaninja commented 2 years ago

What about some sort of encoded id for the config? That way when creating a room you can pass a (optional) id that sets the settings when created, this is kinda just /set command but bad though :shrug:

rajun274 commented 2 years ago

Wow, thank you so much for the detailed reply! I appreciate you taking the time to think critically about this feature request. I'll comment on each issue individually.

room title

As you pointed out, there's much to think about regarding my original solution. Here’s another alternative: what if there was a TETR.IO page that allowed me to specify the number of room codes to pre-generate, and then it spits out a list of room codes? Simplified example just using HTTP:

How many room codes? [30] [ENTER BUTTON]
tetr.io/#ABCD
tetr.io/#ABCE
tetr.io/#ABCF
...

Note that I can easily paste this into Google Sheets (or a .txt for programmers) to programmatically append ?commands=meta.match.ft=5.

To play devil’s advocate, I’m going to guess (based on my usage of the MULTIPLAYER > “room ID textbox”) TETR.IO doesn’t currently support empty rooms. Would this be possible to support? Mass creation can be regulated by applying a quota to the account that generated the rooms. And rooms would auto-delete after 24hr. (Of course, there are probably a lot more caveats with this idea that you’ll identify.)

mass creation of public rooms

Note that tournament organizers like myself don’t need this feature for public rooms - only private rooms.

discoverability

I reckon this feature would only be used by tournament organizers, who I’m guessing are power users? These are people who would likely actively search for solutions. There could be a new section in the FAQ and Wiki dedicated to tournament organization.

mass invites

Acknowledged; let’s drop that.

testing /set commands

Yes, totally! I was moreso saying that we may not want a solution like this:

tetr.io/multiplayer/custom/private?commands=meta.match.ft=5&commands=game.options.allow180=1

Because there’s a 2nd &commands= in the URL, I can’t just copy/paste all the commands into a private room: I need to do some text manipulation; i.e., more room for user error.

Let me know what you think about all of this! Additionally, if you want to continue forward, I'd recommend you get the proposed solution reviewed by the organizer of a bigger tournament, to ensure it works for both small and large organizers (they may have different experiences than me).