https://github.com/german/pong
simple ping-pong game #socket.io #node.js
https://github.com/german/pong
Last synced: 11 months ago
JSON representation
simple ping-pong game #socket.io #node.js
- Host: GitHub
- URL: https://github.com/german/pong
- Owner: german
- Created: 2010-12-07T09:45:07.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2024-12-14T11:58:32.000Z (over 1 year ago)
- Last Synced: 2024-12-14T12:29:58.337Z (over 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 2.14 MB
- Stars: 42
- Watchers: 8
- Forks: 15
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## 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:
```sh
$ git clone git://github.com/german/pong.git
$ cd pong
$ npm install
```
OR
```sh
$ sudo npm install
```
Then simply start the server with:
```sh
$ node server.js
```
Finally open two browser windows and point both to http://localhost:8080

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