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

Weather Battles #4

Open
emmajuettner opened this issue Apr 30, 2023 · 0 comments
Open

Weather Battles #4

emmajuettner opened this issue Apr 30, 2023 · 0 comments

Comments

@emmajuettner
Copy link

Code: https://github.com/emmajuettner/weather-battles
Output: http://emmajuettner.com/weather-battles/

This entry generates poems about sword-fighting that are based on what the weather is like in Chicago at any given time. The idea for this entry was initially inspired by Liza Daly's There Are Stars entry for NaNoGenMo 2022, which was very neat and got me thinking about what other sorts of external information you could use as input to shape generative texts. Since weather APIs are readily available, I decided to see if I could take weather stats (temperature, wind, etc) and use them to influence certain elements of a narrative. If the temperature increases, the mood is angry; if it decreases, the mood is calmer. Depending on the wind direction, either the narrator or their opponent gains the upper hand in the battle. I set up a Github Action to generate a line hourly, so that the poem would grow as the weather changed over time. The results that I have so far are pretty basic and repetitive, but I'm happy that I was able to make something that roughly approximates what I was envisioning, and I am already thinking about ways I could take this basic framework and make more complex and sophisticated projects out of it. :)

Here's a sample of what the generated poem looks like:

I breathe deeply, contemplative, you dodge my blade,
my breathing becomes ragged, furious, you slash at me,
I summon all my strength for an attack, furious, you slash at me,
my blood boils, irate, you lunge,
you glare at me, vicious, I dodge your blade,
my breathing becomes ragged, incensed, you dodge my blade,
you glare at me, irate, I parry your thrust,

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

No branches or pull requests

1 participant