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

Horror Story with Monster #22

Open
verachell opened this issue Nov 1, 2020 · 5 comments
Open

Horror Story with Monster #22

verachell opened this issue Nov 1, 2020 · 5 comments

Comments

@verachell
Copy link

I will be coding a horror story with a monster in it. I plan to do a mix of templating and something else (probably simulation). This is because I'd like to produce something with a coherent sense of plot, while still wanting to be "surprised" by what the characters do. I'd like to do something with synonyms in this work too.

I'm not sure how all of this will go, but I am sure I will have a ton of fun coding it.

I will program it in Ruby.

@verachell
Copy link
Author

verachell commented Nov 1, 2020

In lieu of a dev diary, I'm making my to-do lists publicly viewable at https://github.com/users/verachell/projects/4 Lists are how I naturally organize my work flow for myself anyway, and it was easy to set these to be publicly viewable.

I'll update in this comment if there's anything significant related to the development that doesn't go in my to-do lists.

@verachell
Copy link
Author

As can often be the case for NaNoGenMo projects, my original approach did NOT go at all according to plan! It's still a horror story with monster, but I'm now making major changes, mostly in the words and sentences used.

My original approach was to generate the next sentence based on the previous one, as a sort of proxy for simulation. However, the way I implemented it resulted in what looked like almost (but not quite) a random word salad, since the follow-on effects were relatively short-range. It would have technically fit the requirements to submit 50,000 words of that, but I was very disappointed to realize I could've achieved a very similar output in much less code by merely selecting random words out of a bag of words. Instead I had written 300 lines of code!

However, all is not lost!! The vast majority of the functions I've written will still work fine with my new approach, as will the data structures.

Now it's just a matter of implementing my new approach, which is the focusing of long-range changes in the story instead. It's a bit of a battle against time now, as I typically have less time available in the second half of November than the first half. Still, if all works well with the new plan, I hope to have 50,000 words of something less random by the end of this all!

@verachell
Copy link
Author

I have finished my NaNoGenMo project.

Code:

https://github.com/verachell/Horror-Story-with-Monster-NaNoGenMo-2020

Novels:

My code generates a "novel" of over 50,000 words in markdown format. It is a horror story with a monster in it. As mentioned in my previous comment, this project changed somewhat from the original plan. Originally I had the characters being mutable (picking up and putting down objects etc) and had the vocabulary constant. However, the way I implemented it resulted in only relatively short-range changes. Therefore I altered the program so that the characters instead were unchanging but the vocabulary changed over the course of the story. Although this sadly abolished my original goal of simulation, it did allow for long-range changes in the story over time. More about the changing vocabulary is described in the feature list below.

The novel is generated via madlib-style word substitutions into sentences. I made up the various madlib sentences myself; the words come from word lists whose origins are listed in the credits below.

The user is not prompted for anything except for the output filename if a file with the default name already exists.

Features

  • A random number of main characters are generated each time the program is run. This numerical range is currently set from 2 to 6, but can easily be altered by changing the corresponding 2 variables.

  • A specific biome is assigned to the story each time the program is run, so different runs of the program should result in different biomes. A biome is defined here as 2 types of animals, 2 types of trees, and 2 types of landforms. There are frequent references made to the biome during the novel, hopefully giving a sense of environment

  • Text messages. Characters receive text messages during the course of the novel.

  • Character-specific things: each character has a favorite verb which they frequently do during the course of the story, they have their own contact lists from whom they receive text messages, and they have an occupation.

  • Defined end point to the story.

  • Monster interludes. Somewhere during each chapter, a monster attacks and kills an unsuspecting minor character.

  • The next sentence type is different to the sentence before it.

  • Some (but not all) types of words change over the course of the story, as do some of the sentences. For example, at the start of the story, the adjectives are all positive e.g. "serene", "beautiful", etc. In the middle, they are neutral e.g. "unobjectionable", "uninspired". At the end, they are negative e.g. "malign", "disquieting". The distribution of positive and negative words available at any time is a mix that is dependent on how far through the story we are at that time. This distribution is recalculated each iteration. Other things which change over the course of the story are the text messages, weather descriptions, and adverbs. Thus, the story vocabulary in general becomes more hostile over time.

  • The algorithm is able to handle separate vocabulary sets for separate sections. In this story I utilized a different set of vocabulary for the monster interludes (which contained monster-specific words and sentences that did not change over time) compared to the vocabulary used in the main part of the story.

Credits:

Words came from the following sources

  1. The public domain book at Project Gutenberg: Part-of-Speech II by Grady Ward 2002. For details about how I parsed those words for use, see https://github.com/verachell/English-word-lists-parts-of-speech-approximate

  2. The SCOWL/Aspell package which was provided in the Linux distro I use at /usr/share/dict

  3. Male and female names came from the list of most popular baby names in the US for the year 2019 at https://www.ssa.gov/OACT/babynames/index.html. The 200 most popular names for male and for female names were used in this project.

  4. Word lists I created manually at https://github.com/verachell/English-word-lists-miscellaneous-categories, and a few other word lists I created manually specifically for this story.

Sample output:

Beginning:

. . .

The Thing of Ingelhoven

Chapter 1

In the distance a puma could be seen. David, Genesis, Madison, Sara and Zachary were hiking among the cypress trees of Ingelhoven. For the moment, they were putting aside the strange disappearances that had been occurring. Feeling joyful, they moved south, carrying with them a fork, knife and kettle. David decided that no matter what happened, he would make sure the kettle would not get lost. The ramifications of a great anteater could not possibly have any bearing on the knife they were carrying, yet Madison reflected stirringly on both. Sketching, Zachary pondered the significance of a stink bug. Sara stopped whittling and looked at the cedar trees. Sara almost bumped into a river, and started whittling again. Sara was whittling avidly. The cypress trees of Ingelhoven were easy to perceive.

Genesis said, "We need to do this more often."

They began to feel excited. Sketching, Zachary pondered the significance of a seed corn. They evaluated the fork, but it seemed somehow significant. Soon their path took them past a mattress which appeared serene. Feeling glad, David looked at the others enthusiastically. This reminded Madison amiably of the time when she prised the radio tower.

Sara remarked, "We need to do this more often."

Sara heard a phone notification:

MOM

just saying hi

Nearby, they perceived a puma. Zachary's phone buzzed:

. . .

Middle:

. . .

The ramifications of a bar foot could not possibly have any bearing on the kettle they were carrying, but Madison reflected tonelessly on both. Clouds started gathering. Genesis heard a phone notification:

LINCOLN

pls reply ASAP!

As a quilter, Madison felt that the island was simple but the cedar trees were unobjectionable. There were many alligators around them. As a farmer, David felt that the river was uninspired and the pumas were ordinary. They began to feel bored. Feeling unsettled, Madison looked at the others unobjectionably. They examined the fork, yet it seemed somehow important.

Meanwhile, in the depths of Ingelhoven, The Thing laughed. The psychologist was sauntering much too near. Somewhere in Ingelhoven, the psychologist wandered closer. Concentrating malevolently on a distant power pole, The Thing plotted. Somewhere in Ingelhoven, the psychologist wandered closer. The psychologist caught a glimpse of a snout. Unaware of any danger, the psychologist moved onward. Concentrating maliciously on a distant shed, The Thing plotted. Soon, all that was left of the psychologist was a piece of foot.

Zachary almost bumped into a cedar tree, but started sketching again. The mood was mediocre.

. . .

End:

. . .

Sleet started coming down on them rapidly. The puma ahead appeared ominous, but Zachary felt uneasy.

Zachary exclaimed, "You are all being disquieting!"

The cedar tree ahead appeared malevolent, yet Sara felt angry. Genesis almost bumped into an island, yet started composting again. Sleet started coming down on them rapidly. There were many islands around them. Lightning split the air. The cypress tree ahead appeared malign, yet Zachary felt fearful. It seemed that the log cabin was moving angrily toward them.

"Please tell me I'm not the only person who can hear that horrific thing!" exclaimed David.

Genesis received an incoming message:

UNKNOWN

what r u still doing here?

Chapter 54

The pylon started advancing evilly toward them, controlled by The Thing. They were blocked behind them by a malign wall of cypress trees which had materialized. Suddenly they heard a rustle and caught a glimpse of a disquieting horn. A nearby alligator snarled obnoxiously. The Thing crept near them and lunged, but missed. Zachary swiped at it with the knife but this did not seem to have any effect. Madison took out the fork, knife and kettle. By repeatedly smouldering, they were able to combine the items together into a weapon. David threw it at The Thing, and it was unable to withstand its effects. Its tail dulled and it became still.

David, Genesis, Madison, Sara and Zachary walked triumphantly in the direction of home. After this, David was looking forward to going back work as a farmer. They all were looking forward to things being back to normal.

Behind them, a slime twitched.

THE END

@cpressey
Copy link

Proper job.

@greg-kennedy
Copy link

This is great. One of my favorite entries this year.

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

No branches or pull requests

4 participants