snozbot / fungus

An easy to use Unity 3D library for creating illustrated Interactive Fiction games and more.
MIT License
1.67k stars 294 forks source link

Twine Integration #221

Open RonanPearce opened 9 years ago

konistehrad commented 7 years ago

Hey all! If people are still interested in this functionality, I actually have used the MIT-licensed YarnSpinner pretty extensively, and I think Twine integration would provide a ton of value in terms of rapid prototyping. If there's still interest for this feature I'd like to get a handle on what people would like to see Twine Integration mean. So:

  1. Do we want a one-off translation layer, where a twine file can be made into a Flowchart that is then customized? (Fungus is the content authority after import)
  2. Do we want a runtime translation layer, where a twine file is made into a Flowchart during scene initialization or the like and changes are discarded from the Flowchart? (Twine is the content authority)
  3. The intense option: do we want a bi-directional translation layer, where a Twine file can be imported into a flowchart, but the flowchart can then be exported to a Twine file? (A lawless land where there is no authority and everyone is king)

Also, do people see a value in being able to bind macros for example to Command scripts? Things like that. Thanks in advance!

chrisgregan commented 7 years ago

Hi Conrad. Pretty sure there'd be a lot of interest in this feature if you could get it going. One issue is that the Unity UI text doesn't support hyperlinks in the text. This could be solved now by using Text Mesh Pro which does support hyperlinks, though the Writer class would probably need a bit of a redesign to work properly with all the special tags that Text Mesh Pro supports.

If you want more feedback I'd suggest posting about this again on the Fungus forums as that gets a lot more traffic than github.

Regarding the integration, maybe you don't need to generate Flowcharts at all? You could have a 'Yarn' command that can load and run a Yarn file using the Say Dialog and Menu Dialogs directly - something along the lines of how the Conversation command works. Macros could then be used to control stuff like selecting characters and setting the various dialog options. There could also be Event Handlers to allow flowchart's to handle events raised by the Yarn script.

catherineomega commented 7 years ago

Hey Conrad, I'd personally be very interested in Twine/Yarn-to-Flowchart integration, particularly if the import tool could be used to map tags to something.