var c = {
// matchmaker
- WS_PORT: 80,
+ WS_PORT: 9680,
NUM_PLAYERS: 10,
FPS: 30,
WAIT_TIME: 60000, // 1 minute
{
- "requires": true,
+ "name": "pong_br",
+ "version": "1.0.0",
"lockfileVersion": 1,
+ "requires": true,
"dependencies": {
"async-limiter": {
- "version": "1.0.0",
- "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.0.tgz",
- "integrity": "sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg=="
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-2.0.0.tgz",
+ "integrity": "sha512-nyHFzvVaR+4mfHc90/VqOUQjlnk9+ioDxQfqDuqKnm3m9sIT7joVKW8dkxeaKpamMJ3MYD73t6M8PMKEWlQESQ=="
},
"ws": {
"version": "6.2.1",
"integrity": "sha512-GIyAXC2cB7LjvpgMt9EKS2ldqr0MTrORaleiOno6TweZ6r3TKtoFQWay/2PceJ3RuBasOHzXNn5Lrw1X0bEjqA==",
"requires": {
"async-limiter": "~1.0.0"
+ },
+ "dependencies": {
+ "async-limiter": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/async-limiter/-/async-limiter-1.0.1.tgz",
+ "integrity": "sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ=="
+ }
}
}
}
{
- "name": "pong_br",
- "version": "1.0.0",
- "description": "Pong: Battle Royale!",
- "main": "matchmaker.js",
- "dependencies": {
- "ws": "^6.2.1"
- },
- "devDependencies": {},
- "scripts": {
- "start": "node matchmaker.js",
- "test": "echo \"Error: no test specified\" && exit 1"
- },
- "author": "Elijah Cohen",
- "license": "UNLICENSED"
+ "name": "pong_br",
+ "version": "1.0.0",
+ "description": "Pong: Battle Royale!",
+ "main": "matchmaker.js",
+ "dependencies": {
+ "async-limiter": "^2.0.0",
+ "ws": "^6.2.1"
+ },
+ "devDependencies": {},
+ "scripts": {
+ "start": "node matchmaker.js",
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "author": "Elijah Cohen",
+ "license": "UNLICENSED"
}
--- /dev/null
+[Unit]
+Description=Pong Battle Royale
+
+[Service]
+Type=simple
+User=eli
+ExecStart=/usr/bin/npm start --prefix /home/eli/pong_br/server
+Restart=on-failure
+
+[Install]
+WantedBy=multi-user.target
\ No newline at end of file
ctx.fillStyle = 'rgba(225,225,225,100)'
ctx.textAlign = 'center';
ctx.fillText("you placed: " + place, 0, -7.5);
- ctx.fillText("press =g= or click/tap", 0, 0); // magic numbers...
+ ctx.fillText("press 'g' or click/tap", 0, 0); // magic numbers...
ctx.fillText("to play again", 0, 7.5);
ctx.restore();
}
<p>Yes, this is a battle royale version of pong. You are matched up with a large amount of other players in a shrinking arena, and your goal is to survive to the very end.</p>
<p>Use 'w' and 's', 'k' and 'j', or the arrow keys to move your paddle with the keyboard, or touch the top or bottom half of the screen to move up or down with a touchscreen.</p>
<p>You are the player on the left-hand side whose paddle is a slightly different color.</p>
- <a href="/play" id="b">PLAY</a>
+ <a href="https://pong.eli173.com/play" id="b">PLAY</a>
</div>
</body>
</html>