Interactive Fiction Game Engine in Javascript
You can find some examples in the samples
directory available in English.
Clone the git repository with submodules:
git clone --recurse-submodules https://github.com/jason80/dragonfly/
Create and navigate mygame dir:
mkdir dragonfly/mygame
cd dragonfly/mygame
Create the files "index.html" and "mygame.js".
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My Game</title>
</head>
<body>
<div id="game-area"></div>
<script type="module" src="mygame.js"></script>
</body>
</html>
import { Book } from "../base/book.js"
window.onload = function() {
const book = new Book("game-area");
book.run();
}