Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/he4et/elseifplayer
Interactive Fiction player for the web
https://github.com/he4et/elseifplayer
interactive-fiction
Last synced: 2 months ago
JSON representation
Interactive Fiction player for the web
- Host: GitHub
- URL: https://github.com/he4et/elseifplayer
- Owner: He4eT
- License: mit
- Created: 2021-03-25T11:02:56.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2024-01-27T02:49:58.000Z (about 1 year ago)
- Last Synced: 2024-01-27T03:23:56.436Z (about 1 year ago)
- Topics: interactive-fiction
- Language: JavaScript
- Homepage: https://he4et.github.io/elseifplayer/
- Size: 3.62 MB
- Stars: 28
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# ElseIFPlayer
ElseIFPlayer is an interactive fiction player for the web.
It's powered by [cheap-glkote](https://github.com/He4eT/cheap-glkote) and [Emglken](https://github.com/curiousdannii/emglken).Player available here: [https://he4et.github.io/elseifplayer/](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 install` in 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
```- If you intend to host the player on `https://your.domain/`, use:
```
npm run build /
```
- For hosting it in a specific directory like `https://your.domain/some-directory/`, use:
```
npm run build /some-directory
```The finalized production bundle will be generated and stored in the `/docs` directory.
## Direct links
You can provide a direct link to a specific game using the following URL format:
```
/#///[theme]/
```- `mode` specifies the player interface mode:
- `play`: the default multi-window mode
- `focus`: the single-window mode without additional windows, such as the status bar
- `encodedURL` represents the location of the storyfile encoded with `encodeURIComponent`.
- `theme` 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](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) settings.If you cannot modify the server settings, you can use the [Parchment Proxy](https://iplayif.com/proxy/) as an alternative.
### Direct Link Examples
- [Play "Lost Pig" with default or last used theme](https://he4et.github.io/elseifplayer/#/play/https%3A%2F%2Fmirror.ifarchive.org%2Fif-archive%2Fgames%2Fzcode%2FLostPig.z8/)
- [Play "Lost Pig" without statusbar with default or last used theme](https://he4et.github.io/elseifplayer/#/focus/https%3A%2F%2Fmirror.ifarchive.org%2Fif-archive%2Fgames%2Fzcode%2FLostPig.z8/)
- [Play "Lost Pig" with Nord theme](https://he4et.github.io/elseifplayer/#/play/https%3A%2F%2Fmirror.ifarchive.org%2Fif-archive%2Fgames%2Fzcode%2FLostPig.z8/nord/)
- [Play "Lost Pig" without statusbar with Dim theme](https://he4et.github.io/elseifplayer/#/focus/https%3A%2F%2Fmirror.ifarchive.org%2Fif-archive%2Fgames%2Fzcode%2FLostPig.z8/dim/)
- [Play "Lost Pig" loaded with Parchment Proxy](https://he4et.github.io/elseifplayer/#/play/https%3A%2F%2Fiplayif.com%2Fproxy%2F%3Furl%3Dhttps%3A%2F%2Fifarchive.org%2Fif-archive%2Fgames%2Fzcode%2FLostPig.z8)## License
ElseIFPlayer is distributed under the MIT License.
However, please remember to respect the licenses of the interpreters
listed on the
[Emglken page](https://github.com/curiousdannii/emglken#included-projects).