Mouse control

On desktop, a significant part of our users plays outside fullscreen mode. Your game should avoid users accidentally leaving the game by clicking outside of the game frame. We recognize 3 different game types:

  • First-person games:
    • Lock the mouse in the center of the screen during gameplay
    • Implement a keyboard shortcut to unlock the mouse (e.g. Escape, Tab)
    • Examples: Bloxd.io
  • Top-view games in which the character moves based on mouse gestures (Agar.io, GunMaster.io, …). In these games, we require your game to:
    • Lock the mouse & confine it to the game area
    • Show a custom pointer or use an alternative method to display the mouse position (‘joystick’).
    • Implement a keyboard shortcut to unlock the mouse (e.g. Escape, Tab)
    • If any UI buttons are shown during gameplay, they should either be clickable or a keyboard shortcut should be indicated.
    • Optionally, the game could also add WASD/Arrow keys
    • Examples: Little Big Fighters, GunMaster.io
  • Other games, where most actions are taken with mouse clicks on the UI (clickers, bubble shooter, …)
    • In these games with limited mouse movement, we do not require mouse confinement.

For HTML5 games, please refer to the Pointer Lock API.