Skip to content

Latest commit

 

History

History
55 lines (40 loc) · 1000 Bytes

README.md

File metadata and controls

55 lines (40 loc) · 1000 Bytes

Dragonfly

Interactive Fiction Game Engine in Javascript

Game sample

You can find some examples in the samples directory available in English.

Setting up the project

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".

Basic "index.html":

<!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>

File "mygame.js":

import { Book } from "../base/book.js"

window.onload = function() {
	const book = new Book("game-area");

	book.run();
}

Tutorial:

Español