Hi, I’m trying to install Vorple locally, and have done so on fresh directory with create-react-app, per this link:
I believe that I’m having trouble with the following line: story: "test.ulx",
I’m receiving this error:
Quixe init: Error: This is not a valid Glulx file. This is not a valid Glulx file. Error
This is after:
testing both absolute and relative paths
adding . and ~ before the / for the directory
placing the released story file in the “public” directory, per the Vorple link
trying both .Gblorb and .Zblorb file formats in the “public” directory.
What am I missing; are there better ways to troubleshoot why Vorple isn’t able to read the file? What alternative ways can I test run vorple being installed as a dependency on a web app?
The first thing to check is that the game file is accessible through the browser. For example, if the app is running on http://localhost:3000/ then going directly to http://localhost:3000/test.ulx should either download the game file or show it on screen as gibberish (the text representation of the binary file.) If it shows a 404 page or just loads the web app, the file isn’t in the correct place.
You can also check if anything in the Create React App docs can help, specifically story: process.env.PUBLIC_URL + "/test.ulx" might work.
If the direct URL does find and load the game file correctly, you can check the browser’s dev tools to see which path it tries to use to load the game file (press F12 and choose the network tab, then reload the page.) The path should be the same as the direct URL that works through the browser.
Thank you for responding! Loving the extension so far (was able to release a story and test it by opening an HTML file).
I tried opening the path as you said, swapping out /test.ulx with the path of the file as it’s written in the .js file, and it downloaded!
Is it potentially breaking becauze the file in question is a .zblorb or a .gblorb?
Looking at devtools, I noticed this in the quixe.js file:
if (val != 0x476c756c) // 'Glul' fatal_error("This is not a valid Glulx file.");
This seems to be the error I’m getting. Would you happen to know what function determines the value of val to be 0x476c756c, and is that the next step in the debugger’s journey?
Ah yes, you’re right, it needs to be a plain Glulx file. If you’re using Inform 7 you need to uncheck “Bind up into a Blorb file on release” in settings.
Uncheck that blorb setting you mentioned in settings
switch to Glulx
remove the “include Vorple” statements (i7 wouldn’t let me release the file without commenting those statements out).
Once I did that, and put the .ulx file in, it worked!
A second question: if I wanted to contain it (say, put borders around it, or even render the code on something cool like a 3D render with 3js), would you know if that’s possible?
A better question: since I wasn’t able to include Vorple in the .ulx file that I was able to put on the site, would I implement still be able to use Vorple features like passing info into and out of the vm with javascript?
No, you do need the extensions. But if you were able to include the extensions and compile to Z-machine it means that you used the extensions built-in to the Inform IDE which are now several years out of date. If you install the latest versions it should work with Glulx and the latest interpreter. The downloads are here and instructions here.
thank you for clarifying, I was confused as to whether or not downloading the extensions straight from the program would be the safest route. Thank you for your patience!