Project #3 :: Generative Fiction

Automatic Dungeon Explorer

A narrative project making use of randomized text to generate a short story, with you as a randomly generated character traversing through a dungeon and fighting various monsters along your way. For this project, in addition to the generative text elements, I was particularly interested in trying to incorporate some 3d models into p5.js.

Design Process

Concept

In terms of concepts, I really wanted something that would be flexible with added 3d models, so I thought a dungeon, and all the various discrete rooms it can provide, would be a good fit. Likewise, the swapping around of the various characters and monsters and their attributes was a subject that lended itself, I thought, to randomization.

Reflection

I was given a lot more time to do this project and it was much more complex than either of the two I had done previously so I'm fairly happy with the result, but at the same time there's lots of things I wish I had done differently. I spent a long time in the code using .csv files, having to script which row and column the necessary text would be on at length for every time they were used; later in the process, I started incorporating JSONs, which can do a lot of the same stuff enormously more simply, and I wish I had switched to them sooner. Conversely though, I uploaded those JSONs to a website that shut down midway through the project (not realizing you can simply upload them to the p5.js editor directly, and foolishly didn't have a backup, which was a big problem for my process.