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

Persistent games #79

Open
krystofNovotny opened this issue May 14, 2020 · 4 comments
Open

Persistent games #79

krystofNovotny opened this issue May 14, 2020 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@krystofNovotny
Copy link
Contributor

Use case:

Every time an opponent joins my game, I need to recreate it if I still want it to be available for other people to play.
It would be nice, if game could have a "persistent" flag, meaning it will just stay under the active games section indefinitely, allowing for multiple people to join without original creator's interaction. It would greatly boost engagement with the game.

Proposed solution:

It should be fairly easy to implement. I did some experiments and managed to get it working by

  • New flag persistent in createGame html page and few more places
  • Making a copy of a game in GameService::onJoinGameRequest

Problems:

  • We might want to be able to cancel a persistent game, cancel feature is not there yet, it might be useful even for non-persistent games.
  • Persistent game should cancel itself after user's time runs out once (to avoid inactive game spam)
  • I think the feature, connecting you automatically to the existing game, if you're creating a new one of the same type, would have to be removed or changed to work just for non-persistent games (I don't think it's a good feature even in the current state of the game - it prohibits you from choosing opponents within the same style)

I am interested in what you think about my proposal. If you think it's a good idea, I can have a pull request ready in a few days.

@pongstylin
Copy link
Owner

pongstylin commented May 15, 2020

"it prohibits you from choosing opponents within the same style"
You can go to the waiting game list and choose the opponent you wish. Auto matching will match you to the oldest game to help keep waiting times down. As you say, it should probably avoid persisted games.

Being able to cancel your waiting game, even if not persisted, would be a nice feature.

Being able to automatically cancel a real-time game (2min or less) based on sensible conditions(s) would also be nice. (I can think of multiple possible conditions)

Automatically cancelling a persisted game based on sensible condition(s) would certainly be a requirement. The moment I understood your feature, inactive game spam became my biggest concern.

Persistent real-time games should be forbidden. I am already annoyed that somebody created a 30-second game in 5 styles all at once. They were quick to show up when I joined one of them, but it left other people hanging when they joined his other games during our game.

Basically, I am on board with your feature suggestion as long as it offers a good player experience. The guiding principle is that a person joining a game can reasonably expect that their opponent will show up and make their move before the time limit expires.

@pongstylin pongstylin added the enhancement New feature or request label May 16, 2020
@krystofNovotny
Copy link
Contributor Author

I'll drop a specification draft / thought list here. It's far from finished, I am also not quite sure how would I do a few things yet. I just want it to be out there, so you can comment on it and suggest any ideas. I'll edit this to match the way we agree uphon.

Persistent games specs draft:

Creating

  • When persistent game is selected on the create game page, realtime options are hidden
  • Server side prohibits from creating realtime persistent game
  • When creating a persistent game, automatch doesn't match me
  • When creating a non-persistent game, automatch doesn't match me with persistent games
  • One persistent game / style / person

Presentation

  • Pin icon representing persistent game on the game list
  • Sort by multiple fields: nonpersistent first, sorted from oldest to newest, then persistent from oldest to newest (newest meaning somebody joined recently)
  • Bump the shown games limit up a bit

Join

  • attempt to join persistent game from opponent which already has an ongoing instance (=same opponent, style) will redirect to the current game instead of creating a new one

Auto cancel

  • After creator fails to show up (=turn time runs out / arbitrary timer) within a reasonable amount of time (day?) for any of the persistent games, cancel them all without mercy

Hide (=temporarily remove from open_games + prevent ppl from joining)

  • If too many (10?) ongoing parallel persistent games exist for one person, hide all their persistent games (check after opponents have joined and the game is starting)

Show

  • after a player has less than a specific amount of persistent games running, show them all again (check after the game ends)

To think about (most likely out of scope)

  • Hide the game for opponent you just played with for a short time (2 hours?) to prevent farming
  • Random set rotation would be nice to prevent easy countering (would require ability to save multiple sets per style)
  • Would be nice to sort persistent games from most active to least active (activity score for the player = mean time it takes for a player to make a move across some time period)

@pongstylin
Copy link
Owner

I like all the thinking behind this. The only thing I might comment on is the "random set rotation" bit. There is another issue in the list where you can choose to randomly switch sides (left/right) at game start. This would help with the countering problem, but admittedly multiple saved sets would help even more. Multiple saved sets is a premium feature I'm planning for my commercial fork, but I am not opposed to adding this feature here. After all, the capability is already there on the server-side and will be enhanced a bit in the next release (release branch 0.11).

@pongstylin
Copy link
Owner

Hide the game for opponent you just played with for a short time (2 hours?) to prevent farming

I developed an opinion on this. I think we should hide all open games with people we are already playing in that style. This includes persistent and non-persistent games. No need to continue to hide the open game once your game with the person ends.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants