Zaytun Project
Zaytun Project is an ecosystem for text-based games: a programming language designed for writing them, two runtimes for playing them, and a growing set of complete games built with both.
Text-based games are made of words. You read a description of where you are, you type what you want to do, and the world answers. There is nothing to see and nothing to aim at, which makes them one of the few kinds of game a blind player can pick up and play on exactly the same terms as anyone else.
That is not a happy accident of the format. It is the reason this project exists, and accessibility is treated here as a founding idea rather than a feature added later. There is a page about why.
How it fits together
Writing and playing a game takes three steps, and each of the three programs involved is a separate project you can use on its own.
-
Write a game as one or more
.zaytunsource files. It is a language built for one job: rooms, items, characters, conversations, and the things that happen when a player does something. -
Compile it with
zaytunc, which checks every cross-reference in the game and produces a single.zaytunbbytecode file. -
Play that file with either runtime:
zaytunplayin a terminal, or the browser player, which runs online with nothing installed.
Neither player contains a compiler, and the two are independent implementations of the same runtime, held byte-for-byte identical by an automated check. The language page goes through all of this in detail.
Getting started
Three ways in, easiest first. You do not have to build anything unless you want to.
Play a game — nothing to install
Every game on the games page has a link that opens it in your browser and starts it. No download, no account and no compiler, and nothing is uploaded: the page fetches the game and runs it on your own machine.
Write a game — download the toolchain
The downloads page has ready-built copies of both programs for Linux, Windows and FreeBSD — 64-bit and 32-bit x86, 64-bit and 32-bit ARM. Unpack one and you have a compiler and a player:
zaytunc mygame.zaytun # writes mygame.zaytunb
zaytunplay mygame.zaytunb # plays it
Start from the language guide, which builds a first game up from an empty file. Every example in it compiles.
Once you have compiled something, you can play it in a browser as well as a terminal:
open the Zaytun Player and
load your own game, then pick your .zaytunb file. Your game stays on your
machine — the player has no compiler and uploads nothing, and once the page has loaded it
works with the network off. It is the same player the games on this site run in, so a game
of yours plays exactly as they do.
Build it yourself — a C compiler and nothing else
No dependencies to install, and no configure step. GNU make and BSD make both understand
the Makefiles, so on FreeBSD the system make works and you do not need
gmake.
git clone https://codeberg.org/zaytun-project/zaytunc
git clone https://codeberg.org/zaytun-project/zaytun-cli
make -C zaytunc && sudo make -C zaytunc install
make -C zaytun-cli && sudo make -C zaytun-cli install
git clone https://codeberg.org/zaytun-project/ragnarok
cd ragnarok
make
make play
Both toolchain repositories also have a make cross, which builds every binary
the machine you are on can produce: the Linux and Windows ones from a Linux machine, the
FreeBSD one from a FreeBSD machine. It skips what it cannot honestly build rather than
mislabelling it.
Every program, every game and this website are free software under the GNU General Public License, version 3. The source for all of it is at codeberg.org/zaytun-project.