|
11 months ago | |
---|---|---|
detail.vim | 1 year ago | |
src | 1 year ago | |
.gitignore | 1 year ago | |
Cargo.lock | 1 year ago | |
Cargo.toml | 1 year ago | |
LICENSE | 1 year ago | |
README.md | 11 months ago |
README.md
details
this is a tiny twine-like gamemaking tool using the html details tag.
how to use
to use this tool, you'll need rustc and cargo, which you can download at the rustlang website. clone this repo, navigate to it, and run
cargo run path/to/detail/file
to generate an html file.
(sorry you have to download a whole programming language to compile ~200 lines of code. tk: web tool to facilitate this?)
markup
~title write the title of your game
: this will show up as the page title.
~detail start
: this is where your game will start. required.
~detail name of a detail
: starts a new detail passage. name can't include the characters |
or ~
.
|name of a detail|
: inserts the text wrapped in |
as the summary of a <details>
tag, and the contents of the ~detail
passage of the same name as its contents.
|display text~name of a detail|
: the same as above, except the text before the ~
will be displayed as the summary instead of the passage name. display text can't contain the character |
(but ~
is okay)
you can use markdown in passage text---whatever's supported by this markdown crate. this is meant to be a simple way of marking up passages. raw html is supported.
example
a detail file with the following text:
~title cat story
~detail start
the |cat| sat on the mat
~detail cat
the cat was very |pretty~pet| and has green eyes
~detail pet
you pet the cat! it _purred_ pleasantly
will output this:
the
cat
the cat was very
pretty
you pet the cat! it purred pleasantly
and has green eyes
sat on the mat
vim colorscheme
you can manually install the colorscheme by downloading this repo and moving detail.vim
to where your plugins are installed. if you use a plugin manager and it needs you to add a manually installed plugin to your config so that it doesn't get arbitrarily deleted, you should do that.
(you do not have to use vim to edit details
files. in fact, i would recommend that you not do that if you've never coded before; it's merely where i prefer to write so i'm providing tooling for it. something like textedit or notepad might serve you better.)
inspirations/influences
also, check out ravel by everest pipkin!