Code Monkey home page Code Monkey logo

alexa-adventure-game-ts-twine-starter's Introduction

Alexa Interactive Voice Game Skill starter project using AWS Lambda, Typescript, and Twine (with Twison)

This is an Alexa starter project for a basic Interactive Voice Game skill. The skill is designed to work with a text adventure game created Twine 2 platform, using the Twison format.

If this is your first time working with this type of skill I recommend you read the guide on the alexa-skill-sample-nodejs-adventure-game.

##About

Note: The rest of this readme assumes you have your developer environment ready to go and that you have some familiarity with CLI (Command Line Interface) Tools, AWS, and the ASK Developer Portal.

This starter project provides a TypeScript version of the skill-sample-nodejs-adventure-game lambda code available from the Alexa project. The code has also been modified to support the Twison story format for Twine 2, which simply exports the story to JSON. This simplifies the game parsing and, IMHO, makes it easier to understand (and this removes the dependency to an XML parser). Typescript compiling is handled with webpack. Finally, a modified version of the per deploy hooks is provided so development packages are not deployed when using the ask cli.

Build commands

3 build scripts are provided:

  • clean: removes the build directory
  • deploy: deploy the skill to aws
  • build: Compile to the build,

The rest combine these or provide alternative ask delpoy actions.

Available intents

The code supports the intents listed in the models/en-GB.json model. If you want to add a new intent you need to add it to the model file and create a new RequestHandler in the game-intent.ts code and then import it in the index.ts. Also remember to add your new slots (either for existing or new intents) to your model file. The deploy script will publish both the model and the compiled lambda. If you only want to deploy the lambda use the deploy-lambda script.

Local testing

I recommend using the Alexa Skill Test library for local testing. After building with webacpk, navigate to your build folder in your bash/cmd and execute:

D:\Users\Alexa\Skills\ineractive-game\build
λ   npx alexa-skill-test

This will launch an http server (port 3000 by default) that lets you test your intents.

You can also use the ask cli:

D:\Users\Alexa\Skills\ineractive-game
λ   ask dialog

Note For testing with the ask cli you need to have previously deployed your skill.

alexa-adventure-game-ts-twine-starter's People

Contributors

arcanefoam avatar

Watchers

 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.