cornquest/README

41 lines
1.3 KiB
Plaintext
Raw Permalink Normal View History

2022-10-10 17:19:24 +00:00
CORNQUEST
2023-10-23 15:34:57 +00:00
> a revelation
2022-10-10 17:19:24 +00:00
## about
this is a choose your own adventure game
![example](doc/example.png)
2023-10-23 15:34:57 +00:00
i am writing it with the goal of submitting it to volume ~~6~~ 7 of the tilde.town zine
2022-10-10 17:19:24 +00:00
## requirements
2023-10-23 15:34:57 +00:00
- recutils v1.9: database, querying, and templates
2022-10-10 17:19:24 +00:00
- mustache v4.2.0: more different templating
- just v1.4.0: command runner
2023-10-23 15:34:57 +00:00
- graphviz v5.0.1: to make a graph!
2022-10-10 17:19:24 +00:00
## getting started
2023-10-23 15:34:57 +00:00
the whole game is in a recfile.
see: `db/game.rec`.
2022-10-10 17:19:24 +00:00
each record has an `id`.
each record has a `text` field that is the narrative text of the section, including branching choices.
branches should refernece the `name` of another field in {{mustachequotes}}.
2023-10-23 15:34:57 +00:00
to build the output, we will build a `data` object mapping all names to ids (with recsel and sed; see the just/makefile for details).
next, mustache will use that data object to replace the {{template strings}} in the recfile with id numbers.
finally the expanded recfile will be piped through recfmt, which will dump the text of the game.
2022-10-10 17:19:24 +00:00
2023-10-23 15:34:57 +00:00
you can also create a graph of the story nodes with `just graph` if you have graphviz installed.
this is handy for visualing your story paths, studying the shape of your story, and seeing if you have any islands or orphan nodes.
it does pretty much the same thing as `just build`, except it outputs a DOT file, and then creates `graph.png`.