Skip to content

Commit 5bd29d4

Browse files
committed
Bug Fixes and Improvements
1 parent 8794648 commit 5bd29d4

File tree

15 files changed

+190
-86
lines changed

15 files changed

+190
-86
lines changed

README.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@ Prince of Persia reimplementation written in HTML5 / JavaScript
44

55
## Play Online
66

7-
- Browser: http://princejs.com
7+
- Browser: https://princejs.com
88
- Keyboard / Mouse Controls
99

1010
## Play Mobile
1111

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

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

5151
Default url looks as follows:
5252

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

5555
Default shortcut url looks as follows:
5656

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

5959
Manual adjustments of url parameters is possible as preset options.
6060

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

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

89-
- [100](http://princejs.com?level=100): Tower of Revenge (own)
90-
- [101-114](http://princejs.com?level=101): [Prince of Persia Revisited](https://www.popot.org/custom_levels.php?mod=0000163)
91-
- [115-128](http://princejs.com?level=115): [Jaffar's House](https://www.popot.org/custom_levels.php?mod=0000220)
92-
- [129-142](http://princejs.com?level=129): [Ipank's Levels](https://www.popot.org/custom_levels.php?mod=0000151)
93-
- [143-156](http://princejs.com?level=143): [Barre's Alternative](https://www.popot.org/custom_levels.php?mod=0000189)
94-
- [157-170](http://princejs.com?level=157): [Miracles Don't Exist](https://www.popot.org/custom_levels.php?mod=0000098)
95-
- [171-184](http://princejs.com?level=171): [Babylon Tower Climb](https://www.popot.org/custom_levels.php?mod=0000109)
96-
- [185-198](http://princejs.com?level=185): [Lost in Errors](https://www.popot.org/custom_levels.php?mod=0000144)
97-
- [199-212](http://princejs.com?level=199): [Story Retold](https://www.popot.org/custom_levels.php?mod=0000146)
98-
- [213-226](http://princejs.com?level=213): [Prince of Persia Guard Revolt](https://www.popot.org/custom_levels.php?mod=0000162)
99-
- [227-240](http://princejs.com?level=227): [Return of Prince](https://www.popot.org/custom_levels.php?mod=0000207)
89+
- [100](https://princejs.com?level=100): Tower of Revenge (own)
90+
- [101-114](https://princejs.com?level=101): [Prince of Persia Revisited](https://www.popot.org/custom_levels.php?mod=0000163)
91+
- [115-128](https://princejs.com?level=115): [Jaffar's House](https://www.popot.org/custom_levels.php?mod=0000220)
92+
- [129-142](https://princejs.com?level=129): [Ipank's Levels](https://www.popot.org/custom_levels.php?mod=0000151)
93+
- [143-156](https://princejs.com?level=143): [Barre's Alternative](https://www.popot.org/custom_levels.php?mod=0000189)
94+
- [157-170](https://princejs.com?level=157): [Miracles Don't Exist](https://www.popot.org/custom_levels.php?mod=0000098)
95+
- [171-184](https://princejs.com?level=171): [Babylon Tower Climb](https://www.popot.org/custom_levels.php?mod=0000109)
96+
- [185-198](https://princejs.com?level=185): [Lost in Errors](https://www.popot.org/custom_levels.php?mod=0000144)
97+
- [199-212](https://princejs.com?level=199): [Story Retold](https://www.popot.org/custom_levels.php?mod=0000146)
98+
- [213-226](https://princejs.com?level=213): [Prince of Persia Guard Revolt](https://www.popot.org/custom_levels.php?mod=0000162)
99+
- [227-240](https://princejs.com?level=227): [Return of Prince](https://www.popot.org/custom_levels.php?mod=0000207)

assets/gfx/dungeon.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2654,7 +2654,7 @@
26542654
"version": "1.0",
26552655
"image": "dungeon.png",
26562656
"format": "RGBA8888",
2657-
"size": { "w": 994, "h": 994 },
2657+
"size": { "w": 994, "h": 1095 },
26582658
"scale": "1",
26592659
"smartupdate": "$TexturePacker:SmartUpdate:dbf5317b7a592a0855d048ba9c9e90f3:1fa90b9bd65e0da3d77a9cb354980e8b:9c0fba27a8a0c106083a8713f6c67b32$"
26602660
}

assets/gfx/dungeon.png

41 Bytes
Loading

assets/gfx/palace.json

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -793,11 +793,11 @@
793793
"pivot": { "x": 0.5, "y": 0.5 }
794794
},
795795
"palace_21": {
796-
"frame": { "x": 466, "y": 132, "w": 60, "h": 79 },
796+
"frame": { "x": 240, "y": 699, "w": 64, "h": 79 },
797797
"rotated": false,
798798
"trimmed": false,
799-
"spriteSourceSize": { "x": 0, "y": 0, "w": 60, "h": 79 },
800-
"sourceSize": { "w": 60, "h": 79 },
799+
"spriteSourceSize": { "x": 0, "y": 0, "w": 64, "h": 79 },
800+
"sourceSize": { "w": 64, "h": 79 },
801801
"pivot": { "x": 0.5, "y": 0.5 }
802802
},
803803
"palace_21_fg": {
@@ -809,11 +809,11 @@
809809
"pivot": { "x": 0.5, "y": 0.5 }
810810
},
811811
"palace_22": {
812-
"frame": { "x": 466, "y": 132, "w": 60, "h": 79 },
812+
"frame": { "x": 572, "y": 699, "w": 64, "h": 79 },
813813
"rotated": false,
814814
"trimmed": false,
815-
"spriteSourceSize": { "x": 0, "y": 0, "w": 60, "h": 79 },
816-
"sourceSize": { "w": 60, "h": 79 },
815+
"spriteSourceSize": { "x": 0, "y": 0, "w": 64, "h": 79 },
816+
"sourceSize": { "w": 64, "h": 79 },
817817
"pivot": { "x": 0.5, "y": 0.5 }
818818
},
819819
"palace_22_fg": {
@@ -824,6 +824,14 @@
824824
"sourceSize": { "w": 60, "h": 79 },
825825
"pivot": { "x": 0.5, "y": 0.5 }
826826
},
827+
"palace_22_bright": {
828+
"frame": { "x": 639, "y": 699, "w": 64, "h": 79 },
829+
"rotated": false,
830+
"trimmed": false,
831+
"spriteSourceSize": { "x": 0, "y": 0, "w": 64, "h": 79 },
832+
"sourceSize": { "w": 64, "h": 79 },
833+
"pivot": { "x": 0.5, "y": 0.5 }
834+
},
827835
"palace_23": {
828836
"frame": { "x": 528, "y": 132, "w": 64, "h": 79 },
829837
"rotated": false,
@@ -1502,7 +1510,7 @@
15021510
"version": "1.0",
15031511
"image": "palace.png",
15041512
"format": "RGBA8888",
1505-
"size": { "w": 704, "h": 778 },
1513+
"size": { "w": 704, "h": 788 },
15061514
"scale": "1",
15071515
"smartupdate": "$TexturePacker:SmartUpdate:3a3d8c75a8b248755e710611b9d63f35:0bd9d2c7000d29b4af91037412139951:8936a721704451ecd45e2e9ac9aa500b$"
15081516
}

assets/gfx/palace.png

1.37 KB
Loading

assets/maps/custom/level223.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3143,7 +3143,8 @@
31433143
"skill": 11,
31443144
"colors": 7,
31453145
"type": "guard",
3146-
"direction": -1
3146+
"direction": -1,
3147+
"bias": 1
31473148
},
31483149
{
31493150
"room": 8,

package-lock.json

Lines changed: 76 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"eslint": "^7.32.0",
2525
"eslint-config": "^0.3.0",
2626
"eslint-config-prettier": "^8.3.0",
27-
"http-server": "^0.12.3",
27+
"http-server": "^13.0.1",
2828
"prettier": "^2.3.2",
2929
"xml2json": "^0.12.0"
3030
}

src/Fighter.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -995,7 +995,7 @@ PrinceJS.Fighter.prototype.checkFall = function (tile) {
995995
this.land();
996996
} else {
997997
this.level.maskTile(this.charBlockX + 1, charBlockY, this.room, this);
998-
if (tile.isBarrier()) {
998+
if (tile.isFreeFallBarrier()) {
999999
this.charX -= (tile.isBarrierLeft() ? 10 : 5) * this.charFace;
10001000
this.updateBlockXY();
10011001
tile = this.level.getTileAt(this.charBlockX, charBlockY, this.room);

0 commit comments

Comments
 (0)