Howdy, Stranger!

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

How to implement Xinput / XBOX controller support?

So, Twine creates an HTML5 website, right? Therefore, we can use the Gamepad API:

Since I don't know how to code, all this seems gibberish to me, so... any general tips? I can try and learn how to use it, and if it's easy enough I'll try and make a tutorial or something.

For usage reference (and inspiration) check Depression Quest.


  • I know this is a bit late, but for anyone searching this topic and finding this thread (as I did today), here's a solution that I cobbled together for Dames Making Games's Gym Jam.

    In the attachment you'll find three files:
    - NavigationScript.txt: add this as a new script node to your Twine project.
    - NavigationStyle.txt: add this as a new stylesheet in your Twine project.
    (or replace it with a nicer-looking style. Current version is a big ugly red outline)
    - ReadMe.txt: recaps these instructions.

    This is experimental, and is not necessarily the best way to accomplish gamepad navigation in Twine, but it works as a proof of concept. It currently only allows activation of "internal-link" actions, not "revision-span" ones, although I think this can be accommodated without too much extra work.

    I hope that helps!
Sign In or Register to comment.