I would like to introduce to you DEFORK - an example of how a json data exported from Twine - a tool for creating conversations, can be used to easily create interactive stories in Defold - with DEFORK!
I was looking for a tool to easily create conversations for my Pixel Art: Witchcrafter and started to play with Inklewriter, but unfortunately they shut down the project in August 2018. However I was suprised how such conveniences are needed in developing a narrative driven game. So after all, now Iām using Twine to create dialog json data in this tool.
Defork utilizes an awesome library - RichText by @britzl to conveniently and easily show loaded data and create interactive dialogs with handled input.
With Twine and Twinson format you can export data and create a json file in a project folder, which you can attach to custom resources in game.project. In Twine remember to Change Story Format to Twinson, so after clicking Play you will get json data.
With a tool like this you will be able to separate story and dialog creation from other game development activities. Defork and an example Defold project with an example json data compatible with current Defork module is available here:
I hope it involves you to create fantastic, nonlinear, interactive stories!
Happy Deforking!
P.S.
I canāt add any asset on the asset page. After clicking āadd assetā, projects available to attach arenāt showing and itās loading all the time. Can anyone help me? It would be nice to attach Defork module via Dependency Library from game.project and add html5 example
Damn, sorry to hear this. Just to clarify ā is the problem youāre having related to the image below; that you donāt have any content in your drop-down list? If soādo you have any projects in your Dashboard? You currently need to base your community page on an existing project created from the Defold Dashboard.
At last, I logged out and logged in again to my defold account on the page and they are loaded now I will now describe it and add to the asset page. I have a question about storage - can I attach link to GitLab or is the page supporting Github only as it seems? And then, how can I make Defork lua module a dependency library that can be added in game.project easily?
I would like to thank @Axel for a support, Iāve managed to add my first asset on the page. Sorry to be an unusual user, but hopes it helps to improve website. Now everything works fine on the page and the project is on GitHub. Iāve also created a whole API with detailed descriptions, so everything should be now clarified You can also check HTML5 playable demo on the page!
No worries at all, just glad to be able to help. And thank you for the reportsāit helped us find an unknown bug which we will ship a fix to next week
Thatās cool. Iād note that Inkle Studioās current tool is Ink which also exports JSON and is designed as middleware (they usually work with Unity) so if you ever need to go beyond the limitations of Twinson you could try looking into Ink.
Yes, I saw Ink also, but I had some problems decrypting the json file, so I gave up and tried with Twinson then, especially because it was open-source and available too. As Defork was only meant to show an example of using such tools, adding other format of json files would be a great addition to this, though! Ink has many advantages, as well as other conversations making tools. Worth taking into consideration are Chat-mapper, Talker Maker:Deluxe, Chronicler and my favorite - articy:draft - as I saw in a trailer it is used by my motherlandās studio CD Projekt RED in upcoming Cyberpunk 2077!
I am checking out Arcweave (arcweave.com) now and it has pretty useful tools for creating non-linear dialogues(/interactive stories) and also an option to export to json - I will try to adapt Defork to parse those files and use in my dialogs - if it will work, I will publish such parser in the Defork repo
It is free for unlimited projects with up to 100 elements and 2 editors, which should be enough for indie, higher options are paid monthly.
Hello! Sorry for bringing this thread back from the death but I havenāt found a newer one about DEFORK.
Iām new to Defold (migrating from Unity) and Iām searching for a branching narrative solution.
Currently Iām between Twine and Ink.
Twineās visual editor seems more suited for my purposes and Iām glad you made DEFORK to import Twine jsons, but Iām wondering if variables and conditionals are supported by your framework, because I will really need them.
Thanks!
Thanks, I have also taken a look at them, but since I find the Twine visual editor better suited for my project, Iām prioritazing Twine for the moment. If DEFORK doesnāt support variables and conditionals, I would have to either implement them myself or switch to Ink and use Narrator.
Defork was not being updated, because I am not using Twine anymore and variables and conditions were introduced later on.
Iām using ArcWeave right now and my DefArc module is pretty much up to date (at least working will all my dialogues) and supports conditions, variables etc.
If anybody has a time and strength to add support for Twineās new features and revise Defork branch - its fully open source and I would gladly accept PRs or welcome a (nomen omen) fork branch - it would be great to have it in our community
The thing about ArcWeave is that I donāt want to support subscription services.
I know there is a free version of ArcWeave, but I really donāt want to enter an ecosystem based on subscriptions ever again. (I come from Unity and I got burned for life on this)
Iām still evaluating all the options, but if I end up using Twine, Iāll probably make a fork of DEFORK adding variables and conditionals support.
Iāll let you know if thatās the case.
I tried Twine and I didnāt like it, INK is much better to me. Let me explain
Yes, Twineās UI looks cool and if you have a small game with minimum logic in twine script it works well. But, imagine few hundreds of blocks and your layout turns to hell as well as Twineās performance.
And mixing script with text very quickly becomes a mess, no variable validation only makes it worse. I had that experience porting about 500k words from Twine to ink.
Ink has a nice editor too, but without graph. You can split your code in multiple files easy to work, it has validation and code is not such mess (however itās better to avoid excessive coding). And with Narrator or defold-ink itās easy to make your ink script play in Defold.
Yes, I read that Twineās visual view could be a nightmare on anything more than simple projects, but I find Inkās lack of it even worse: from my point of view, on Twine I can spread the game on two axis, X and Y, and have a quick overview zooming out. While on Ink, I can only spread the game vertically, ending like a wall of text.
I didnāt think about dividing an Ink game into multiple files though, and that way organization could be good: after all, thatās what we do when programming.
What is your personal experience with Ink?
And also, have you dealt with translating an Ink game?
I tried to use Twine for quick prototyping, but very quickly abandoned this idea - really hard to read all this text\code mess. Ink was like a breath of fresh air - fast prototyping, ability to reuse prototype in actual Defold game. You can keep all logic and dialogs in ink and use Defold just for rendering and UI, manipulating scene from ink script (e.g. by sending commands via tags).
Drawbacks - ink is still evolving, json compiled with newer version of inky might not work as you expect, itās possible old code wonāt even compile - itās the issue with Inky & defold-ink (works with json, format changes from version to version). Narrator uses its own parser and doesnāt have this problem, but can have issues supporting new features (itās not so easy to add new parsing rules and its codebase is much bigger).
Localization can be easy or hard - it depends on your game. If you have a lot of text modified inside paragraph by some logic - I have a bad news
Anyway itās not that much different from localising any other game - lua table with [āoriginal text stringā] = [[translated text string]] does the job. Plus some stuff like setting the correct font for each language.
Totally support the words of @Ivan_Lytkin. I just canāt imagine how to physically represent dynamic capabilities of Ink in the readable node graphs. Splitting into files is an required approach if the game is more than 5 minutes long.
But that doesnāt take away from Twineās advantages, for example, if the structure is simple and straightforward, which is often the case.
Iād like to add about localization that ChatGPT is capable of translating Ink script with preserving the original syntax. It translated a small 40kb file without a single Ink syntax breaking error.
After trying Twine for a while and reading your posts, I think youāre right and Iāll go with Ink instead.
Iāll avoid Inkās exotic capabilities and keep it simple to make translations easy.
The ChatGPT direct translation is SUPER interesting! Thanks a lot! (although I wonder if it will also translate variables and knot names, which would be problematic and render save files incompatible between languages)
Now, if anyone knows about an actually good text-to-speech AI service or software, that would be perfect!
Thatās the surprise that it translated only the literature text for me, all the variables remained the same, all the syntax was in the original. Just ācopied and pastedā: