0.1.1 • Published 4 years ago

ohtge v0.1.1

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

One Hour Text Game Engine

A very basic wrapper for xterm.js to make small console games using a BASIC-inspired API. Docs available here.

Example game.js file

title("test.exe")
loop()

async function loop() {
    while (1) {
        write("Hello world")
        color("yellow")
        const a = await input("Say something?") // `input(string, callback)` syntax also supported
        color("white")
        write("You said " + a)
        write()
        await pause()
    }
}

npm.io

Setup

  1. Download the zip
  2. Only keep the files you want (typically dist/ + one of the examples)
  3. Make a game!

Made with ohtge