npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

oasys-converter

v1.0.0

Published

Convert OASYS text adventure game binary into JavaScript

Downloads

3

Readme

This program is used to compile a OASYS text-adventure game binary into
JavaScript. It will work regardless of OAC or OAA, 16-bits or 32-bits, big
endian or small endian.

The program index.js takes one optional argument, which is a prefix for
the output; for example you may enter "module.exports=" as the prefix. The
OASYS binary is on stdin, and JavaScript code on stdout.

The output is a function that takes four arguments: Save, Load, Quit,
Exit. Load, Quit, and Exit are values that the generated program will
yield in the specified circumstances, while Save is a function that takes
a Int32Array; it will yield the result of that function.

Calling the output function with the arguments specified above will
restart the game and return an array of two functions. The first is a
generator function which must be called first. The second is the function
to process input (call it with a string as its argument), and also returns
a generator or iterator, which should be processed in the same way by the
front-end.

You can call the next() method of the generators in order to achieve the
I/O data. If done is true, then it is finished and you should request
input from the user. Otherwise it will be either a string, which should be
output and then continue the generator (possibly after pausing if needed),
or it will be Load, Quit, Exit, or a return value from Save.

If Save, then it should somehow save the contents of the Int32Array that
was given; this is up to the front-end implementation.

If Load, then it should next() a Int32Array containing the same data that
was saved; if the load fails, next(0).

If Quit, then it should quit, possibly at the option of the user. If the
user decides not to quit, then just continue with next(); otherwise quit
or possibly restart.

If Exit, then it should forcibly end the game, possibly restarting (you
may ask the user if he wants to play again). You should not continue with
next() on the same generator after Exit is received.