0.10.0 • Published 2 years ago

@origamitower/crochet v0.10.0

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

Crochet

NOTE: Crochet is in early stages of development, there will be a lot of breaking changes here as I figure out what kind of language fits the games I want to create, and how to generalise that.

Crochet is a small engine for building, mainly, story and AI-driven simulations, particularly turn-based and text-based ones. This means that Crochet would work great for building Interactive Fiction games with AI-controlled NPCs, as well as Rogue-like games with a large amount of procedurally-generated content.

The goal is to have Crochet eventually support building games that are less turn-based as well, such as The Sims-style games, but that's not currently feasible.

Documentation

There's not much documentation on Crochet currently (there will be more efforts towards this before the public release), but you can read:

Running

For now, you can install Crochet from npm:

$ npm install @origamitower/crochet

See crochet --help (or ./node_modules/.bin/crochet --help if you've installed it locally) for usage information.

REPL

There's a basic command-line based REPL currently which you can run with:

$ crochet repl <path/to/your/crochet.json>

You do need to specify a package currently because that's how Crochet tracks dependencies and capabilities. All code you type in the REPL will be executed in the context of the given package. And all dependencies of that package will be loaded first.

The REPL accepts both declarations and statements/expressions. Multi-line input currently works by allowing the reporting of a parser error to be delayed until an empty line is entered.

E.g.: if you type define hello = and press return, you'll get a "continuation input" (marked with ...), since that piece of text is not a complete define declaration. Typing the rest of it, e.g.: "hello"; will then allow the declaration to be executed. Entering an empty line by just pressing return will accept the partial declaration and present the parser error on the screen.

Building

Crochet is written in TypeScript, so you'll need Node installed. To build Crochet, run the following at the root of the repository:

$ npm install
$ npm run build

To make sure you've got Crochet built correctly, you can run any of the examples in examples/features:

$ node crochet.js run examples/features/search.crochet

Try also running some of the web games with:

$ node crochet.js run-web examples/web-games/cloak-of-darkness

Licence

Copyright (c) 2021 Q.
Licensed under the permissive MIT licence.

0.13.0

2 years ago

0.12.0

2 years ago

0.12.1

2 years ago

0.12.2

2 years ago

0.12.3

2 years ago

0.12.4

2 years ago

0.10.0

3 years ago

0.9.4

3 years ago

0.9.3

3 years ago

0.9.0

3 years ago

0.8.1

3 years ago

0.8.0

3 years ago

0.9.2

3 years ago

0.9.1

3 years ago

0.8.2

3 years ago

0.7.0

3 years ago

0.6.0

3 years ago

0.5.0

3 years ago

0.4.0

3 years ago

0.3.1

3 years ago

0.3.0

3 years ago

0.1.0

3 years ago