GithubHelp home page GithubHelp logo

happy-ferret / yaml-adventure Goto Github PK

View Code? Open in Web Editor NEW

This project forked from madelyneriksen/yaml-adventure

0.0 1.0 0.0 117 KB

Create choose your own adventure games and play them in the browser!

License: MIT License

JavaScript 76.01% HTML 3.34% CSS 20.65%

yaml-adventure's Introduction

YAML Adventures

Create interactive text adventures from YAML files, share them, and play them in your browser!

YAML Adventures is a small, quick, and fun project using React. Tests are run with Jest and powered by Enzyme. Bundling of the app is done by Parcel.

Create Your Adventure

Adventures are YAML files with a specific structure:

# your_adventure.yaml

# Games have different "locations" the player can enter.
#
# Each game needs a "start" location

start:
  # Each location needs a "text" attribute.
  # This is the message shown in the message box!
  text: |
    Hello world! Welcome to my awesome adventure game. Drama! Romance! Exploration! It's all possible.
  
  # Options are rendered as buttons that represent actions
  # The player can click each option to "move" to a new location.
  #
  # "text" is the text rendered on the button
  # "location" is the location the player is moved to (ex. start)
  options:
    - text: This is all pretty cool
      location: step_two
    - text: Can you repeat that?
      location: start

step_two:
  text: |
    That's the end of our short game!
  # If you don't want to show any options, set options to "[]"
  options: []

That's all there is to an adventure file! Get creating! โœจ๐ŸŒˆ

Develop

You will need npm installed, and maybe some experience with React. Just clone the repository, npm install, and start hacking!

Tests are run with Jest and use Enzyme. You can run the tests with the following command:

npm run test

The development server is provided by Parcel. View your changes at localhost:8000 after running:

npm start

License

MIT Licensed!

yaml-adventure's People

Contributors

madelyneriksen 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.