During the semester of 2025 spring, I took the course GSND 6460: Generative Game Design by Professor Chris Martens. In this course, we were required to create generative art pieces with p5.js under weekly prompts & topics.
Here is a list of my works on p5js.org
.
Check it out if you want to try them out live!
Or you could read the below descriptions of each ;)
Weekly sketch 1: Directed Randomness
There is an algorithm for procedural game map generation of which I had heard for long, but had never used in real projects or actually implemented. The algorithm is what's so-called Wave Function Collapse procedure (WFC). I wanted to learn this algorithm, so this time I decided to give it a try and see where I could reach without external help.
... as it turned out to be pretty successful!
I designed a simple system for generating a grid-based map of dirt paths on grass field. The paths will automatically connect to adjacent path cells, so I don't want to see a solid 2x2 path block on the map, as that would form a ロ shape, which is ugly. I implemented a generic framework for the WFC algorithm, and then filled in my custom rules, and BOOM:




Weekly sketch 2: Text and Negative Space
Enter a line of text, and the program would splat the characters on your face. But with each splatting, the splatted character becomes the background of the next character.
Sketch for Fun: 粪海狂蛆
Content may be gross/disgusting. Read with caution.
This week, a classmate of mine (which later became my roommate) wrote a classic Snake. I kinda wanted to "continualize" it by:
- Remove the grid-based form and make the space a proper ℝ²;
- Substitute the "snake"'s movement with a smooth curve. And I ended up having a thing that could hardly be recognized as a snake. It's more like a worm...
This is what it looks like:

Yeah it's really a worm... I even made the fine detail of the variation of its body width... And the Chinese title for this sketch actually means—The Crazy Worm in the Shit Sea.
To see it moving, click into the sketch page. I don't want to disturb my innocent readers anymore :D
Weekly Sketch 3: Self portrait
This time I made a simple 2D pixel-style avatar creation tool that lets users choose the styles of facial features and adjust the positions freely.



Weekly Sketch 4: Replicate a natural concept
Linguistics has always been one of my greatest interests, so is computer programming. So how can I not love their intersection—formal grammar? I was so excited when the professor started talking about it in class, and I immediately decided to implement a L-system for this time's homework.
The power of the L-system is powerful: It can be used to create tree-like shapes and fractals. Theoretically, any shapes that could be generated with a rigor recursive procedure could be described by the L-system. See the following examples!


F := f[++F][-ffF][----F]
.

Weekly Sketch 5: Cellular automata
Cellular automata, a very cliched topic, everybody knows what it is. I gotta make something different.
I'm thinking that, it's just a discrete version of a field over boolean values, isn't it? I can somehow upgrade the value range to real numbers, and change the differential iteration rules to continuous equations, and that should make it a proper 2D field.
So I then went on writing a general framework that could handle both type of "fields", and filled in my custom rules... And voila, a classic water height field!

There are also 2 other presets in the sketch page, please do check them out!