Code Monkey home page Code Monkey logo

jailbird's Introduction

Jailbird

A way to let your twine stories take flight.

Twine's normal flow for turning Twine/Twee stories into some-kind-of-game means dumping a bunch of tagged wrapped data somewhere in a string. This makes a whole mess of assumptions, including that your game will be html/js/css and not Unity, Godot or something even more exciting! Also this makes life very difficult for "engines" since they're now having to act as interpreters and manhandle data in realtime instead of being able to act as transformers on stories ahead of time.

Jailbird is made up of, and includes:

  • A formal JSON schema for stories. This format includes a JSON Schema document, human descriptions and is covered under a wide open license. You're welcome to write your own converters, parsers, engines, fan art or whatever against the format.

  • A Twine/Twee "format" for Twine/Twee/TweeGo which turns Twine stories into a mostly valid xml document for conversion into JSON.

  • A converter that can convert most compiled stories into JSON. We supply the converter as a node library, a compiled executable, and a docker image. The converter is also heavily annotated so if you'd like to make your own version in Golang or Haskell, please do.

  • An example parser in Javascript for how to make sense and safely parse the JSON structure. This is meant for you to take and extend in your own engines/compilers, and it's licensed openly so you can re-license it as you see fit. That being said it is a functional and full featured parser so you can just steal it as is if you'd like.

We intentionally only support the latest format. If you need to convert between other compiled versions or earlier versions please use TweeGo. We test against TweeGo specifically and package it into our docker images for it's portable nature.

Setup

Jailbird has two parts: a Twine format and an executable. To get the executable, you can use npm install -g jailbird.

To install the twine format for Tweego, you'll need to download the /format folder and install it into your tweego story-formats directory.

To install the twine format for Twine itself, you can just drop in a link to the JSON file.

Our docker image can be used so: cat my-twee.twee | docker run -i --rm vorpalhex/jailbird:latest > my-twee.json.

Community

Wrote a compatible engine or your own converter? Pulled our tools into other languages? Please open a PR or an issue and add your project! The more people who contribute, the better Jailbird can become.

Contributing

If you'd like to just add a tool you wrote that lives somewhere else, please checkout the Community section.

If you'd like to fix a bug, add a feature, more examples or clean up our specs, please open a PR. This repo contains several subprojects that are versioned together, and thus working on one piece means you may need to work on others. Each subproject contains a makefile with most of the common tasks, such as make run, make build and make test.

License

Covered under the MIT license. Please refer to LICENSE in this repo for license text.

jailbird's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.