Creative Coding – What are the Monsters in the Dark?

Sketch a monster.
Now, sketch it using only Python.

How simple is it to remove the colored pencils and only use code? For me, it was surprisingly challenging.  

My goal was to explore creative coding as a way to practice my Python skills while engaging with my more imaginative side. While I hit many challenges in developing a coded monster, I found myself identifying idea after idea on how to make my monster more visually exciting or make my code more efficient. The way the project’s code and visual design components evolved side by side, demanding an integrative approach to problem-solving, was precisely the kind of stimulation and growth I had hoped this kind of challenge might produce.

My journey with creative coding started with simple tutorials on using Python within the Processing IDE to define a sketchbook, set a background, and draw basic shapes. Creative coding seemed simple at the start, but as soon as I moved away from following tutorials to trying to sketch my own art, I quickly ran into questions like:

  • How do I draw curved lips and sharp teeth?
  • How can I use color to create a sense of depth on a 2D image?
  • How do I get a monster’s pupils to follow the cursor?  

I had to learn how to adjust my Python code to the Processing software to answer these questions and made many fun mistakes along the way. I practiced coding functions for interactions with mouse clicks, which did not work in any way as I intended, and conditional loops to send pupils following a cursor, which worked out great. I learned to utilize Python’s interpreted structure to reduce the number of code lines related to colors while spending too much time trying to keep track of my coordinate system. In the end, I generated an appealing monster reaching from the dark that tracks the movement of the cursor.

6-second video of the monster’s eyes tracking the cursor

What’s next for me and my creative coding? I would love to refine the eye-tracking algorithm for my monster since those eyes never ended up tracking as smoothly as I wanted. Or I could play with more advanced tools in Processing, such as dynamic lighting that may help with the illusion of depth in my monster. Or maybe I will branch into an entirely new design that uses the more complicated loops and interactive functions. No matter where my artwork goes, I know I’ll get great Python practice and have fun creating new artwork.

Creative coding is an excellent way for the more analytically minded, like myself, to pursue an imaginative approach to practicing coding. I recommend you find out what monster is hiding in the darkness of your own creative mind.

Columnist: Lisa Nickels