Giter Site home page Giter Site logo

curiousdannii / parchment Goto Github PK

View Code? Open in Web Editor NEW
416.0 30.0 60.0 97.24 MB

The Interactive Fiction web app

Home Page: https://iplayif.com

License: MIT License

CSS 11.18% HTML 5.68% JavaScript 16.73% Shell 6.85% TypeScript 58.65% Dockerfile 0.91%
interactive-fiction emulator

parchment's Introduction

Parchment

Parchment is the Interactive Fiction player for the web. To play a story with Parchment go to https://iplayif.com!

IFTF logo

Parchment is made with the support of a grant from the Interactive Fiction Technology Foundation.

Parchment for Inform 7

Inform 7 includes Parchment, allowing you to produce personal websites for your stories. If you want to update the version of Parchment used by Inform 7, get it from the releases page and unzip it into the Templates subfolder of your project's Materials folder.

Site Generator

For those who aren't using Inform 7 (or who can no longer recompile their storyfile), the Parchment Site Generator allows you to make a single file version of Parchment. This supports any of the formats supported by Parchment (Adrift 4, Glulx, Hugo, TADS 2/3, Z-Code).

Single File Build

Parchment is also available as a single file, suitable for downloading and using offline. Download from the releases page.

Free Software

Parchment is MIT licensed, and incorporates the following upstream projects:

Name Upstream repo License
AsyncGlk curiousdannii/asyncglk MIT
Bocfel garglk/garglk GPL-2.0/GPL-3.0
Emglken curiousdannii/emglken MIT
Git DavidKinder/Git MIT
GlkOte erkyrath/glkote MIT
Glulxe erkyrath/glulxe MIT
Hugo hugoif/hugo-unix BSD-2-Clause
Iosevka be5invis/Iosevka OFL
jQuery jquery/jquery MIT
Quixe erkyrath/quixe MIT
RemGlk erkyrath/remglk MIT
Scare garglk/garglk GPL-2.0
TADS tads-intfic/tads-runner GPL-2.0
ZVM curiousdannii/ifvms.js MIT

Building Instructions

Parchment is only designed for building in Linux and may not work in other OSes. You'll need to install Git and Node version >= 16.

The upstream projects are included as git submodules. Start by initializing the submodules:

git submodule update --init --recursive

Then install the npm dependencies:

npm install

This will also automatically build Parchment.

Then, you'll need to open index.html on a web server. (It won't work when you run it on your filesystem as a file:/// URL.) You can launch a simple web server like this:

npm start

Then you can view Parchment at http://localhost:8080 to see your handiwork.

Each time you change code in the src folder, the server will automatically rebuild the web code. Refresh to see your changes.

You can also build your own dist/inform/parchment-for-inform7.zip like this:

npm install
npm run inform7

parchment's People

Contributors

curiousdannii avatar dfabulich avatar juhana avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

parchment's Issues

Update to latest Quixe

Our version of Quixe is very old, and does not work properly (upper window doesn't display sometimes.)

Preferably switch to a submodule if possible.

Command runner? [Question]

Hi!
I'm working on a qml frontend for Parchment. I'm stuck with command input.
My idea is:
I have the command typed in a variable: command
I would like to call the action from a function in this way:

   function commandinput(command) {
			runner.toParchment({ type: 'TextInput', code: 'line', input: command });
		}

But I'm not able to work it out.

Could anyone help me?

Parchment for I7 has problems that makes using it uncomfortable for the web

Hi!

In the recent update of my Inform 7 game Tuuli, I've noticed that the template deployed by I7 to play the games in zblorb is not ideal, and even, it has a worst behavior than the pure Parchment experience.

I've released the game as a zblorb because I wanted optimal online play even in mobile. (Quixe is not there yet), but found that the parchment template of Inform 7 has a little problem that makes an abyss for playing online: it does not automatically scroll to the last displayed message.

It would seem a very little problem, but it is a total game breaker in the browser desktop because the player must scroll down by hand every time he types an action, with the mouse wheel or pressing SPACE, every time; once the buffer scroll has disappeared below the browser window. In mobile is just a little annoyance because the user can easily swipe his finger down to read the new text (but still not ideal).

You can test this in my Tuuli release at itchio:

https://rubereaglenest.itch.io/tuuli

Updating the parchment template doesn't help, even it has worsened the problem. You can try, use any game released with the interpreter by I7, and update the interpreter using this file

https://raw.github.com/curiousdannii/parchment/master/lib/parchment-for-inform7.zip

The case is worsened because now the reader can't even scroll down! The new text disappears forever down there and the player simply can't play.

This two cases struck me because plain vanilla Parchment WORKS GREAT AS IS. Compare those experiences with playing my game, or some other, directly from ifplay:

http://iplayif.com/?story=http%3A%2F%2Fwww.ifarchive.org%2Fif-archive%2Fgames%2Fzcode%2FTuuli.zblorb

Another game so you can test this: Photopia running in a experimental environment:

http://papadasoft.com/par/

And Photopia running from iplayif site:

http://iplayif.com/?story=http%3A%2F%2Fwww.ifarchive.org%2Fif-archive%2Fgames%2Fzcode%2Fphotopia.z5

So... it would be nice to have this repaired. A parchment for Inform 7 that works exactly equal to the vanilla parchment experience.

Even more, what I really need is web template of vanilla Parchment downloadable from iplayif site, or here. I don't want parchment for I7, I want just a zip with an html and the interpreter that behaves exactly as iplayif.com

Can we have it?

I know that web development is a tricky thing... this problem is tested in Chrome, When trying to reproduce it in Microsoft EDGE I found that EDGE behaves as intended! The buffer scrolls goes down automatically for new text. YAY!

Ok, now, the parchment update for I7 template is completely broken. It fails as described even in EDGE.

I've not tested the thing in Firefox, and I use Windows 10.

Thanks!

window[b] is not a constructor

I am trying to run parchment but when i go to the url
http://localhost:3000/?story=stories/troll.z5

I receive the error:

Uncaught TypeError: window[b] is not a constructor
at g.init (parchment.min.js:13)
at g (parchment.min.js:13)
at Array.g (parchment.min.js:13)
at i (jquery.min.js:2)
at Object.fireWith [as resolveWith] (jquery.min.js:2)
at Object. (jquery.min.js:2)
at i (jquery.min.js:2)
at Object.fireWith [as resolveWith] (jquery.min.js:2)
at y (jquery.min.js:4)
at XMLHttpRequest.c (jquery.min.js:4)

It happens whenever i try to load a game.

Allow the window to be set to full width

Would it be possible to modify the parchment div so that the width is treated as variable and the window can be set to 100% width, so that it adapts to any width the window is set to?

Provide instructions on generating HTML with Parchment

Maybe I could fix a bug or two in Parchment, but I have no idea how to generate an HTML page with it, so I can't test my changes in a browser.

It would be great if somebody were to update the README explaining how I could generate a playable HTML site, given a fresh git clone and a blorb/gblorb/z5/zblorb game file.

Make strict mode safe

The FatalError thing tries to access properties which are blocked in strict mode.

Logging

Does parchment have a way of recording actions a user has taken, and saving a transcript of their game, that can be sent back to the server?

Unknown opcode #29 at pc=1

I have no idea what this means but I am receiving this error:

"Unknown opcode #29 at pc=1"

when I perform a specific command in my IF story.

Any ideas what the cause is and how it can be fixed? My IF was built using Inform 7 if that helps??

Thanks.
Chris.

p.s. I have no issues running the story from within Inform 7 itself.

Contributing styles for the Inform 7 templates

I want to contribute some style/mobile updates, but am unsure where the relevant styles are. Could you point them out for me? Specifically the index.html and play.html and styles that get generated for inform 7.

Auto-scrolling doesn't work in Chrome

Hi!

None of the games seem to scroll to the bottom correctly whenever new output appears.

For example try this one: http://iplayif.com/?story=http://mirror.ifarchive.org/if-archive/games/zcode/metamorp.z5 Type in "inv" multiple times so it scrolls beyond the bottom of the screen.

I've confirmed this on multiple machines with Chrome 62 and 63 (beta).

I don't know whether it's a bug in Chrome or in Parchment. The auto-scrolling works in Firefox and Edge.

Thanks!

Add responsive margins to Glulx CSS

Currently, a Glulx game running with glkote.css prints its text across the entire window, with almost no left or right margins. When playing a game in a typical modern (and wide) browser window, this makes for a less pleasant reading experience than if the text were constrained to a width more typical of a printed page (or, indeed, a hand-held device).

All of the game's content should really appear in a single, centered column, whose width is set responsively depending upon the window's width. (Such that it will use up the whole strip on a mobile device, e.g., but constrain itself to a maximum width on desktop.)

I would recommend taking a page from Bootstrap, here, and the way its responsive "container" divs work.

zvm - no top bar when accessing saved game url

Hi Guys.

I've written a mapping application that interfaces with Parchment by parsing the top bar to locate the room the player is in.

When using zvm and saving the game (getting the save url), accessing the url again will produce a game without a top bar.

Please see example here:
http://www.zorkmid.co.nr/play/?story=z/ZorkmidDemoGame/ZorkmidDemoGame.z8
By clicking the save button (diskette icon on the top right) and then refreshing the browser you'll be able to see that the top bar has disappeared, consequently the mapping does not work anymore.

Contrast with this url:
http://www.zorkmid.co.nr/play/?story=z/ZorkmidDemoGame/ZorkmidDemoGame.z8&vm=gnusto
(using gnusto) Where doing the above produce the game with the top bar as normal

Thanks

Something wrong with unicode input and Polish letters

Hi there! I am working on Polish version of Inform 6 library. Everything is working when I use interpreters such as WinFrotz etc. To my great regret, Parchment doesn't want to recognise any Polish letter. Here is Polish version of classic "Ruins": http://iplayif.com/?story=http://zp.lo3.wroc.pl/~gwiazdek/ruins.z5

If I try any verb that doesn't include special character it works fine:
"ob" (short of "obejrzyj" - means "look") returns room description
however:
"weź grzyb" (means "take mushroom") includes character "ź" - and it returns that the verb is not recognised.

I know that you were working on Unicode input long time ago. I read all old discussions, but nothing helped.

Parchment is amazing, but this issue basically inhibits promotion of Polish inform. It would be great if you could help to solve!

Best!

Quixe init: glk_put_jstring: invalid stream

Hello,

I get this error message when I try to load a .gblorb game (Everybody Dies, in this case) through iplayif.com:

Quixe init: glk_put_jstring: invalid stream

E.g. with this URL:
http://iplayif.com/?story=http%3A%2F%2Fwww.ifarchive.org%2Fif-archive%2Fgames%2Fcompetition2008%2Fglulx%2Feverybodydies%2FEverybodyDies.gblorb

I suspect this is because of the images in Everybody Dies, since other games are working fine at iplayif.com, but I haven't tested thoroughly. Is this an issue with the game file, or something that could be debugged in Parchment?

The EverybodyDies.gblorb file works fine in desktop interpreters, for what it's worth.

ZW

accessibility problems

Hello,
I'm a screen reader user, and notice some major problems when using Parchment. Basically, the screen reader doesn't speak new text as it reaches the screen. Browsing the Google Code project, I notice there is acommit which experimented with ARIA and Live Regions. I don't know if this was reverted for some reason, but now it doesn't work.
I also noticed that Andrew Plotkin self-hosts his games in Parchment, and in there the screen reader behaves as it should (see any online game at http://eblong.com/zarf/if.html).

Difference between using a .z file and a .z.js file

It seems I can use the zcode files as well as the .js files. Can you explain the difference?

Also I'd like to know how to convert the zcode files to .js myself. There seem to be some tools in a subfolder but so far I couldn't figure out how to use them,

And if I use story files with in game sound or graphics - will they work too?

Text input not recognized in Firefox

the story seems to load correctly but when I enter a command all I receive is:

That's not a verb I recognise

No matter what I enter.

What am I doing wrong here?

trying to create mobile app

first sorry for my bad english, I'm creating a mobile app using parchment and phonegap, I can save for each game and store it in a file, etc. the app could say that is working, except for open local files, it only works when you download from other sites, I need to open the files using the "fileOpen" plugin of phonegap, but would not know very well where in the code add this
could you just tell me where in the code opens a file?
so I could change it and keep trying

this is my mail if you prefer: deacege[at]outlook.com

Switch to https for GA

When Parchment is opened over https the browser won't load the GA script, which means my caniuse stats are less accurate.

Link to parchment repository gets in the way of the prompt after continue the play after a Pause the game (mobile)

Hi,

Parchment is really nice for playing IF on mobile, but there's a glitch or problem after passing a "Pause the game". I've tested this on Android. In any zblorb game at the ifcomp site.

After a "Pause the game" or "Press any key", the game continues, but now the link to the parchment repository labeled as "Parchment for Inform 7" is printed just on top of the prompt. It is not a game breaker bug because we can bring the virtual keyboard up hitting any place in the mobile screen, but players usually hit the place where the prompt is, so the link is activated and the navigation jump to this repository, losing all progress in the game.

That is, by default, the mobile view of Parchment do it great hiding that link, but in a somewhat manner, that css trick fails after returning from a Pause or Press any key.

Regards.

Mobile browser input

The intended behaviour for Parchment on mobile browsers is that tapping anywhere will focus the input box and bring up the software keyboard. After accepting a command the keyboard will disappear, because on small screens it takes up too much space. On big screens it shouldn't be a problem having it disappear as it is easy to bring it up again by tapping anywhere.

If this doesn't match how it works on your device, please explain what does happen instead.

Save / Restore failure on minimal story. Unknown opcode #0 at pc=

I can't seem to track the source of this issue down. The closest I have gotten is to say that it looks like something is causing the PC to grow beyond the bounds of the memory, causing it to read undefined as the opcode which it then coerces into 0.

To see this in action, save and restore from here: http://iplayif.com/?story=http://tr.eeho.us/treehous.z5

The full I7 source of the story in question is below.

"tr.eeho.us" by Chris Rhoden

Release along with an interpreter.

The Nameless Void is a room. "There is nothing here. Not even darkness." 
East of the void is the void. West of the void is the void.
North of the void is the void. South of the void is the void.
Above the void is the void. Below the void is the void.

KeyCharPrimitive() loses window scroll position

In any game (but for instance my first game http://iplayif.com/?story=http://hlabrande.fr/if/games/espions.z5), when KeyCharPrimitive (in I6) or "wait for any key" (in I7) is used, Parchment loses the position to where the window had been scrolled and send you back to the beginning, instead of staying around the same position.

If a game has a ton of text then a "press any key" and no "clearscreen" instruction, you have to scroll again all the way down to go back to where you were. If the game uses this effect a lot, for example to pace cutscenes, you have to scroll down dozens of time and it's really annoying, borderline unplayable.
(This shows up in games in French, more than in games in English, because the francophone scene uses this effect a lot historically.)

Parchment could either stay at the same position and have the player scroll down a bit to see the text that just popped up, or scroll down automatically as desktop interpreters do.

Thanks! :)

Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue

root@cf8a7475e8d3:/parchment# npm install
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN engine [email protected]: wanted: {"node":">=0.12"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN engine [email protected]: wanted: {"node":">=4"} (current: {"node":"0.10.29","npm":"1.4.21"})

Character input doesn't work in mobile Chrome

http://iplayif.com/?story=http%3A%2F%2Fwww.ifarchive.org%2Fif-archive%2Fgames%2Fzcode%2Fdegen.z5
After entering the command HELP to open a help menu, the interface switches to single keypress mode. However, on Android, using Parchment in mobile Google Chrome, the virtual keyboard can be popped up but touching a key (a single keypress) fails to activate a command. Because commands can't be activated, it is not possible to exit help.

Running Frotz on the same device, running the same game, touching a single key does activate a command. Help can be exited as expected.

Bug can also be observed in Quixe e.g.
https://dl.dropboxusercontent.com/u/23390721/Release/play.html

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.