Play pong game across multiple windows on the same origin using localStorage. Inspired by this project. I hope you enjoy it!
- Clone the repo
- open
index.html
in multiple windows tabs
- Using
localStorage
to store the game state and sync it across multiple windows. screenX
andscreenY
are used to calculate different window positions.- Maybe window.getScreenDetails() can be used to get the window position in the future.