Skip to content

Commit

Permalink
Bug Fixes and Improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
oklemenz committed Sep 1, 2021
1 parent 8794648 commit 5bd29d4
Show file tree
Hide file tree
Showing 15 changed files with 190 additions and 86 deletions.
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ Prince of Persia reimplementation written in HTML5 / JavaScript

## Play Online

- Browser: http://princejs.com
- Browser: https://princejs.com
- Keyboard / Mouse Controls

## Play Mobile

- Browser: http://princejs.com
- Browser: https://princejs.com
- Use Landscape Mode (single Browser Tab)
- Force Fullscreen: http://princejs.com?fullscreen=true
- Force Fullscreen: https://princejs.com?fullscreen=true
- Add to Home Screen to start as Fullscreen App
- Reduced difficulty (50%):
- http://princejs.com?strength=50&fullscreen=true
- https://princejs.com?strength=50&fullscreen=true
- Touch Controls (tap/drag area on screen):

![Mobile](assets/web/mobile.svg)
Expand Down Expand Up @@ -50,11 +50,11 @@ Url parameters are leveraged to save game state automatically (shortcut in brack

Default url looks as follows:

http://princejs.com?level=1&health=3&time=60&strength=100&width=0&fullscreen=false
https://princejs.com?level=1&health=3&time=60&strength=100&width=0&fullscreen=false

Default shortcut url looks as follows:

http://princejs.com?l=1&h=3&t=60&s=100&w=0&f=false&_=true
https://princejs.com?l=1&h=3&t=60&s=100&w=0&f=false&_=true

Manual adjustments of url parameters is possible as preset options.

Expand Down Expand Up @@ -86,14 +86,14 @@ Custom levels can be played performing the following steps.

Converted levels from https://www.popot.org/custom_levels.php:

- [100](http://princejs.com?level=100): Tower of Revenge (own)
- [101-114](http://princejs.com?level=101): [Prince of Persia Revisited](https://www.popot.org/custom_levels.php?mod=0000163)
- [115-128](http://princejs.com?level=115): [Jaffar's House](https://www.popot.org/custom_levels.php?mod=0000220)
- [129-142](http://princejs.com?level=129): [Ipank's Levels](https://www.popot.org/custom_levels.php?mod=0000151)
- [143-156](http://princejs.com?level=143): [Barre's Alternative](https://www.popot.org/custom_levels.php?mod=0000189)
- [157-170](http://princejs.com?level=157): [Miracles Don't Exist](https://www.popot.org/custom_levels.php?mod=0000098)
- [171-184](http://princejs.com?level=171): [Babylon Tower Climb](https://www.popot.org/custom_levels.php?mod=0000109)
- [185-198](http://princejs.com?level=185): [Lost in Errors](https://www.popot.org/custom_levels.php?mod=0000144)
- [199-212](http://princejs.com?level=199): [Story Retold](https://www.popot.org/custom_levels.php?mod=0000146)
- [213-226](http://princejs.com?level=213): [Prince of Persia Guard Revolt](https://www.popot.org/custom_levels.php?mod=0000162)
- [227-240](http://princejs.com?level=227): [Return of Prince](https://www.popot.org/custom_levels.php?mod=0000207)
- [100](https://princejs.com?level=100): Tower of Revenge (own)
- [101-114](https://princejs.com?level=101): [Prince of Persia Revisited](https://www.popot.org/custom_levels.php?mod=0000163)
- [115-128](https://princejs.com?level=115): [Jaffar's House](https://www.popot.org/custom_levels.php?mod=0000220)
- [129-142](https://princejs.com?level=129): [Ipank's Levels](https://www.popot.org/custom_levels.php?mod=0000151)
- [143-156](https://princejs.com?level=143): [Barre's Alternative](https://www.popot.org/custom_levels.php?mod=0000189)
- [157-170](https://princejs.com?level=157): [Miracles Don't Exist](https://www.popot.org/custom_levels.php?mod=0000098)
- [171-184](https://princejs.com?level=171): [Babylon Tower Climb](https://www.popot.org/custom_levels.php?mod=0000109)
- [185-198](https://princejs.com?level=185): [Lost in Errors](https://www.popot.org/custom_levels.php?mod=0000144)
- [199-212](https://princejs.com?level=199): [Story Retold](https://www.popot.org/custom_levels.php?mod=0000146)
- [213-226](https://princejs.com?level=213): [Prince of Persia Guard Revolt](https://www.popot.org/custom_levels.php?mod=0000162)
- [227-240](https://princejs.com?level=227): [Return of Prince](https://www.popot.org/custom_levels.php?mod=0000207)
2 changes: 1 addition & 1 deletion assets/gfx/dungeon.json
Original file line number Diff line number Diff line change
Expand Up @@ -2654,7 +2654,7 @@
"version": "1.0",
"image": "dungeon.png",
"format": "RGBA8888",
"size": { "w": 994, "h": 994 },
"size": { "w": 994, "h": 1095 },
"scale": "1",
"smartupdate": "$TexturePacker:SmartUpdate:dbf5317b7a592a0855d048ba9c9e90f3:1fa90b9bd65e0da3d77a9cb354980e8b:9c0fba27a8a0c106083a8713f6c67b32$"
}
Expand Down
Binary file modified assets/gfx/dungeon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 15 additions & 7 deletions assets/gfx/palace.json
Original file line number Diff line number Diff line change
Expand Up @@ -793,11 +793,11 @@
"pivot": { "x": 0.5, "y": 0.5 }
},
"palace_21": {
"frame": { "x": 466, "y": 132, "w": 60, "h": 79 },
"frame": { "x": 240, "y": 699, "w": 64, "h": 79 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 60, "h": 79 },
"sourceSize": { "w": 60, "h": 79 },
"spriteSourceSize": { "x": 0, "y": 0, "w": 64, "h": 79 },
"sourceSize": { "w": 64, "h": 79 },
"pivot": { "x": 0.5, "y": 0.5 }
},
"palace_21_fg": {
Expand All @@ -809,11 +809,11 @@
"pivot": { "x": 0.5, "y": 0.5 }
},
"palace_22": {
"frame": { "x": 466, "y": 132, "w": 60, "h": 79 },
"frame": { "x": 572, "y": 699, "w": 64, "h": 79 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 60, "h": 79 },
"sourceSize": { "w": 60, "h": 79 },
"spriteSourceSize": { "x": 0, "y": 0, "w": 64, "h": 79 },
"sourceSize": { "w": 64, "h": 79 },
"pivot": { "x": 0.5, "y": 0.5 }
},
"palace_22_fg": {
Expand All @@ -824,6 +824,14 @@
"sourceSize": { "w": 60, "h": 79 },
"pivot": { "x": 0.5, "y": 0.5 }
},
"palace_22_bright": {
"frame": { "x": 639, "y": 699, "w": 64, "h": 79 },
"rotated": false,
"trimmed": false,
"spriteSourceSize": { "x": 0, "y": 0, "w": 64, "h": 79 },
"sourceSize": { "w": 64, "h": 79 },
"pivot": { "x": 0.5, "y": 0.5 }
},
"palace_23": {
"frame": { "x": 528, "y": 132, "w": 64, "h": 79 },
"rotated": false,
Expand Down Expand Up @@ -1502,7 +1510,7 @@
"version": "1.0",
"image": "palace.png",
"format": "RGBA8888",
"size": { "w": 704, "h": 778 },
"size": { "w": 704, "h": 788 },
"scale": "1",
"smartupdate": "$TexturePacker:SmartUpdate:3a3d8c75a8b248755e710611b9d63f35:0bd9d2c7000d29b4af91037412139951:8936a721704451ecd45e2e9ac9aa500b$"
}
Expand Down
Binary file modified assets/gfx/palace.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion assets/maps/custom/level223.json
Original file line number Diff line number Diff line change
Expand Up @@ -3143,7 +3143,8 @@
"skill": 11,
"colors": 7,
"type": "guard",
"direction": -1
"direction": -1,
"bias": 1
},
{
"room": 8,
Expand Down
100 changes: 76 additions & 24 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"eslint": "^7.32.0",
"eslint-config": "^0.3.0",
"eslint-config-prettier": "^8.3.0",
"http-server": "^0.12.3",
"http-server": "^13.0.1",
"prettier": "^2.3.2",
"xml2json": "^0.12.0"
}
Expand Down
2 changes: 1 addition & 1 deletion src/Fighter.js
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,7 @@ PrinceJS.Fighter.prototype.checkFall = function (tile) {
this.land();
} else {
this.level.maskTile(this.charBlockX + 1, charBlockY, this.room, this);
if (tile.isBarrier()) {
if (tile.isFreeFallBarrier()) {
this.charX -= (tile.isBarrierLeft() ? 10 : 5) * this.charFace;
this.updateBlockXY();
tile = this.level.getTileAt(this.charBlockX, charBlockY, this.room);
Expand Down
Loading

0 comments on commit 5bd29d4

Please sign in to comment.