{"id":14963959,"url":"https://github.com/oklemenz/princejs","last_synced_at":"2025-09-30T19:30:51.075Z","repository":{"id":45033237,"uuid":"357828397","full_name":"oklemenz/PrinceJS","owner":"oklemenz","description":"Prince of Persia reimplementation written in HTML5 / JavaScript","archived":false,"fork":true,"pushed_at":"2025-09-19T14:19:30.000Z","size":31229,"stargazers_count":965,"open_issues_count":0,"forks_count":77,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-09-19T16:29:21.447Z","etag":null,"topics":["phaser","prince-of-persia","retrogaming"],"latest_commit_sha":null,"homepage":"https://princejs.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"ultrabolido/PrinceJS","license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oklemenz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-14T08:19:16.000Z","updated_at":"2025-09-19T14:19:35.000Z","dependencies_parsed_at":"2023-02-10T13:46:39.944Z","dependency_job_id":null,"html_url":"https://github.com/oklemenz/PrinceJS","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/oklemenz/PrinceJS","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oklemenz%2FPrinceJS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oklemenz%2FPrinceJS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oklemenz%2FPrinceJS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oklemenz%2FPrinceJS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oklemenz","download_url":"https://codeload.github.com/oklemenz/PrinceJS/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oklemenz%2FPrinceJS/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277746955,"owners_count":25870057,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-30T02:00:09.208Z","response_time":75,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["phaser","prince-of-persia","retrogaming"],"created_at":"2024-09-24T13:32:23.448Z","updated_at":"2025-09-30T19:30:49.043Z","avatar_url":"https://github.com/oklemenz.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Prince of Persia (JS) - princejs.com\n\nPrince of Persia reimplementation written in HTML5 / JavaScript (MS-DOS version)\n\n## Play Online\n\n- Browser: https://princejs.com\n- Keyboard\n  - `Cursor keys`: Movement\n    - `Left / Right key`: Move Left/Right, Advance/Retreat\n    - `Up key`: Jump, Climb Up, Block Attack\n    - `Down key`: Crouch, Crawl, Climb Down, Sheathe Sword\n  - `SHIFT`: Drink Potion, Grab Edge, Sword Strike\n  - `SPACE`: Show Remaining Time\n  - `ENTER`: Continue Game\n- Mouse\n  - See Touch Controls for Mobile\n- Game Controller\n  - `Left / Right Stick, DPad`: Movement\n    - `Left / Right`: Move Left/Right, Advance/Retreat\n    - `Up`: Jump, Climb Up, Block Attack\n    - `Down`: Crouch, Crawl, Climb Down, Sheathe Sword\n  - `A / R / ZR Button`: Jump, Climb Up, Block Attack\n  - `B / Y / L / ZL Button`: Drink Potion, Grab Edge, Sword Strike\n  - `X`: (1x) Show Remaining Time, (2x) Restart Level\n  - `Minus Button`: Previous Level\n  - `Plus Button`: Next Level\n  - `Any`: Continue Game\n\n## Play Mobile\n\n- Browser: https://princejs.com\n  - Use Landscape Mode\n  - Single Tab\n  - Disable Landscape Tab Bar in Browser Settings\n- Add to Home Screen to start as Fullscreen App\n- Reduced difficulty (50%):\n  - https://princejs.com?strength=50\n- Touch Controls (tap/drag area on screen, fight mode in brackets):\n\n  ![Mobile](assets/web/mobile.svg)\n\n  - Dragging can be used to trigger continuous move sequences, e.g.\n    - _Run Jump_: Tap Left or Right -\u003e Hold -\u003e Drag in Left or Right corner\n    - _Jump Grab_: (Run) Jump -\u003e Hold -\u003e Drag to Center (Shift)\n  - Fight\n    - _Left/Right_: Advance/Retreat\n    - _Shift_: Sword Strike\n    - _Up_: Block Attack\n    - _Down_: Sheathe Sword\n\n## Play on Apple Watch\n\n- Mail/Message\n  - Send mail or message to yourself with body: https://princejs.com\n  - On Apple Watch open Mail or Message app\n  - Click included link to open Browser\n- Siri\n  - Tell Siri 'princejs.com' on Apple Watch\n  - Watch out for correct localized pronunciation\n- Play using Touch Controls as on Mobile\n\n## Play GitHub Version\n\n- Browser: https://oklemenz.github.io/PrinceJS\n\n## Play Locally\n\n- Install [Node.js](https://nodejs.org)\n- Clone: `https://github.com/oklemenz/PrinceJS.git`\n- Terminal:\n  - `npm install`\n  - `npm start`\n- Browser: `localhost:8080`\n\n## Options\n\nUrl parameters are leveraged to save game state automatically (shortcut in brackets)\n\n- `level (l)`: Current Level (1-14, default: 1)\n- `health (h)`: Max Health (3-10, default: 3)\n- `time (t)`: Remaining Minutes (1-60, default: 60)\n- `strength (s)`: Guard Strength in \"%\" (0-100, default: 100)\n- `width (w)`: Game Width in \"px\" (default: 0 (fit to screen))\n- `shortcut (_)`: Write url in shortcut version (default: false)\n\nDefault url looks as follows:\n\nhttps://princejs.com?level=1\u0026health=3\u0026time=60\u0026strength=100\u0026width=0\n\nDefault shortcut url looks as follows:\n\nhttps://princejs.com?l=1\u0026h=3\u0026t=60\u0026s=100\u0026w=0\u0026_=true\n\nManual adjustments of url parameters is possible as preset options.\n\n## Custom Levels\n\nApoplexy (https://apoplexy.github.io/apoplexysite/) can be used to build custom\nlevels.\nCustom levels can be played performing the following steps.\n\n### Single Conversion\n\n- Save level as XML file in Apoplexy, e.g. `./xml/level1.xml`\n- Call convert script, e.g. `npm run convert .../xml/level1.xml`\n  - A JSON file is placed at `/assets/maps/`, e.g. `/assets/maps/level101.json`\n- Custom level ids starts beyond 100, e.g. `level1.xml` gets id `101`, etc.\n  - An optional second parameter can be used to control level offset\n  - e.g. `npm run convert .../xml/level1.xml 200` generates `/assets/maps/level201.json`\n- Start game locally with `npm start` and open game in browser\n- Change Url and set parameter `level` to the respective id, e.g. `level=101`\n- Note: No special events are supported\n\n### Batch Conversion\n\n- Place level files into folder `/converter/\u003cxxx\u003e`, where `\u003cxxx\u003e` stands for the offset (default: 100)\n  - e.g. `/converter/100`: place all levels starting with 100 offset\n- Execute `npm run convert`\n- Corresponding JSON files are placed at `/assets/maps/`\n\n### Level Numbers\n\nConverted levels from https://www.popot.org/custom_levels.php:\n\n- [99](https://princejs.com?level=99\u0026strength=50): Chamber Play (own)\n- [100](https://princejs.com?level=100\u0026strength=50): Tower of Revenge (own)\n- [101-114](https://princejs.com?level=101\u0026strength=50): Prince of Persia Revisited ([source](https://www.popot.org/custom_levels.php?mod=0000163))\n- [115-128](https://princejs.com?level=115\u0026strength=50): Jaffar's House ([source](https://www.popot.org/custom_levels.php?mod=0000220))\n- [129-142](https://princejs.com?level=129\u0026strength=50): Ipank's Levels ([source](https://www.popot.org/custom_levels.php?mod=0000151))\n- [143-156](https://princejs.com?level=143\u0026strength=50): Barre's Alternative ([source](https://www.popot.org/custom_levels.php?mod=0000189))\n- [157-170](https://princejs.com?level=157\u0026strength=50): Miracles Don't Exist ([source](https://www.popot.org/custom_levels.php?mod=0000098))\n- [171-184](https://princejs.com?level=171\u0026strength=50): Babylon Tower Climb ([source](https://www.popot.org/custom_levels.php?mod=0000109))\n- [185-198](https://princejs.com?level=185\u0026strength=50): Lost in Errors ([source](https://www.popot.org/custom_levels.php?mod=0000144))\n- [199-212](https://princejs.com?level=199\u0026strength=50): Story Retold ([source](https://www.popot.org/custom_levels.php?mod=0000146))\n- [213-226](https://princejs.com?level=213\u0026strength=50): Prince of Persia Guard Revolt ([source](https://www.popot.org/custom_levels.php?mod=0000162))\n- [227-240](https://princejs.com?level=227\u0026strength=50): Return of Prince ([source](https://www.popot.org/custom_levels.php?mod=0000207))\n- [241-254](https://princejs.com?level=241\u0026strength=50): The Sequel ([source](https://www.popot.org/custom_levels.php?mod=0000273))\n- [255-268](https://princejs.com?level=255\u0026strength=50): Nahemsan ([source](https://www.popot.org/custom_levels.php?mod=0000272))\n- [269-282](https://princejs.com?level=269\u0026strength=50): 4-Rooms Levelset ([source](https://www.popot.org/custom_levels.php?mod=0000052))\n- [283-296](https://princejs.com?level=283\u0026strength=50): Repetition of Time ([source](https://www.popot.org/custom_levels.php?mod=0000010))\n- [297-310](https://princejs.com?level=297\u0026strength=50): Same Story Different Version ([source](https://www.popot.org/custom_levels.php?mod=0000276))\n\n### Level Walkthrough\n\n- **Level 99:** https://youtu.be/Aj3tfAaXD4c\n\n![Level 99 - Chamber Play](assets/web/level99.gif)\n\n- **Level 100:** https://youtu.be/PAHACXdWQ_M\n\n![Level 100 - Tower of Revenge](assets/web/level100.gif)\n\n## Credits\n\n- https://github.com/ultrabolido ([PrinceJS](https://github.com/ultrabolido/PrinceJS))\n- https://github.com/jmechner ([Prince-of-Persia-Apple-II](https://github.com/jmechner/Prince-of-Persia-Apple-II))\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foklemenz%2Fprincejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foklemenz%2Fprincejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foklemenz%2Fprincejs/lists"}