Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Placeholder title. Placeholder? A book about places? #59

Open
mathias opened this issue Nov 9, 2018 · 16 comments
Open

Placeholder title. Placeholder? A book about places? #59

mathias opened this issue Nov 9, 2018 · 16 comments
Labels

Comments

@mathias
Copy link

mathias commented Nov 9, 2018

Code: https://github.com/mathias/nanogenmo-2018

@mathias
Copy link
Author

mathias commented Nov 12, 2018

Not a whole lot of details yet, but I do have a question:

What do people use to render nice PDF versions of their books? I know Latex/tex is very popular, but I haven't worked much with it before, and likely would be code-generating that, too. (Looking at https://github.com/mewo2/deserts/blob/master/generate.py )

I started work over at https://github.com/mathias/nanogenmo-2018 but nothing but experiments so far.

https://gist.github.com/mathias/3e362b81b87b8695069cba9ed71a3fe3 is an experiment inspired by @JKirchartz 's https://github.com/JKirchartz/NaNoGenMo/tree/master/2018/SherlockShuffle but with different source material and somehow the sentences got really glitched up somehow. This will not be my novel entry for this year, but it has an interesting aesthetic.

@mathias mathias changed the title TBD Placeholder title. Placeholder? A book about places? Nov 13, 2018
@JKirchartz
Copy link

JKirchartz commented Nov 14, 2018

Looks like you used a version of SherlockShuffle when I broke the replace script - I'm not certain - that bug should be fixed now, but I'm not sure what else might have changed...

Also I found this latex project recently, looks promising
https://tildegit.org/biglysmalls/TildePublishingUnlimited

@mathias
Copy link
Author

mathias commented Nov 14, 2018

Thanks @JKirchartz!

@mathias
Copy link
Author

mathias commented Nov 14, 2018

I was curious to play with Sherlock Shuffle and char-rnn, but hoping to write my own thing using Tracery, perhaps Seaduck.

Getting interested in procedurally generating plot and characters and then trying to find “causality” to tie it all together with hidden attributes so it seems like it was planned / written — the Caves of Qud procedurally-generated history talk was a big inspiration to this approach https://youtu.be/H0sLa1y3BW4

@mathias mathias closed this as completed Nov 14, 2018
@mathias mathias reopened this Nov 14, 2018
@mathias
Copy link
Author

mathias commented Nov 14, 2018

Whoops. Mobile UI makes it way too easy to close issues 😬

@mathias
Copy link
Author

mathias commented Nov 15, 2018

Ok, so after sketching out some more ideas last night, I've decided to riff on the temporary Issue title I set above. This novel will (ideally) be about a journey taken by a group of characters. (Think The Hobbit or Alice in Wonderland or The Wizard of Oz.)

Inspired by recent re-reads of The Wizard of Oz, each chapter will be a different place, with some different people/monsters encountered, and a different challenge or obstacle in the group's way. I am hoping to get past just a travel diary / description of places, since we've seen that in previous years with projects like Deserts from NaNoGenMo 2015.

As a tangent, I did recently read Italo Calvino's Invisible Cities, which appears to be an inspiration to Deserts, and I may use some of its sentence structures as templates for Tracery, as well as pulling in sentence structure manually from Alice in Wonderland and The Wizard of Oz -- or I may conscript pos2tracery and pick and choose which sentence structures I'm keeping for Tracery input.

I'll write prose for the intro and epilogue. But, to make it more "generated" I may write name and attribute generators for the prose in the intro and epilogue so that it isn't entirely me writing it.

I also have some rough outlines of some other, more ambitious stuff that I might use, including generating a "world creation myth"/lore with a pantheon of gods and their relationships + significant events between them, then sprinkle that in either in-between chapters or as pieces of text found by the characters throughout. I'm not entirely sure that I need to do this, and it may not contribute to the story to sprinkle it in.

Not sure whether this is tending towards high fantasy or just Alice in Wonderland absurdity, but we'll see based on what the generators choose.

@mathias
Copy link
Author

mathias commented Nov 16, 2018

Confirmed that if I pull in seedrandom library to Node, which sets a global seed to JS's Math.random, that the seaduck library outputs the same output every time with the same seed.

This will allow me to specify the seed, which means I can either search the random seed space for the desired end product I want, or more likely, I can improve certain quirks and know that I'll get similar (but improved) output on the next run.

Example experiment script that always outputs the same Seaduck generated output.

@mathias
Copy link
Author

mathias commented Nov 20, 2018

I'm calling my language and word generator "good enough" for now. It is heavily inspired by https://mewo2.com/notes/naming-language/ and https://github.com/mewo2/naming-language/blob/master/language.js but simplifies some of the rules for spelling and other details.

Here's some example output of the language naming itself and then getting some random words from it:

This language is named: Ghirngarulng gil‘ilghirgalirngorghghir Ngurvgurwelgulngur
Example words:
vilyngurilil ngurgalwelngurvilyngurwel gil‘gurgulilgalghir galgil‘gurirghir ngurngurvyilg ngurvgurngurvyilgngar galgurngorgh welgil‘ghirgurgur ngurirngorghulng gulwelyilggur ngorghirngorgh gil‘ngaryilggal ngurvngargalvilywel ngarngurulngngar vilyyilgghirngurgil‘gulghir galgalwelgil‘yilgngar ngorghgalngorghyilgghirgalwel ghirilngurghirngorghghir welghirngorghgurgulvily gurvilyil
Example names:
Yilgghirgulngurvgul Ngargil‘gurngurirghir
Ngargalghir gil‘ilghirgalirngorghghir Guryilgilyilgyilgngargur
Gurgurwelyilgvilygulil gil‘ilghirgalirngorghghir Vilyngorghngurvgalyilg
Ngarulngirvilyngar gil‘ilghirgalirngorghghir Irirngurvgalgil‘
Ngurvilyyilgil Yilgngorghgurgalngurv

This language is named: Onimdumbamim-Omčemonon
Example words:
žoninim dumčunžon on am žondum en ghumdumimamdam dumčemondum žonbamen inam onamenžon damim dam omonom en dumčunonon ombaman ghenghum bam andamanghen
Example names:
Čeminom-Enomam
Ončunomžon-omamghumon-Čun
Ghenbamčemom-Am
Ghumdumon-omamghumon-Ghen
Žonghum-Damomčunon

The code is here if you're curious.

@hugovk hugovk added the preview label Nov 20, 2018
@mathias
Copy link
Author

mathias commented Nov 22, 2018

I guess my novel this year is going to be an "ensemble generator", named for ensemble learning where multiple learners are used.

In this case, I'm training the excellent https://github.com/sherjilozair/char-rnn-tensorflow on some novels I had on my hard drive in .txt format, to generate dialogue. The plan so far for it, is to have a character in my finished novel whose dialogue comes from this learned model. It'll be out of context and not make much sense, but should seem like dialogue. I'll write some glue code to scan the finished output.txt from the char-rnn-tensorflow and pull out anything that looks like dialogue, then that list will be used in my other script to populate the final novel.

I am working some more over this holiday on various world, region, and room generators. Hopefully I get a set of somewhat MUD-like description generators that then the story can take place in. The language generator shown above can be used both to name places (for simplicity, a given region will have a common language) and later for inhabitants to speak a bit.

It's slowly coming together, but different than I imagined. Fingers crossed that I get some output that I'm happy with.

@mathias
Copy link
Author

mathias commented Nov 24, 2018

Working on some actual novel + character generation functionality today. Got to a good stopping spot, and now I'm watching some GDC videos on procedural generation.

@mathias
Copy link
Author

mathias commented Nov 24, 2018

the seedrandom library doesn't work with Lodash library's random functions so I stopped using it, for now.

@mathias
Copy link
Author

mathias commented Nov 25, 2018

I'm writing more of the intro, which contains some wildcard random words, but is mostly written by me, to set up the story. (Like Peter Pan, The Wizard of Oz, and Alice in Wonderland, it is the setup for our main characters getting transported to a magical/imaginary realm.)

Here's a sample:

Sneaking in behind Anise was a peculiar sight. A small woodland creature, in a ancestral jumpsuit. It turned, revealing that it was carrying a small backpack with various leaves sticking out of it. Its tiny eyes darted nervously around the room.

"yes, yes, hugged North.", it chirped.

"That may well be, Wowu‘e'‘eka", said Anise. "But I am sure this is the right place!"

The squirrel people will factor in later, and in particular, this one (In this run, named Wowu‘e'‘eka) will accompany them. But the whole time, it'll speak some pos2tracery-generated gibberish to the main characters. This is one of the ensemble generators inside the main novel generator.

I've tweaked my Language generator quite a bit since the preview above, since I wasn't happy with it, and it kept outputting such wordy languages that I figured no one would bother to ever speak those languages.

I'm also planning to use Seaduck generators to "resolve" the various conflicts in each chapter, and do some more procedural generation of regions/lands to travel through, "artifacts" to pick up and wield, and so on. Hopefully, most of this is reusable and fits together to make some sort of story.

@mathias
Copy link
Author

mathias commented Nov 26, 2018

I worked on an "artifact generator" for ancient, powerful/magical items.. except this is feeling a bit too high fantasy and not enough absurdity/whimsical, so I'll have to work on the actual word lists used to generate these:

Howling Wristguard the Elements
Thick Bracelet Superiority
Matchless Gold Breastplate
Thick Mithril Bracelet
Light Jacinth Mask
Fathomless Neckclasp Nirvana
Eldritch Scalemail Cloak
Warshadow Onyx Helmet
Helmet
Refined Amethyst Helmet
Bloodstone Helm

@mathias
Copy link
Author

mathias commented Nov 26, 2018

Here's some better "artifacts" given that I've rewritten the lists to have more absurd and child-related items:

Cast iron Rubber Chicken
Brass Comb
The People's Vinyl Alarm Clock
The People's Cast iron Scissors
Cast iron Hat
Awe-inspiring Titanium Pencil
Acrylic Bottle
Broken Sunscreen
Sticky Metallic Hat
Replica Brass Alarm Clock
Metallic Pencil
Broken Rubbery Pocket Watch
Replica Tinfoil Dictionary
Magical Polyester Scissors
Omega Acrylic Backpack
Cardboard Hat
Magical Taped-together Pocket Watch
The People's Cast iron Bottle
Cast iron Rubber Chicken
Sticky Titanium Rubber Chicken

@mathias
Copy link
Author

mathias commented Nov 28, 2018

Ok, so my characters can walk around in a chapter and do bored things.

Chapter 1
Peyton was in ruined ruins. Peyton yawned. Esme thought they heard something. Peyton yawned. Esme went to ruined rope bridge. Skeeter gazed thoughtfully into the distance. Peyton went to ruined rope bridge. Esme scratched their head. Peyton scratched their head. Esme gazed thoughtfully into the distance. Skeeter went to ruined rope bridge. Esme saw Peyton leave the ruined rope bridge. Skeeter saw Peyton leave the ruined rope bridge. Peyton went to ruined ruins. Skeeter saw Esme leave the ruined rope bridge. Esme went to ruined ruins. Skeeter went to ruined ruins. Esme saw Peyton leave the ruined ruins. Skeeter saw Peyton leave the ruined ruins. Peyton went to ruined rope bridge. Skeeter saw Esme leave the ruined ruins. Esme went to ruined rope bridge. Skeeter went to ruined rope bridge.

So many things to do. The locations don't make sense (I want to generate regions more procedurally, where all the locations in a region will make sense. And these locations that they move between will be more like moving in and out of buildings in the region, which will have its own description -> its own terrain type, adjectives, weather, etc.)

Next up is picking up and putting down objects, and maybe some dialogue. Each type of sentence (the "bored actions" above that I implemented while the characters idle in space) can have variations, so I'm hoping that by throwing a lot of variation into the final sentence it picks for any given action type, it'll feel less repetitive.

@mathias
Copy link
Author

mathias commented Dec 1, 2018

I didn’t get any further with this one, but I whipped up #101 tonight and that one is complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants