Giter Site home page Giter Site logo

ifplayer.js's Introduction

Description

ifplayer is a nodejs module to play interaction-fiction files.

It is currently alpha-state and pretty much in flux, and are my first steps at understanding the z-machine.

Dependencies

  • To read the interactive-fiction files, it uses ifvms.js
  • We borrowed the etude as a text file for now

Inspiration code

Take a look at : (thx to @curiousdannii)

It's designed to be used with Web Workers (though it isn't yet...), so everything happens with two functions: ZVM.inputEvent() and ZVM.outputEvent().

Installation

From this repo

$ npm install

From an official release (none yet)

$ npm install ifplayer

Usage

as console player

$ ./bin/ifplayer <your-story-file>

as a player object

ifplayer = new IfPlayer(filename);

ifplayer.on('output', function(message) {
  console.log(message);
})

ifplayer.on('quit', function() {
  console.log('done');
})

ifplayer.on('ready', function(message) {
  // ifplayer.send('north');
})

Bugs & Todos

  • currently the input is also written on the output : not sure if this by design or not

  • the flow of output is not caught when quitting

  • we need to separate the css code to a more abstract type so we can pass our own formatter

  • sending the inputEvent is still a mess , as I don't really understand the required params, currently resorting to keeping the last read event

  • obviously support mode code types

  • make it read gluxl files and other format

  • maybe use Inform i7 compiler for on the fly compilation

ifplayer.js's People

Contributors

jedi4ever avatar

Watchers

James Cloos avatar Kartik Chandra 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.