Skip to content

Weather Battles #4

Description

@emmajuettner

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,

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions