Project: Creative Coding 5/15/24 - Give The Devil His Due

Logbook

Wed May 15 10:27:58 GMT-0700 (Pacific Daylight Time) 2024

The Creative Coding prompt was:

He will give the devil his due. — from King Henry IV

Someone looked up the meaning of that phrase.

one has to acknowledge the positive qualities of a person who is unpleasant or disliked.

I was grateful because I would have come up with a completely different idea of the meaning, something about an evil library.

I had recently watched AI-driven Dynamic Dialog through Fuzzy Pattern Matching. That describes how Valve makes actors talk to each other based on the current situation of the world. I wanted to make a simulation where a handful of autonomous actors trade procedurally generated dialogue. The actors could act out any situation, so I thought I could sufficiently abide by the creative prompt.

I started out with some hand-crafted actors with weird names. The thought developed into a scene where people are trading bad jokes to pass the time.

Code
<script></script>

Results

Mon May 20 02:50:00 PM PDT 2024

I got to a place where each character would tell some jokes, and eventually they'd all be too exhausted. I wanted them to regain stamina and start telling jokes again. When I tried to add regaining stamina, I realized I wasn't sure where it would go. My best thought was to make a separate temporal system, a normal real-time game loop where each character would regain some small chunk of their stamina over time. That didn't fit into the current model at all, where I was focused on an event-based model. But it made sense that to see a real-time scene play out, we'd want both a real-time engine, and an event engine. The real-time engine might spit out events regularly, and the event engine would respond, sometimes spitting out more events in its response, or scheduling new event listeners for future real-time triggers. Seemed like a great pairing, and closer to what I had in my other project. So instead of attempting to build this event-based dialogue generator in isolation, I realized it would be another component of the system I'd built elsewhere.