Simple ping-pong browser game (using canvas and socket.io on the client side). Node.js used as a back-end server.
To start the game you should install nodejs and npm: (http://nodejs.org/#download and http://npmjs.org/)
Then clone the game from github and install socket.io dependency:
$ git clone git://github.com/german/pong.git
$ cd pong
$ npm install
OR
$ sudo npm install
Then simply start the server with:
$ node server.js
Finally open two browser windows and point both to http://localhost:8080
![Знімок екрана 2024-02-08 о 13 15 26](https://private-user-images.githubusercontent.com/33149/303307724-905e5ece-7181-477c-8bf6-85e030c8b2b1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU3MjQzNTEsIm5iZiI6MTcyNTcyNDA1MSwicGF0aCI6Ii8zMzE0OS8zMDMzMDc3MjQtOTA1ZTVlY2UtNzE4MS00NzdjLThiZjYtODVlMDMwYzhiMmIxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTA3VDE1NDczMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWNlNjU3ODk3YThkMjlhYTQ1NTdlOGM4Y2IwMmZhZTk4MzIxODhjN2VlYTJmMGY1ZTljNDE2YTE1Njk0OWQzMzAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.0bX_i0kDVlk0y7birW62ffvzdInabDDvgrNrKxeqtlw)
Use 'Up' or 'Down' arrows to move your racket. Press Spacebar to start the round (only if two players are connected to the same room)
Tested and works in Google Chrome and Firefox