Twine Game Images Don’t Work

Hello! I noticed a day ago that whenever I try to download a local copy of a twine game and run it from any folder the images are broken. Twine is a simple text adventure creator that’s based on html, so these are locally stored web pages with images in associated subfolders. So far I’ve tried manually setting 644 permissions to all images to see if that would fix things, but no dice. I also attempted to load directly into Firefox using the file:// protocol, and got a “file not found” error when doing so, but I noticed that when I load the webpage by double clicking it in dolphin the path sent to Firefox is /run/user/… while I have the file saved in /home/Games/… so this looks like some universal blue sandboxing stuff if I had to guess. https://ryngm.itch.io/trigaea is an example of a downloadable twine game, but I’ve also tried a number of others. Appears to not be related to any specific title. So… any suggestions on how to be able to see the pretty artwork in my text adventures? lol. I’d just use the online versions, but a lot of twine creators don’t have one made.
itch.io
Trigaea by RynGM
Alter genes, survive. Sci-fi RPG. 270k+
Solution:
If you want to run a local html pages with references to local images or other local pages you need to use an http server. You can install one with brew, open the terminal and run brew install http-server. then use cd path/to/the/page/you/want/to/serve (put your path where you extracted your text adventure). Then run http-server and it will give you something like "listening on localhost:8080" then open "http://localhost:8080" (change it to what it says and you should be able to load the i...
Jump to solution
4 Replies
Solution
wolfyreload
wolfyreload5w ago
If you want to run a local html pages with references to local images or other local pages you need to use an http server. You can install one with brew, open the terminal and run brew install http-server. then use cd path/to/the/page/you/want/to/serve (put your path where you extracted your text adventure). Then run http-server and it will give you something like "listening on localhost:8080" then open "http://localhost:8080" (change it to what it says and you should be able to load the images in the adventure)
Vrana the BunnyCat
Absolutely wild, lol, but it works! Just for my edification does this mean that when using a local webpage on windows it’s doing something similar in the background, or are the OSes handling local web pages in completely different manners?
wolfyreload
wolfyreload5w ago
Probably a sandboxing issue, browsers in linux are usually packaged as flatpaks that don't have access to the filesystem in a normal way. Found that usually a small local webserver works well for getting around that
Vrana the BunnyCat
Update to my prior post: if one doesn’t wish to open a local web server, while categorizing games in Lutris I noticed it has a web runner. Tried pointing it at an HTML file for a twine game and it rendered properly, so one can as an alternate solution import all one’s html based games into lutris using that web runner.

Did you find this page helpful?