Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Embed html page (puzzlescript) in Twine?

How might I embed a Puzzlescript game inside of a Twine story?

Puzzlescript is tool to make simple puzzle games, that can be exported as an HTML file. I'd like to embed a Puzzlescript game (which I will create) into a Twine story, similar to how you can embed images etc into Twine.

Could someone please point me towards a method for embedding the HTML for a Puzzlescript game into Twine? I can't attach an example Puzzlescript game as an HTML file to this message (too big), but if you click "EXPORT" within the "hack" editor on this page, you'll get the full HTML file as a download.

Example (not my game): http://www.puzzlescript.net/play.html?p=6872613

THANKS!

Comments

  • It doesn't seem like this is currently plausible. I'm trying to painstakingly import the bare html into a passage, and each javascript snippet into "script" passages, but pasting a buffer too large seems to make Twine hang on my mac and then forget that the file exists, so I haven't been able to tell if this works.

    Maybe you'll have better luck with this strategy though?
  • Another way to approach this would be to keep the PuzzleScript completely separate from the Twine story, and simply include it in Twine via an <iframe>. I tried this just now and it basically seemed to work, though I couldn't figure out how to get a local copy of the example you linked. I tried a Save As (web page complete) from Chrome and the copy complains "ERROR No ID specified in URL".
  • Thanks! I will investigate if I can figure it out in an iFrame somehow. I'm a bit new to all of this, is this the kind of code I'd be using? Another example game here, not mine.

    <html><iframe src="http://www.puzzlescript.net/play.html?p=9867759"></iframe></html>;
  • Hmmm. When I try just putting the above example in Twine in an <iframe>, that actual game doesn't appear. Just the title above and hyperlinks below, from the webpage. Any ideas?
  • Did you make the frame big enough to show the whole Web site (see link for instructions)? What site are you putting in the iframe?
  • Aha! It works. Thanks a bunch. I just didn't change the size of the frame. This is perfect, thanks a bunch.
Sign In or Register to comment.