top of page
  • Writer's pictureKJ Ha

Nature of Code: Final Project



For the final, I created a word guessing game inspired by Hangman. I took a helium-filled balloon simulation as the main design element to apply what I've learned during the course. (The sketch is developed from the mid-semester project.)


At first, the player is given ten lives. All they need to do is to guess the word by suggesting letters until there is life left.


The word is selected randomly from the word set consisted of 30 words. Each word belongs to one out of five categories: food, sports, animals, colors, and objects. In the top right corner, the category and number of characters are presented for the player to refer to.



// word list
let wordList = [
  ["Food", "hamburger"], ["Food", "sandwich"], ["Food", "croissant"], ["Food", "yogurt"], ["Food", "popcorn"], ["Food", "noodles"], ["Food", "chocolate"], ["Food", "tamales"],
  ["Animal", "raccoon"], ["Animal", "leopard"], ["Animal", "rhinoceros"], ["Animal", "chipmunk"], ["Animal", "hedgehog"], ["Animal", "giraffe"], ["Animal", "flamingo"],
  ["Sport", "wrestling"], ["Sport", "badminton"], ["Sport", "basketball"], ["Sport", "marathon"],
  ["Object", "umbrella"], ["Object", "microphone"], ["Object", "newspaper"], ["Object", "toothbrush"], ["Object", "bandage"],
  ["Color", "purple"], ["Color", "mustard"], ["Color", "magenta"], ["Color", "burgundy"], ["Color", "turquoise"], ["Color", "ultramarine"]
];
  

If the player suggests the wrong letter, life is reduced one by one. When the player's guess is correct, the letter will be revealed as the corresponding balloon floats upward. If the player gets the word perfectly, they can move on to the next stage. If the player runs out of life, they will receive a "Game Over" message with a button to start over.




Live App





Demo video


Recent Posts

See All

Nature of Code: Final Proposal

Link to video recording: https://youtu.be/_n7wWtambYc For the final, I would like to continue working on the mid-semester exercise. (link to mid-semester exercise: https://editor.p5js.org/kh1785/sketc

Nature of Code: 6th Assignment

Link to code: https://editor.p5js.org/kh1785/sketches/tT1Cj0ZRp9 For this week's assignment, I've created a sketch inspired by one of the video examples, the Game of Life. A lot was taken directly fro

bottom of page