colonistio / design

https://colonist.io
3 stars 0 forks source link

Prompt before player quits the game #10

Open demiculus opened 2 years ago

demiculus commented 2 years ago

Description

Players occasionally quit the game.

  1. Write down the places where the user quits
  2. Design the right prompt for the players to continue playing etc..

Potential Options: Reload, Quit with penalty, start vote to disable karma

Resource

https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event you can catch this event to send a confirmation if a user tries to quit a game

mousetail

Submission Checklist

mousetail commented 2 years ago

Note you can't control the look of the popup. It will just be a generic browser alert() box, so no need to create a design.

demiculus commented 2 years ago

Note you can't control the look of the popup. It will just be a generic browser alert() box, so no need to create a design.

This comment is for exiting the browser. The player can leave by clicking the top left arrow. Clicking the resign button. Writing disable karma. etc..

oguzilerle commented 1 year ago

Is there an update on this issue? I believe a popup would be beneficial to prevent users from quitting unintentionally

Screenshot 2023-05-30 at 02 31 17