Zark is a text-based adventure game that is entirely auto-generated by a draw.io diagram. Using this codebase, you, too, could create your own text-based game. Just create a draw.io diagram and you're basically done.
- Install (see next section).
- In a draw.io file, go to File > Export as... > XML.
- Replace public/assets/ZARK.drawio.xml with your XML file. Alternatively, you can just put it in that folder, and change the
FILE_PATH
in src/zark.ts. - Run
bun start
. You can now view your game by going tolocalhost:8080
in your browser!
You can edit the HTML, CSS, and other assets in the assets
folder as needed, and your changes will live-update.
We leave the details of how exactly to make the right draw.io diagram as an exercise for the reader. (Maybe just look at the existing example.)
Download this repo and open the folder in your terminal.
git clone https://github.com/laura-a-n-n/zark.git
cd zark
Then install Bun. (You can just use NPM too if you already have that.)
curl -fsSL https://bun.sh/install | bash
To install dependencies:
bun install
Alternatively, npm install
works for NPM.
This project was created using bun init
in bun v1.0.22. Bun is a fast all-in-one JavaScript runtime.