Assignment 4 – Generative Text

Concept

Recently, I have been playing through the story mode of UBISOFT’s Assassin’s Creed: Valhalla. This experience, paired with the recent trip to UBISOFT, inspired me to create this piece. I decided to use the slogan of the brotherhood from the Assassin’s Creed lore, and additionally I used an online translator to convert the slogan from latin to elder futhark scripture. This was done to tribute the Viking culture and their language with respect to the game.

Code 

For this assignment, I experimented a bit with using external media such as images and sound. I would say that the biggest part of my creative process for this assignment was choosing the right image on which the text displayed would be comprehensible.

Additionally, what proved to be a challenge was determining all the relative dimensions which determined the amount of text being displayed.  In order to not hard code them, I spent quite some time defining them to get what I wanted. The main goal was to have the mouse X-coordinate control the amount of text being displayed. This was done through the following code:

textSize(32);
textAlign(CENTER, BOTTOM);
let middle1 = sourceText1.length / 2;
let left1 = middle1 - ((mouseX / width) * middle1);
let right1 = middle1 + ((mouseX / width) * middle1);
//Draw a number of characters from the string depending on the mouse X coordinate
text(
  sourceText1.substring(left1, right1+1),
  width/2, height/10.01);

Eventually I got the following sketch as the final version for this assignment:

Future Improvements

All in all, I am pretty satisfied with the way this assignment turned out for me. I was able to implement things we learnt in class and relate them to a lot of interests that I have. In the future, I would like to focus more on maybe composing an image similar to this one with OOP.

 

Leave a Reply