Skip to content

Commit

Permalink
v1.0.2 (#23)
Browse files Browse the repository at this point in the history
* remove get latest button, remove uservoice link

* add get started, add start-dev

* add final level, refactor

* try fix heroku port issue

* fix server.js, remove stupid line

* score validation

* bump version to 1.0.2

* limit level to 10
  • Loading branch information
platzhersh authored Dec 26, 2020
1 parent b4f81b4 commit 4dad697
Show file tree
Hide file tree
Showing 12 changed files with 155 additions and 60 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,27 @@ Feel free to use / copy / modify my code, as long as you reshare your version an

<a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" /></a><br /><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">Pacman Canvas</span> by <a xmlns:cc="http://creativecommons.org/ns#" href="http://platzh1rsch.ch" property="cc:attributionName" rel="cc:attributionURL">Platzh1rsch</a> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>.<br />Based on a work at <a xmlns:dct="http://purl.org/dc/terms/" href="https://github.com/platzhersh/pacman-canvas" rel="dct:source">https://github.com/platzhersh/pacman-canvas</a>.


Get started
===========

To just run the game locally, run `npm start`.
If you want to see the console logs in your browser, use the `npm run start-dev` instead.

To modify the game for your needs, look at the `pacman-canvas.js` file and make your modifications.
To change the look and feel, edit the `pacman-canvas.css` file or also the `index.htm`file, where everything comes together.

------

Version history
===============

*Version 1.0.2 - 26.12.2020*
* add get started section in README
* limit to 10 levels for now
* small refactorings
* add score validation in JS

*Version 1.0.1 - 6.10.2020*
* add `bump-version.sh` to make versioning easier

Expand Down
2 changes: 1 addition & 1 deletion cache.manifest
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CACHE MANIFEST
# Pacman 1.0.1 2020-10-06 00:57:08
# Pacman 1.0.2 2020-12-26 14:04:47

CACHE:

Expand Down
6 changes: 4 additions & 2 deletions data/db-handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,12 @@ function addHighscore($name, $score, $level) {
$maxlvlpoints_pills = 104 * 10;
$maxlvlpoints_powerpills = 4 * 50;
$maxlvlpoints_ghosts = 4 * 4 * 100;
$maxlvlpoints = $maxlvlpoints_pills + $maxlvlpoints_powerpills + $maxlvlpoints_ghosts;

// check if score is even possible
if ($level < 1) {
if ($level < 1 || $level > 10) {
$cheater = 1;
} else if (($score / $level) > (1600 + 1240)) {
} else if (($score / $level) > $maxlvlpoints) {
$cheater = 1;
}

Expand Down
4 changes: 1 addition & 3 deletions index.htm
Original file line number Diff line number Diff line change
Expand Up @@ -154,11 +154,9 @@ <h3>Powerpills</h3>
<div class="button" id="back">&lt; back</div>
<div>
<h1>Info</h1>
<p>Current Version: <span class="app-version">1.0.1 (2020-10-06)</span> (<a href="#" id="updateCode">get latest</a>)</p>
<p>Current Version: <span class="app-version">1.0.2 (2020-12-26)</span></p>
<img src="img/platzh1rsch-logo.png">
<p>Pacman Canvas is Open Source, written by <a href="http://platzh1rsch.ch">platzh1rsch</a>. You can get the code on <a target="_blank" href="https://github.com/platzhersh/pacman-canvas" target="_blank">github</a>.</p>
<p>If you have any suggestions how to make this app better, please post your suggestion / request on <a target="_blank" href="https://platzh1rsch.uservoice.com/">uservoice</a>.</p>
<p>
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 2,
"name": "Pacman Canvas",
"version": "1.0.1",
"version": "1.0.2",

"short_name": "Pacman Canvas",
"description": "An old classic, rewritten in HTML5",
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"name": "pacman-canvas",
"version": "1.0.1",
"version": "1.0.2",
"description": "pacman-canvas =============",
"main": "pacman-canvas.js",
"scripts": {
"start": "node server.js",
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"start-dev": "node --inspect server.js"
},
"repository": {
"type": "git",
Expand Down
8 changes: 8 additions & 0 deletions pacman-canvas.css
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ input[type="text"]:hover, input[type="text"]:focus, input[type="password"]:hover
height: 100%;
width: 540px;
max-width: 100%;
padding: 1em;
box-sizing: border-box;
}
#canvas-overlay-content {
position: absolute;
Expand All @@ -82,12 +84,18 @@ input[type="text"]:hover, input[type="text"]:focus, input[type="password"]:hover
text-align: center;
width: 540px;
max-width: 100%;
padding: 1em;
box-sizing: border-box;
}
#canvas-overlay-content #title {
text-transform: uppercase;
font-size: 150%;
}

#invalid-score {
margin-top: 2em;
}

.canvas { position:absolute; padding-top: 20px;}
.main {width: 100%; max-width: 660px; margin: 10px auto; position: static; left: auto;}
.content { width: 100%; max-width: 540px; text-align: left; margin: 0;}
Expand Down
Loading

0 comments on commit 4dad697

Please sign in to comment.