From: Elijah Cohen Date: Mon, 16 Aug 2021 04:19:28 +0000 (-0400) Subject: relocated to eli173 domain, rewrote to use systemd service X-Git-Url: https://git.eli173.com/?a=commitdiff_plain;ds=sidebyside;p=pong_br relocated to eli173 domain, rewrote to use systemd service --- diff --git a/server/constants.js b/server/constants.js index d42b8df..5146e7a 100644 --- a/server/constants.js +++ b/server/constants.js @@ -2,7 +2,7 @@ var c = { // matchmaker - WS_PORT: 80, + WS_PORT: 9680, NUM_PLAYERS: 10, FPS: 30, WAIT_TIME: 60000, // 1 minute diff --git a/server/package-lock.json b/server/package-lock.json index fb88917..82e7548 100644 --- a/server/package-lock.json +++ b/server/package-lock.json @@ -1,11 +1,13 @@ { - "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", @@ -13,6 +15,13 @@ "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==" + } } } } diff --git a/server/package.json b/server/package.json index d99549f..03627b6 100644 --- a/server/package.json +++ b/server/package.json @@ -1,16 +1,17 @@ { - "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" } diff --git a/server/pong.service b/server/pong.service new file mode 100644 index 0000000..b80d305 --- /dev/null +++ b/server/pong.service @@ -0,0 +1,11 @@ +[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 diff --git a/web/draw.js b/web/draw.js index 94374d2..fd630c4 100644 --- a/web/draw.js +++ b/web/draw.js @@ -116,7 +116,7 @@ var drawOverlay = function(ctx, place) { 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(); } diff --git a/web/index.html b/web/index.html index de949b8..790aa96 100644 --- a/web/index.html +++ b/web/index.html @@ -28,7 +28,7 @@

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.

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.

You are the player on the left-hand side whose paddle is a slightly different color.

- PLAY + PLAY