/multi-window-pong-game

Play pong game across multiple windows on the same origin using localStorage

Primary LanguageJavaScriptMIT LicenseMIT

Multi-window-pong-game

Play pong game across multiple windows on the same origin using localStorage. Inspired by this project. I hope you enjoy it!

Demo

preview

How to run

  1. Clone the repo
  2. open index.html in multiple windows tabs

How it works

  • Using localStorage to store the game state and sync it across multiple windows.
  • screenX and screenY are used to calculate different window positions.
  • Maybe window.getScreenDetails() can be used to get the window position in the future.

License

MIT