https://github.com/technix/atrament-web
Atrament engine for web browsers
https://github.com/technix/atrament-web
choice-based-game game-development ink interactive-fiction javascript
Last synced: 2 months ago
JSON representation
Atrament engine for web browsers
- Host: GitHub
- URL: https://github.com/technix/atrament-web
- Owner: technix
- Created: 2023-09-08T09:00:13.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-10-16T08:21:18.000Z (5 months ago)
- Last Synced: 2025-10-30T22:52:47.290Z (5 months ago)
- Topics: choice-based-game, game-development, ink, interactive-fiction, javascript
- Language: JavaScript
- Homepage:
- Size: 1.97 MB
- Stars: 7
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Atrament
`atrament-web` is a browser build of `atrament-core`, a framework for choice-based games, built around `inkjs`.
If you want to make customized Atrament build, check out [atrament-core](https://github.com/technix/atrament-core).
If you are looking for example of a web application based on Atrament, check out [atrament-web-ui](https://github.com/technix/atrament-web-ui).
## Installation
```npm install @atrament/web```
or
``````
## Usage
Initialization and game start:
```
import atrament from '@atrament/web';
atrament.init({
applicationID: 'your-application-id',
settings: {}
});
await atrament.game.init('/path/to', 'inkfile.ink.json');
await atrament.game.start();
atrament.game.continueStory();
```
State in components:
```
import { useStore } from '@nanostores/preact';
const gameState = useStore(atrament.store);
```
## API Documentation
See [Atrament core documentation](https://github.com/technix/atrament-core/blob/master/README.md).
## Components
- loader: fetch + fflate/jszip
- persistent: [localForage](https://github.com/localForage/localForage) / Neutralinojs storage
- state: [nanostores](https://github.com/nanostores/nanostores)
- sound: [howler.js](https://github.com/goldfire/howler.js)
- platform: web / Neutralinojs
## LICENSE
Atrament is distributed under MIT license.
Copyright (c) 2023 Serhii "techniX" Mozhaiskyi
Made with the support of the [Interactive Fiction Technology Foundation](https://iftechfoundation.org/)
