mirror of
https://github.com/He4eT/elseifplayer.git
synced 2026-05-05 01:17:22 +00:00
2.8 KiB
2.8 KiB
ElseIFPlayer
ElseIFPlayer is an interactive fiction player for the web. It's powered by cheap-glkote and Emglken.
To see a live demo, visit https://he4et.github.io/elseifplayer/.
Getting Started
- Ensure that you have Node.js and NPM installed on your system.
- Install the required packages by running the command
npm installin your project directory. - Launch the local development server using
npm run dev.
Build
To create a production build, use the following command:
npm run build <public-url>
- If you intend to host the player on
https://your.domain/, usenpm run build /. - For hosting it in a specific directory like
https://your.domain/some-directory/, usenpm run build /some-directory.
Direct links
You can provide a direct link to a specific game using the following URL format:
/#/<mode>/<encodedURL>/[theme]/
- The
modeparameter specifies the player interface mode:play: the default multi-window modefocus: the single-window mode without additional windows, such as the status bar
- The
encodedURLparameter represents the location of the storyfile encoded withencodeURIComponent. - The
themeparameter is optional and allows you to choose a specific UI theme.
CORS
If the player and your storyfile are located on different domains, you need to use appropriate CORS settings.
If you cannot modify the server settings, you can use the Parchment Proxy as an alternative.
Direct Link Examples
- Play "Lost Pig" with default or last used theme
- Play "Lost Pig" without statusbar with default or last used theme
- Play "Lost Pig" with Nord theme
- Play "Lost Pig" without statusbar with Dim theme
- Play "Lost Pig" loaded with Parchment Proxy
License
ElseIFPlayer is distributed under the MIT License. However, please remember to respect the licenses of the interpreters listed on the Emglken page.