digital divination

Using JavaScript to create a browser-based divining experience. The experience takes input from the participant and returns an output, loading JSON data.
The user places ants on the canvas that move towards a flower containing their lucky color. The chosen flower and lucky color are randomly selected. The lucky colors are all weirdly specific or absurd.

→ link to code





Design Process

→ link to project proposal

This project is a combination of my two initial ideas, using ants to find a treasure and picking flowers/flower petals. They happened to work nicely together, so I didn't have to compromise too much between the two.
I first worked out the movement system of the ants. My intial instinct in building this out was to use steering behaviors for the ants, but that ended up overcomplicating things and I didn't actually need it in the end. Using classes and objects, I generated a random number of flower objects (between 5 & 20) in an array. A function would pick a random flower object (represented by circles) from that array and determine it as the "target" that the ants would move towards and that could be clicked on later to reveal the chosen lucky color. I later set it so with the mouseClicked() function the user is able to draw the ant objects on the canvas. I used the ant function from the library I wrote in project 5 for the ants. Each flower is also colored a random color.

→ link to ant movement prototype

The other interactions were fairly simple to code, using a switch statement to change between the different states from the instructions to draw mode to play mode to viewing the pulled lucky color.
At the moment there are 75 different colors in the JSON data. I tried to make them unnecessarily specific and absurd, for charm, with references to a lot of different things.



Reflection

More than anything, coming up with the initial concept was the most difficult part. I'm not very spiritual, nor am I really familiar with nor use ritualistic divination sort of things. It was hard to come up with something meaningful to me and that makes sense within the canon of my work. I coudld've just done anything, but I wanted to at the very least have a reasonable intent behind it. I tend to fall back on ants and absurd type-humor when I can't come up with anything more meaningful, so that's what happened here.
In this project I also wrote and used my own set of data instead of an API. I probably could have lessened the workload from having to come up with a bunch of data by using an API, and also get some experience working with one, but it's fine.
For future improvements, I think it would be beneficial to more clearly distinguish/mark which flower is chosen, especially when there are flowers that are overlapping or gathered closely together, and to maybe have more connection between the color of the flower and the color in the fortune.