Skip to content
Switch branches/tags
This branch is up to date with master.

Latest commit

- Take over lifes from level 12 to 13
- Don't show level/time info in level 13 and 14
- Leap of faith is ready directly after shadow merge (no waiting for music end)
- Fix "runturn" sliding glitch, through right side gate (e.g. level 10)
- Jaffar takes a moment longer until engarde (start fight)

Git stats


Failed to load latest commit information.

Prince of Persia (JS) -

Prince of Persia reimplementation written in HTML5 / JavaScript (MS-DOS version)

Play Online

  • Browser:
  • Keyboard
    • Cursor keys: Movement
    • SHIFT: Sword, Drink Potion, Grab Edges
    • SPACE: Show Remaining Time
  • Mouse Controls
    • See Touch Controls for Mobile

Play Mobile

  • Browser:

    • Use Landscape Mode
    • Single Tab
    • Disable Landscape Tab Bar in Browser Settings
  • Add to Home Screen to start as Fullscreen App

  • Reduced difficulty (50%):

  • Touch Controls (tap/drag area on screen, fight mode in brackets):


    • Dragging can be used to trigger continuous move sequences, e.g.
      • Run Jump: Tap Left or Right -> Hold -> Drag in Left or Right corner
      • Jump Grab: (Run) Jump -> Hold -> Drag to Center (Shift)
    • Fight
      • Left/Right: Advance/Retreat
      • Shift: Strike
      • Up: Block
      • Down: Sheathe

Play on Apple Watch

  • Mail/Message
    • Send mail or message to yourself with body:
    • On Apple Watch open Mail or Message app
    • Click included link to open Browser
  • Siri
    • Tell Siri '' on Apple Watch
    • Watch out for correct localized pronunciation
  • Play using Touch Controls like on Mobile

Play GitHub Version

Play Locally

  • Install Node.js
  • Clone:
  • Terminal:
    • npm install
    • npm start
  • Browser: localhost:8080


Url parameters are leveraged to save game state automatically (shortcut in brackets)

  • level (l): Current Level (1-14, default: 1)
  • health (h): Max Health (3-10, default: 3)
  • time (t): Remaining Minutes (1-60, default: 60)
  • strength (s): Guard Strength in "%" (0-100, default: 100)
  • width (w): Game Width in "px" (default: 0 (fit to screen))
  • shortcut (_): Write url in shortcut version (default: false)

Default url looks as follows:

Default shortcut url looks as follows:

Manual adjustments of url parameters is possible as preset options.

Custom Levels

Apoplexy ( can be used to build custom levels. Custom levels can be played performing the following steps.

Single Conversion

  • Save level as XML file in Apoplexy, e.g. ./xml/level1.xml
  • Call convert script, e.g. npm run convert .../xml/level1.xml
    • A JSON file is placed at /assets/maps/, e.g. /assets/maps/level101.json
  • Custom level ids starts beyond 100, e.g. level1.xml gets id 101, etc.
    • An optional second parameter can be used to control level offset
    • e.g. npm run convert .../xml/level1.xml 200 generates /assets/maps/level201.json
  • Start game locally with npm start and open game in browser
  • Change Url and set parameter level to the respective id, e.g. level=101
  • Note: No special events are supported

Batch Conversion

  • Place level files into folder /converter/<xxx>, where <xxx> stands for the offset (default: 100)
    • e.g. /converter/100: place all levels starting with 100 offset
  • Execute npm run convert
  • Corresponding JSON files are placed at /assets/maps/

Level IDs

Converted levels from



Prince of Persia reimplementation written in HTML5 / Javascript (MS-DOS Version)







No packages published