Giter Club home page Giter Club logo

glulx-typescript's Introduction

Glulx VM in TypeScript with Channel IO (work in progess)

Glulx is a specification for a 32-bit virtual machine that runs Inform 6 and Inform 7 story files.

This project is an attempt to implement Glulx in TypeScript.

It is based heavily on the FyreVM (a C# implementation). In particular, it also makes use of the contextual Channel IO layer introduced in FyreVM.

Playing a game image

If you have a Glulx game image (a .ulx file), you can try if it works... this is all still very much under construction, games that target FyreVM work best, Inform6-compiled Glulx games seem to work okay, Inform7 not so much.

in your terminal

You can compile a simple Node.js and readline based command line tool.

$ cd examples/node
$ tsc
$ node runGameImage.js yourGameImageFile.ulx

Note that no command line arguments are required for tsc. All compiler configuration is contained in tsconfig.json. If you are actively editing the files, you may want to add a -w ("watch") flag to the command, though, to have it recompile when the files are updated.

in your browser (simple)

There is a simple HTML page that can load and run a game image. You need to load it through a web server (even though all files are local, no Internet connection required). The easiest way to do that is to npm install -g http-server and use that to serve the page:

$ cd examples/web
$ tsc
$ http-server
$ open http://127.0.0.1:8080/webworker.html

Select a game image (ULX file) from your local file system to press START.

in your browser (using Angular2)

We also have some example code that shows how to integrate the game engine in an Angular2 application.

Running unit tests

There are some unit tests for core engine functionality that you can run on Node.js or in a browser.

using nodeunit

You need Node.js and nodeunit installed (as well as a TypeScript 1.8 compiler).

Then you can compile everything in this project and run the test suite:

$ cd test/node
$ tsc  
$ nodeunit tests.js 

in the browser

You can also run the same unit tests in your browser instead of on Node.js:

$ cd test/web
$ tsc
$ open test.html

glulx-typescript's People

Contributors

thiloplanz avatar feross avatar beatgammit avatar dominictarr avatar jessetane avatar greggman avatar banksean avatar guybedford avatar fanatid avatar schnittstabil avatar

Watchers

James Cloos 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.