main
Dozens B. McCuzzins 2022-10-10 11:19:24 -06:00
commit ef862dd660
10 changed files with 313 additions and 0 deletions

37
README 100644
View File

@ -0,0 +1,37 @@
CORNQUEST
or, I Killed The Runaway Botanys
a cautinary tale
## about
this is a choose your own adventure game
![example](doc/example.png)
i am writing it with the goal of submitting it to volume 6 of the tilde.town zine
## requirements
- recutils v1.9: data and querying and templates
- mustache v4.2.0: more different templating
- just v1.4.0: command runner
- graphviz version 5.0.1: to make a graph
## getting started
the whole game is in a recfile
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}}.
to build the output, we will build a `data` object mapping all names to ids (with recsel and sed; see the justfile 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.
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`.

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 MiB

BIN
assets/cornbit.png 100644

Binary file not shown.

After

Width:  |  Height:  |  Size: 494 KiB

1
data 100644
View File

@ -0,0 +1 @@
{ "beginning": "1", "cornoveralls": "2", "corndress": "3", "games": "4", "tag": "5", "lavamonster": "7", "hideandseek": "8", "charm": "11", "altarcorn": "12", "altar": "13", "eavesdrop": "14", "weird": "15", "helpme": "20", "bunk": "21", "believeme": "22", "collide": "23" }

BIN
doc/example.png 100644

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

128
doc/notes 100644
View File

@ -0,0 +1,128 @@
# cornquest
okay new plan bitches
this is a meta narrative about patriarchy and phallic desire, symbolized by corn, and feminism (the earth) wherein the reader has to play the metagame in order to break out of the cycle of conquest and violence.
you know what, if you represent each even number choice (male) as zero and each odd number choice (female) as one, then after your first six choices, you'll have a hexgram of the i-ching. It would perhaps be very satisfying to have the decision tree cap out at twelve. both for the obvious reason, and also so that at the end of the game, you have two hexgrams. the game can end with some kind reading based on that.
# outline
the rage of the cornbeast
how is this going to work..
i want it to be some kind of a horror story
about the fertile earth bucking off its masters
something something the cornbeast approaches
must go through the dark woods to the top of mount char to appease the earth
end up in *inner space*
you must rid the earth of her children
YOU are the cornbeast
go destroy your village
# analog
can we make this about peter pan?
peter pan is not a happy story
pan captures souls of dead and forgotten children and takes them away to neverland
if they grow up, he banishes them and they become pirates i guess?
hook is kind of his enemy but not really
time, growing up, the crocodile is his real enemy
and we turn this all into a fairy tale childrens story
and so
man did not invent corn
corn invented agriculture to capture and enslave man
and if man over farms and creates barren fields and dust bowls, corn banishes man and they die i guess?
the dire crow is your obvious enemy
but it's not really your enemy
agriculture, through mankind, is destroying the earth mother
she sends the cornbeast to destroy agriculture..
# characters
- "you" -- farmer, scared of cornbeast
- cornbeast -- scarecrow, enemy
- dire crow -- eat the corn, scared of cornbeast
- earth mother -- maketh the corn
# elements
- dire crow, feathers, beaks
- corn husk dolls
- ears full of eyes
- maze
## 1. "You." - ESTABLISH A PROTAGONIST
- you wake up the morning before the big harvest
- comfort zone, arms of the mother
## 2. "Need" - SOMETHING AIN'T QUITE RIGHT
- uh oh, the earth mother has rejected your offering of corn!
- pull of the father, desire
## 3. "Go" - CROSSING THE THRESHOLD
- threshold to the unknown
- dire crow attack!
- you must appease the corn mother and ask her blessing lest the Dire Crow descend and devour you!
## 4. "Search" - THE ROAD OF TRIALS
- get digested, transformed, training montage
- crss the dark wood
- climb mount ashpeak
- descend into crater
## 5. "Find" - MEETING WITH THE GODDESS
- new mommy
- discovery
## 6. "Take" - MEET YOUR MAKER
- a 2nd pull, parallel to 2, asskicking?, transcendence
- become the hammer of mother earth, the cornbeast!
## 7. "Return" - BRINGING IT HOME
- trials
## 8. "Change" - MASTER OF BOTH WORLDS
- boom

16
dot 100644
View File

@ -0,0 +1,16 @@
digraph {
1 -> { {{cornoveralls}} {{corndress}} };
2 -> { {{charm}} };
3 -> { {{charm}} };
4 -> { {{tag}} {{hideandseek}} {{lavamonster}} };
5 -> { {{altar}} };
7 -> { {{games}} };
8 -> { {{altar}} };
11 -> { {{games}} {{altar}} };
13 -> { {{altarcorn}} {{eavesdrop}} };
15 -> { {{helpme}} };
20 -> { {{believeme}} {{bunk}} };
21 -> { {{collide}} };
22 -> { {{collide}} };
23 -> { {{beginning}} };
}

80
game.rec 100644
View File

@ -0,0 +1,80 @@
%rec: game
%doc: a choose your own adventure
%key: id
%type: id int
%type: name line
%type: text line
%auto: id
id: 1
name: beginning
text: You wake up in the comfort of your own bed, in your own room. You open your eyes to see the golden sunlight come streaming in through your window. Golden like ears of corn. You suddenly remember what day it is. It is the day of the Harvest Festival! You throw back your favorite corn print bed covers and leap out of bed. You already know what you're going to wear. If you wear a corn dress, goto {{cornoveralls}}. If you wear corn bib overalls, goto to {{corndress}}
id: 2
name: cornoveralls
text: You pull on your overalls. They have a really nice looking corn pattern on them, and the bib pocket in the front is perfect for holding all kinds of things. Speaking of which... Goto {{charm}}
id: 3
name: corndress
text: You slip on a lovely corn pattern dress. Yes, you look awesome. It twirls when you spin around. And it has pockets! Which reminds you... Goto {{charm}}.
id: 4
name: games
text: You decide to join the other little corn whelps in a game. A bunch of your friends are here, including Three Fingered Gerald, Eccentric Kevn, Dale, and Standard Ed. If you choose to play tag, goto {{tag}}. If you play hide-and-seek, goto {{hideandseek}}. If you play Lava Monster, goto {{lavamonster}}.
id: 5
name: tag
text: You have a fantastic time playing tag. Three Fingered Gerald plays a little too rough, tagging the other kids too hard and sometimes knocking them over. But you're so fast. Three Fingered Gerald can never catch you. You all have a great time, and then you decide to scurry along. Goto {{altar}}
id: 7
name: lavamonster
text: No. You should never play Lava Monster. Go back to {{games}}.
id: 8
name: hideandseek
text: You play hide and seek. You are so good at hiding that the other kids never find you. You eventually get tired and fall asleep, but not for too long: your snoring wakes you up. You decide to leave and seek out other Harvest Festival festivities. Goto {{altar}}
id: 11
name: charm
text: You grab your lucky corn charm from under your pillow. It is a small pointy rock in the shape of a corn cob that you found one time in the woods. There are even little pock marks all over the rock so that it looks like it has corn kernels! Very lucky indeed. You slip it into your pocket. There, now you're are ready for anything.
+ You run to the kitchen and have a quick breakfast of corn grits and cornbread. But you don't dally or dawdle. It's the Harvest Festival! You run outside. There are a bunch of kids playing games out in the corn field. They call your name, and you're tempted to join them. But you also want to go see the goings on down at the corn altar! The altar can wait, time to play. Goto {{games}}. Games are for stupid babies! Time to visit the altar! Goto {{altar}}.
id: 12
name: altarcorn
text: omg it's just lying there!
id: 13
name: altar
text: You head over to the Corn Altar. Every year during the harvest, you set aside a portion of the harvest for the Corn Mother. And then on the morning of the Harvest Festival, everybody wakes up and the offering has been taken, and there are lots of presents and feasting and dancing! It's the best!
+ You run through the streets, and the closer you get to the commons, the more you get the feeling something is wrong. The decorations are all out. (The villagers spent all week putting them up!) But nobody is singing or hollering or laughing. Or even talking, really.
+ You run through the commons, and up the hill to the Corn Altar, and then gasp out loud and skid to a stop before it.
+ The offering, the pile of ears of corn, is still lying on the altar where it was placed last night! People are milling about in groups of 3 or 5, whispering and casting quick, fearful glances at the spurned corn.
+ Go checkout the corn at the altar: Goto {{altarcorn}}
+ Listen in on some of the adults: Goto {{eavesdrop}}
id: 14
name: eavesdrop
text: psst psst pssst psst
id: 15
name: weird
text: Listen I don't know how you got here but if you're reading this, you need to abandon your current story line immediately and go straight to {{helpme}}
id: 20
name: helpme
text: Okay thank goodness you're here. Listen, I know this is going to sound crazy, but please hear me out. You are trapped inside a Choose Your Own Adventure story. These choices you think you're making? They're not real choices. Being given an artificially restricted set of options to choose from isn't free will. It's coersion. Here, I'll prove it. If you believe me, goto {{believeme}}. If you think this sounds like paranoid bunk, then goto {{bunk}}
id: 21
name: bunk
text: Do you feel empowered and free? Like you made a meaningful choice? Go back and try the alternate path and see what happens. Then come back and go to {{collide}} when you're ready.
id: 22
name: believeme
text: You're smart to believe me. You must have already felt it deep down. Like your free choice was an illusion, like your your decisions are all leading you down a predetermined path. Well you're right. And you can see it for youself: go back and try the alternate path and see what happens. Afterward, come back and go to {{collide}}.
id: 23
name: collide
text: So what are we going to do about it, you ask? We're going to break free of the narrative is what we're going to do. Here's the plan.
+ Have you ever heard of an "ahnentafel"? It's a compact genealogical numbering system that ... you know what, forget it. Not important. Here's the part that's relevant to you: even numbers are male relatives of the subject of the ahnentafel. Odd numbers are females.
+ What does any of this have to with anything? It's your escape hatch. Whenever you are given a choice of optins, always choose an odd number. That's it. That's the plan. Now let's get you out of here. Goto {{beginning}}.

BIN
graph.png 100644

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

51
justfile 100644
View File

@ -0,0 +1,51 @@
# show all commands
default:
just --list --unsorted
# super plain boring output
_map:
recsel game.rec | recfmt '"{{{{name}}": "{{{{id}}", '
# build dot file
# TODO: change id to name? or id /and/ name?
_dot:
#!/usr/bin/env zsh
echo "digraph {" > dot
recsel game.rec \
| recfmt '{{{{id}} -> {{{{text}}|' \
| sed -e 's/|/\n\n/g' \
| sed -e '/./{H;$!d;}' -e 'x; s/\n//g; G;' \
| sed -e 's/}}[^{]*{{{{/}} {{{{/g' -e 's/> [^{]* {{{{/> {{{{/' \
| sed -e 's/}}[^{]*/}} /' \
| sed -e '/{{{{/!d' -e 's/\.$//' \
| sed -e 's/> \(.*\)$/> { \1 };/' \
>> dot
echo "}" >> dot
# build a graph of all the nodes
graph: _data _dot
mustache data dot | dot -Tpng > graph.png
# build data object
_data:
echo "{" $(just _map) "}" \
| sed -e 's/, }/ }/' \
> data
# plain output
build: _data
mustache data game.rec \
| recfmt '{{{{id}}: {{{{text}}|' \
| sed -e 's/|/\n\n/g' \
# read the story
browse:
just build | fmt | less
# remove generated files
clean:
rm -f dot data graph.png
# word count
words:
recsel -P text game.rec | wc -w