Comments (14)
@LuRsT It'll be different. Even if we had the exact same idea, programming is fairly creative, and even the RNG we use would be able to bring fair differences.
If it's any help, I'm probably going to see how much I can get away with just by using a shell script. It has basically all the things I want, whilst being fairly fast to write.
from 2018.
Ha, nice! I too am aiming for readability. I'll certainly be keeping an eye on your progress :)
from 2018.
Mmm. Your idea seems the closest one can get to readable without fullblown Natural Language Processing the entire work.
I'm a bit lazy for that, so I'll be relying less on a corpus, but more trying my hand at sentence construction. Hopefully with enough conditionals the reader won't be able to tell they're just reading the same thing repeatedly.
from 2018.
I had a very similar idea, but simpler where I'd send adventurers down a single corridor fighting monsters, eventually dying and then another one would venture down. I might still do that, hopefully not too similar to yours π
from 2018.
4 days til I can start. Might looking forward to this. Entry repository.
from 2018.
Great idea! I'm thinking along similar lines.
You could run the simulation many times and then score the results based on some concept of a dramatic arc, selecting one that meets your search criteria.
from 2018.
I've started, I'll get around to uploading it eventually, but my local clock being futz'd because of the EU changes has kinda screwed with git's datetime stamps. Looking into fixing that now things are settling down.
But, here's an early sample, from an incomplete input:
Dungeon Crawl
Prologue
Grief has stricken the land. Horror sweeps over the night. Our princess has been stolen, and with her, her protection. No more magic to save us from the ghosts beyond the Demonwall. She was taken, by a great evil, and hidden away in a labyrinth beneath the ground. It was X'wa the Warrior who delved below, to save our hope.
X'wa the Warrior Fantastic Hope
A small stream runs down one wall of the cave.
Undaunted, the Warrior heads deeper.
X'wa the Warrior finds a Fantastic Hope
X'wa turns their gaze to the next narrow opening, that joins this cave, to the next.
Obviously, the low level fights, and the environment descriptors are the most pressing at the moment.
I'm being fairly linear - the hero/ine (going for a genderless hero, let the reader supply their own connection to the protagonist) will always reach the end of the story, but I've got about four states lined up for that, which each can take different descriptors... Me, being me means that only one of those four outcomes is actually 'happy'. Whoops.
Title descriptors for the chapters are craaaaaaaaaaaaaaaap, unfortunately. I'll need to rethink it. (I need something other than numbers, because of the way pandoc is generating chapter headings).
PDF output is the prettiest, as expected, but I'll upload a sample pdf, epub and html page when I get this thing closer to a finished state. It requires a lot of creative writing on my part, because of how I've structured things.
Each chapter is made of a series of descriptors, and chance encounters.
Building a full-sized novel (with incomplete descriptors) only takes about 15mins on my terrible (Celeron) laptop, which is surprisingly good.
Another quick sample:
A small stone catches the eye of Elptibud. It's a diamond. Knocked loose from some larger arrangement. The princess came this way.
Elptibud turns their gaze to the next narrow opening, that joins this cave, to the next.
from 2018.
Basic story structure:
- Randomised prologue intro, ending with a hero chasing a princess kidnapped by a monster into an underground structure.
- Protagonist moves through a series of caves:
- Random descriptors, including:
- Light
- Water
- Crystals
- Blood trail
- Chance of:
- Low level enemy
- Boss fight (mutually exclusive to low level fight)
- All fights are based around protagonist's random class
- Treasure/loot, descriptors based on protagonist's random class
- Something I'm not spoiling here
- Chance of:
- Trace of princess
- Trace of princess kidnapper (mutually exclusive to trace of princess)
- Random descriptors, including:
Then once enough words have been generated, we move into the climactic moment:
- Success is predetermined
- Based on success/failure:
- Random descriptors of fight where protagonist loses
- Random descriptors of fight where protagonist wins
- If protagonist wins, a secondary 50/50 chance happens (no spoilers):
- Protagonist dies
- Protagonist returns victorious
- If protagonist wins, a secondary 50/50 chance happens (no spoilers):
Then we send that final output off to pandoc, for our final formats (PDF, ePub, HTML).
It may be overly simple, but it's getting close to being something actually readable for three or four chapters. Of about 30-60 that get generated.
from 2018.
Ignoring the missing fight scene, and awful title, this is pretty good:
Kcohav the Warrior's Joyous Encounter
Some crystalline structures can be seen lining the walls.
Something growls in the dark.
Echoing, from some distance, a voice speaks: 'Kcohav, did you know? That you were doomed even before you began?'
Kcohav turns their gaze to the next narrow opening, that joins this cave, to the next.
Kcohav lay on the ground, coughing as they drowned in the blood pouring from their shattered frame. It was over. The battle was lost. The princess was gone. Evil would inherit the surface... What evil? Humanity would be expunged... Which meant there was no evil, not anymore. Just the rightful owner taking back what was already theirs. Humanity was the evil. Kcohav closed their eyes, for the last time.
from 2018.
Still getting issues occasionally:
pandoc: Cannot decode byte '\xc3': Data.Text.Internal.Encoding.Fusion.streamUtf8: Invalid UTF-8 stream
Something to do with the name generator, I think.
gen_name_diagram() {
# Grab a random twochar selection from the dictionary, and lowercase it.
val=$(cat /usr/share/dict/words | cut -c-2 | uniq | shuf -n1 | tr '[:upper:]' '[:lower:]')
# If we got something nonenglish, retry.
while [ "$val" = 'bq' ] || [ "$val" = 'bz' ] ||
[ "$val" = 'cf' ] || [ "$val" = 'cj' ] || [ "$val" = 'cv' ] ||
[ "$val" = 'cx' ] || [ "$val" = 'fq' ] || [ "$val" = 'fv' ] ||
[ "$val" = 'fx' ] || [ "$val" = 'fz' ] || [ "$val" = 'gq' ] ||
[ "$val" = 'gv' ] || [ "$val" = 'gx' ] || [ "$val" = 'hx' ] ||
[ "$val" = 'hz' ] || [ "$val" = 'jb' ] || [ "$val" = 'jd' ] ||
[ "$val" = 'jf' ] || [ "$val" = 'jg' ] || [ "$val" = 'jh' ] ||
[ "$val" = 'jl' ] || [ "$val" = 'jm' ] || [ "$val" = 'jp' ] ||
[ "$val" = 'jq' ] || [ "$val" = 'jr' ] || [ "$val" = 'js' ] ||
[ "$val" = 'jt' ] || [ "$val" = 'jv' ] || [ "$val" = 'jw' ] ||
[ "$val" = 'jx' ] || [ "$val" = 'jy' ] || [ "$val" = 'jz' ] ||
[ "$val" = 'kq' ] || [ "$val" = 'kx' ] || [ "$val" = 'kz' ] ||
[ "$val" = 'mx' ] || [ "$val" = 'mz' ] || [ "$val" = 'pq' ] ||
[ "$val" = 'pv' ] || [ "$val" = 'px' ] || [ "$val" = 'qb' ] ||
[ "$val" = 'qc' ] || [ "$val" = 'qd' ] || [ "$val" = 'qf' ] ||
[ "$val" = 'qg' ] || [ "$val" = 'qh' ] || [ "$val" = 'qj' ] ||
[ "$val" = 'qk' ] || [ "$val" = 'ql' ] || [ "$val" = 'qm' ] ||
[ "$val" = 'qn' ] || [ "$val" = 'qp' ] || [ "$val" = 'qq' ] ||
[ "$val" = 'qv' ] || [ "$val" = 'qw' ] || [ "$val" = 'qx' ] ||
[ "$val" = 'qy' ] || [ "$val" = 'qz' ] || [ "$val" = 'sx' ] ||
[ "$val" = 'tq' ] || [ "$val" = 'vb' ] || [ "$val" = 'vf' ] ||
[ "$val" = 'vh' ] || [ "$val" = 'vj' ] || [ "$val" = 'vk' ] ||
[ "$val" = 'vm' ] || [ "$val" = 'vp' ] || [ "$val" = 'vq' ] ||
[ "$val" = 'vw' ] || [ "$val" = 'vx' ] || [ "$val" = 'wq' ] ||
[ "$val" = 'wv' ] || [ "$val" = 'wx' ] || [ "$val" = 'xd' ] ||
[ "$val" = 'xj' ] || [ "$val" = 'xk' ] || [ "$val" = 'xr' ] ||
[ "$val" = 'xz' ] || [ "$val" = 'yq' ] || [ "$val" = 'yy' ] ||
[ "$val" = 'zf' ] || [ "$val" = 'zr' ] || [ "$val" = zx ]
do
val=$(cat /usr/share/dict/words | cut -c-2 | tr '[[:alnum:]]' | uniq | shuf -n1 | tr '[:upper:]' '[:lower:]')
done
echo "$val"
}
gen_name() {
# Fairly crappy name generator.
name=''
for i in $(seq 1 $(shuf -i 2-4 -n 1)); do
name="$name$(gen_name_diagram)"
done
# Capitalise first letter
name=$(echo "$name" | awk '{ for ( i=1; i <= NF; i++) { sub(".", substr(toupper($i),1,1) , $i) } print }')
echo "$name"
}
I would have thought passing it through tr '[[:alnum:]]'
would have killed any odd symbols, but who knows. Debugging something where everything is random is kinda difficult.
from 2018.
I hate time.
Latest commit d2a4350 an hour from now
from 2018.
Today's journal entry: Heat wave, and cluster headache... Yeah, not much is getting done today.
from 2018.
Pre-release demo files are up: here.
They are incomplete, but show the basic structure and how it's coming along. I'm kinda impressed.
from 2018.
Wow, so much progress! Keep it up!
from 2018.
Related Issues (20)
- Wheel of Fortune
- The Journal of Alexandria Alexander HOT 2
- The Hallway-finite state machines and Tracery grammars HOT 5
- Imitating the Greats HOT 1
- Sherlock Shuffle, Winkie, and Vocabularycept #67 HOT 1
- Silk: A UCSC Project HOT 2
- Paradise Explained, Meaning Lost: A Nonsensically Annotated Edition of Milton's Epic HOT 2
- IS_IT_LOVE HOT 1
- A Generative Book developed by CMU students HOT 2
- Walt Whitman Poetry + Web App
- i've never picked a protected flower (concrete unicode poems) HOT 4
- ETERLAN SEPTEBMER HOT 1
- A Pseudo-Philosophical Novel
- Make Shift HOT 3
- mechanical top-down novel generation HOT 2
- A CATALOGUE OF PHARMACEUTICAL DRUG NAMES HOT 3
- Textillating (output: Extremely Great Expectations) HOT 1
- El Libro de la Arena MΓ©xico
- Un classique inconnu HOT 3
- Sentence-level Markov model (or, reconstructing Moby-Dick using a neural network) HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from 2018.