Categories
KINETIC LIGHT

Eh Oron

Title
Eh Oron (Mother Land)

Project Description
This project, titled “Eh Oron (Mother Land)”, is a kinetic light sculpture that combines futuristic aesthetics with cultural symbolism. I was inspired by the idea of scrolling LED display and decided to create a piece that blends modern technology and some Mongolian elements. The central concept behind the work is to represent my connection to my homeland, Mongolia, through the use of circular motion, neon lighting, and a symbolic quote written in Mongolian.

The project features a transparent circular box housing a scrolling transparent display with text that rotates around, driven by a stepper motor. The text displayed on the plastic sheet is a Mongolian phrase that translates to “I am too similar to my country”, which reflects my sentiment of being deeply intertwined with my motherland. The use of blue and pink neon tubes represents the colours of the Mongolian national flag, adding a vibrant and visual element to the piece.

Additionally, I have added hanging pigeons that also rotate around the central structure, alluding to the cultural significance of the pigeon as we call our country “The land of eternal blue sky” and when thinking of the sky, it reminded me of birds. 

Perspective and Context

My approach to this project aligns with the ideas explored in the readings and the research I did on the perception and interpretation of light-based artworks. The project’s interplay of light, movement, and symbolic imagery invites the viewer to engage with the work on both a sensory and conceptual level, enabling a deeper understanding of my cultural and personal connections.

Furthermore, the project’s kinetic nature, the continuously rotating display and the balance of the hanging pigeons create a sense of ongoing transformation, encouraging the people to interact with the work dynamically.

Development & Technical Implementation
The development of this project involved a multiple process that combined design, sculpting, and artistic expression. I began by sketching the initial concept and considering the materials and components needed to bring the idea to life.

The main technical challenges centred around the construction of the transparent circular enclosure and the integration of the rotating display, neon tubes, and hanging pigeons. I experimented with various materials, including laser-cut acrylic rings and plastic sheets, to create the structure and housing for the different elements.

The integration of the stepper motor, wiring, and power supply was another crucial aspect of the technical implementation. I had to carefully test and troubleshoot the electrical components to ensure the smooth and synchronised rotation of the text display and the hanging pigeons.

The final result is a carefully balanced kinetic sculpture. The audience is encouraged to observe the work from different angles, as the interplay of light, motion, and symbolic imagery creates a unique experience.

The process of building:

Presentation
The presentation of this project during the class and the IMA show was a valuable experience for me. While the initial in-class presentation had some technical problems, I was able to fix my project before the IMA show.

During the IMA show, I received positive feedback from the audience, particularly from my Mongolian peers who were able to understand the meaning of the text and appreciate the cultural references. People were interested in the struggle and subsequent recovery of the rotating mechanism, which was a problem I had to fix. However, some people interpreted it as a metaphor for the challenges and resilience of life.

The kinetic nature of the piece also captured the attention of the viewers, especially the kids who were fascinated by the moving pigeons. This interaction and engagement with the audience demonstrated the project’s ability to create a sense of curiosity, inviting the viewers to explore the work on a deeper level.

While the presentation went well overall, I acknowledged that there was room for improvement, particularly in ensuring the reliability and consistency of the rotating mechanism. This experience has provided valuable insights for me to consider in future projects, where I can refine the technical aspects while maintaining the conceptual depth and emotional resonance of the work.

Conclusion
The creation of this project has been a fun journey for me, marked by both challenges and discoveries. One of the key lessons I learned was the importance of embracing unexpected issues and finding creative ways to enhance the work, even when the initial results differ from the original idea.

Through the process of designing, building, and troubleshooting the various components, I gained a deeper understanding of the technical and logistical aspects of kinetic art. This knowledge, I hope, will undoubtedly inform my future projects, where I can apply these lessons to develop more reliable techniques while maintaining the conceptual part of the work.

Looking ahead, this project has motivated my desire to create works that resonate with my personal and cultural identity, while also engaging the audience in a visually and conceptually compelling manner.

Categories
KINETIC LIGHT

Linear Lights Assignment

For our assignment, we drew inspiration from Studio Drift’s Shylight installation and decided to create something similar but with an upside-down. Our goal was to mimic the elegant motion of a blooming flower. We began by constructing an umbrella-like form using six wires and a plastic piece with six holes, allowing each wire to pass through and form the flower’s petals. We then added a cone-shaped structure through which the flower would bloom outward, creating a visual effect and attached another wire as the peduncle.

Next, we connected the wire peduncle to a linear actuator to test its functionality. Once we confirmed that the mechanism worked, we enhanced the aesthetics by adding LED strips and additional layers for a more appealing visual. Lastly, to house the linear actuator, we built a cardboard box. 

Categories
KINETIC LIGHT

Karakuri Assignment

In this assignment, we made three paper karakuri mechanisms with distinct repetitive movements. Working in pairs, we built one mechanism that produced a repetitious vertical motion, another that generated a repetitious horizontal movement, and a final one that swayed back and forth using a linkage mechanism. Throughout the process, we realised the importance of precise measurements. Every millimetre and fraction mattered as we crafted these mechanisms using card stock paper. Accurate measurements became evident as we wanted flawless synchronisation and fluid motion in our Karakuri creations. Overall it was an interesting assignment to build paper mechanics and understand how each mechanism works. 

Categories
KINETIC LIGHT

Reading Reflection 2

The terms “machine art” and “kinetic art” have been historically used to describe artistic practices that incorporate machines and movement as essential elements. Machine art refers to artworks that engage with machines, often exploring their aesthetic qualities and social implications. Kinetic art, on the other hand, specifically focuses on the use of movement as a primary medium of expression. 

In the reading”Toward the Art and Aesthetics of the Machine,” Jack Burnham discusses different aspects of machine aesthetics in artworks: Associative Relation, Symbolic Reference, Formalist Emphasis, Kinetic Element, and Automatism. Burnham states that the list does not imply a chronological order or represent distinct genres of machine art. Instead, it provides analytical dimensions to understand how artworks relate to technology and the aesthetic qualities associated with machines. To further explore these concepts, I have selected two artists from the Kineticism movement: Jean Tinguely and Hans Haacke. 

Jean Tinguely 

  • “Méta-Matic No. 9 (1958): perfectly embodies the essence of Jean Tinguely’s approach, as he proclaims the boring and repetitious nature of the machine. As the quote states, ‘Small “surprises” and breakdowns often disrupt the repetition of Tinguely’s devices.’ This resonates with the artwork itself. By removing the artist’s hand from the production of the artwork the art piece allows anyone to engage with the machine and produce abstract drawings automatically, challenging the traditional role of the artist as the sole creator. The machine’s operation is not a flawless, predictable process. It is precisely these small surprises and breakdowns that inject an element of unpredictability and spontaneity into the artistic process. Constructed using found objects and rudimentary parts, the artwork highlights the aesthetic qualities of these technical designs and structures, thus emphasizing the beauty that can be found in the realm of mechanical creations. Once activated, the machine operates independently, producing abstract drawings unpredictably and haphazardly. In this way, Tinguely’s creation embodies the artistic potential and autonomy of the machine, insulating it from the criticisms of frustrated observers.
  • T03823 Metamechanical Sculpture with Tripod 1954: the unpredictable and variable movement of the piece, caused by the relatively gimcrack functioning of the cogs and pistons, critiques the idea of precise control and deliberate artistic manipulation. It invites reconsidering the relationship between the artist, the machine, and the resulting artwork. While T03823 may not explicitly employ symbolic iconography, it symbolically represents the mechanisation and automation of artistic creation. The wire and cardboard construction, along with the tripod base and wire wheels, highlight the aesthetic qualities found in the design and arrangement of these mechanical components, while the interaction between the revolving wheels, the projecting wires, and the unpredictable nature of their engagement creates a dynamic visual experience. Lastly, the electric motor provides continuous power to activate the bottom wheel, which sets the entire piece in motion. 

Hans Haacke

  • Blue Sail: establishes an associative relation between the elements of nature, such as wind and air, and the materialistic object of the blue chiffon cloth. The interaction between the movement of the wind and the suspended chiffon creates a visual dialogue between human beings and the natural world. Moreover, the blue chiffon cloth suspended like a sail symbolically references the concept of navigation, exploration, and journey. Thus, the fan serves as the kinetic element in “Blue Sail” as it provides the airflow to create movement resulting in kinetic motion that adds a dynamic. It also captures the essence of automatism through the interaction between the wind, the chiffon cloth, and the oscillating fan. The movements of the cloth are not controlled by the artist’s direct intervention but rather by the environmental factors and the airflow generated by the fan. 
  • Condensation Cube:  Haacke’s use of the cube as a containment vessel for water creates a closed physical system that mirrors the idea of a living organism interacting with its environment. The random forms taken by the water droplets as they run down the walls of the cube reflect the unpredictable and organic nature of growth and movement. The construction of the cube and the clarity of the material highlight the aesthetic qualities of transparency and simplicity.  Although “Condensation Cube” does not possess explicit mechanical motion, it incorporates a subtle kinetic element through the continuous process of water evaporation and condensation. Therefore the piece captures the essence of automatism through the reliance on natural physical processes. Haacke relinquishes direct control over the outcome, allowing the condensation process to unfold freely within the statistical limits.
Categories
KINETIC LIGHT

Scintillate: Project 2

Title
Scintillate

Project Description

“Scintillate” is a light sculpture that explores the transformative power of love and the beauty found within brokenness. The concept is inspired by two distinct sources: the Japanese art of “Kintsugi(金継ぎ)”,  which involves repairing broken pottery with gold to celebrate its imperfections, and the captivating light sculptures created by Tintin Cooper, which gracefully merges light, space, and sculpture. By merging these influences, the intention behind this project is to create a sculpture piece that symbolises brokenness and beauty. The project aims to remind the audience that there is inherent beauty in every aspect of life, including our flaws and imperfections. Unlike our tendency to conceal our weaknesses and vulnerabilities, this sculpture embraces and illuminates the broken parts to showcase their beautiful qualities. 

The sculpture’s design features an intentionally bent upper part, forming an upside-down heart shape. This serves as another reminder to continue spreading love and positivity, even in moments when optimism and love may feel distant. Love, as the most powerful force in the world, has the potential to both break and heal, and this artwork seeks to capture the essence of this duality. By combining aesthetics, symbolism, and the interplay of light and space, the sculpture aspires to inspire contemplation about the nature of love and its effects.

Perspective and Context

As discussed in Jack Burnham’s essay “Light as Sculpture Medium” from “Beyond Modern Sculpture” (1969), light in art is often transmitted and transformed through materials rather than projected directly at the viewer. In line with this concept, my project uses neon tube lights to create a luminous effect that “hugs” the audience in a pink glow, revealing the emotional stimulant of luminosity described by Burnham. The glowing pink neon tube serves an aesthetic purpose as well as bringing a sense of warmth, comfort, and emotional connection. It engages the viewer on a certain level, inviting contemplation about the transformative power of love.

Development & Technical Implementation

The development of my project involved a combination of research, experimentation, and technical implementation. To begin, I researched the Japanese art of Kintsugi, studying its techniques of repairing broken pottery with gold and the symbolism behind it. This inspired the concept of using EL wires to represent the golden repairs in my sculptural mannequin. Additionally, I spray-painted the sculpture with a gold finish to further emphasise the element of Kintsugi.

To ensure the proper functioning of the EL wires and neon tube, I constructed individual circuits for each component and tested them separately. Once each circuit was working correctly, I combined them into a single board and wrote the necessary code to control the motion and lighting effects. This step allowed me to achieve the blinking and fading motion. 

In terms of the physical construction, I began by sketching the design for the broken heart part of the sculpture. Using a Dremel tool, I carefully cut out the broken pieces, creating the desired shape. I then engraved lines along the fractures to guide the placement of the EL wires. The wires were glued in a pattern resembling veins, further highlighting the visual representation of the repaired fractures.

For the top part of the sculpture, I initially experimented with different angles and positions for the neon tube. I then discovered that the tube in a hanging position created a heart shape when illuminated. Given that the neon tube emitted a pink light, which symbolises love and the heart, this shape of the heartfelt particularly fitting to my concept.

Once all the individual components were completed, I felt that something was missing and to add a final touch, I created drips using hot glue guns. Each drip was carefully crafted and allowed to dry before being attached to the sculpture. Then by placing these drips, I achieved a sense of balance and visual interest, while also creating a connection between the drips and the neon tube.

To fully experience the project, the audience should stand in front of the sculpture and allow themselves to be wrapped by the soft pink glow emitted by the neon tube. They can appreciate the interplay between the illuminated broken parts, the symbolism of Kintsugi, and the transformative power of love. The combination of light, shape, and symbolism invites contemplation and reflection on the beauty found within brokenness and the potential for love to both break and heal.

Presentation

During the presentation, I tried not to over-explain, allowing the audience to form their own interpretations. Those familiar with the concept of kintsugi appreciated the symbolism, while others found their own unique meanings. While the overall reception was positive, the presentation could have benefited from a quieter space. One interesting aspect was the wide range of interpretations and emotional responses from the audience like the shape and colour of the neon tube, the motion of the EL wires blinking was likened to a beating heart, and the drips were interpreted as tears from the eyes.

Conclusion

The process of researching, creating, and executing this project was both challenging and rewarding. I learned that translating an idea from imagination to reality requires attention to detail and a willingness to iterate and make adjustments along the way. I needed to start early and dedicate a lot of time to the project, allowing me to refine the design and work on the fabrication and electrical aspects later.

One of the most important lessons I discovered was the need to balance self-satisfaction with external expectations. While it was essential for me to create a piece that fulfilled my artistic vision, I also recognised the importance of giving yourself a compliment for what you did. In terms of areas for improvement, I would explore ways to hide the wires more effectively, perhaps by making them longer and concealing them in unnoticeable areas of the sculpture. Additionally, I believe there is room for further experimentation and refinement in coding the motion and lighting effects of the project. Overall, this project was a valuable learning experience that challenged me both technically and artistically. It taught me the importance of patience, attention to detail, and self-appreciation. 

Categories
KINETIC LIGHT

Assignment 2

Our second assignment was inspired by Thomas Wilfred’s Lumia Suite, Opus (1963-1964), a beautiful artwork that uses a translucent glass screen to project light, creating a galaxy-like and dreamy reflection.

To recreate this effect, we used two halogen lamps as our light sources and crafted two reflective surfaces using lustrous tinted paper. We first constructed Arduino circuits and soldered the halogen lamps to longer wires then plugged them into the breadboard and used a 12V power supply to light up the lamps. With the circuits complete, we proceeded to the final step by arranging the lamps and reflective boards on the desk, we positioned them in such a way that their reflections would be projected onto the wall. Thus, we programmed the lamps to alternate their brightness, so that when one lamp reached its maximum luminosity, the other would fade into darkness.

While we encountered minor challenges during the process, like the reflection wasn’t as bright as we had initially hoped due to the lamps illuminating the wall, we still managed to get our original vision. 

Categories
KINETIC LIGHT

Assignment 1

LED Standing Lamp

This project was inspired by the fireworks and I wanted to make a standing LED lamp with firework motion. Me and my partner used an LED strip for the main body with an 8×8 LED matrix on top. It starts as a white light going up slowly and then colourful LED groups start blowing up to the top and then the whole lamp becomes colourful to represent the firework. 

Introduction:
This Firework-Inspired Standing LED Lamp combines the beauty of fireworks with the functionality of an LED strip and an 8×8 LED matrix. The lamp begins with a gentle ascent of white light, followed by vibrant LED groups bursting towards the top, and then transforming the entire lamp into a colourful representation of a firework.

Components:
1. LED Strip: it serves as the primary body of the lamp. 

2. 8×8 LED Matrix: Positioned on top of the LED strip, the 8×8 LED matrix adds an extra layer of visual appeal to the lamp. 

Categories
KINETIC LIGHT

PROJECT 1: MAGIC GLOVES

Title: Magic Gloves

Project Description / Introduction: 

My project is a glove designed to alter the sense of touch by preventing the wearer from feeling the actual textures of the materials they touch. Inspired by silicone dishwashing gloves, I wanted to create a playful experience and by wearing the glove, the user’s fingers are isolated and unable to perceive the true textures, thus distorting their tactile perception. This project intends to explore the “malleability” of our sensory perception and challenge our reliance on touch to understand our environment.

Perspective and Context:

My project aligns with the concepts of art and perception, particularly with the interplay between the mind and the senses. As stated by Irwin in his writings, “Our minds direct our senses every bit as much as our senses inform our minds. Our reality in time is confined to our ideas about reality. ” (Irwin 24) This idea suggests that our perception of the world is not only determined by the external stimuli we encounter but also by the interpretations that happen in our minds. Thus, by altering the tactile experience, the gloves disrupt the direct correspondence between touch and the perception of texture. The wearer’s mind is persuaded to fill in the gaps, relying on preconceived notions to make sense of the objects they touch.

Lastly, the project invites individuals to question the limitations of their own perceptions and the role of sensory experiences in shaping their understanding of reality because it prompts a deeper exploration of how our perceptions are constructed and how they influence our relationship with the world. Through this artistic intervention, I intend to provoke reflection and dialogue about the intricate relationship between the mind, the senses, and the construction of our subjective realities.

Development & Technical Implementation:

The process of making my project involved a combination of research, experimentation, and remaking multiple gloves. I began by exploring ways to manipulate the sense of touch with various prototypes and it involved asking my friends to try it to gather feedback and improve the glove.

I also tried different approaches such as sewing different sizes of gloves and adding more layers or textures inside the glove. As a result, the wearer is unable to accurately perceive the true textures of the objects. To interact with the project, a person simply puts on the glove and explores the different textures or surfaces. They can touch and feel the textures or engage in sensory movements such as shaking hands.

Presentation:

During the presentation, I began by giving a short introduction to my project, explaining how the gloves work. I allowed my classmates to try the gloves themselves, which led to initial confusion as they realised they couldn’t feel the textures of the materials. It was at this point that I clarified that the inability to feel the textures was the intended concept behind the project.
As more people tested the gloves, I realised that despite creating two different sizes, they were still too small for some individuals. This realisation highlighted the importance of considering a diverse range of users should be able to interact with my future projects.

Conclusion:

During this project, I have learned valuable lessons about the interplay between art, perception, and design. I discovered the complexity of altering tactile perception and the challenges of creating a glove that effectively distorts the sense of touch. While the concept of the project was well-received, I realised that the sizing of the gloves was not suitable for all individuals, pointing out the importance of considering inclusivity in the future.

I succeeded in creating an interactive experience for my peers and witnessing their curiosity and fascination was a rewarding outcome of the project. Hence, I would like to improve the functionality and accessibility of the gloves as well as be interested in exploring different materials and textures to further enhance the disconnection between touch and perception.

Categories
KINETIC LIGHT

Reading responses

Readings:

Jack Burnham’s chapter on Light as Sculpture Medium from Beyond Modern Sculpture (1969)

Robin Clark’s introduction to the exhibition Phenomenal: California Light, Space, Surface (2011)

Dawna Schuld’s accompanying essay Practically Nothing: Light, Space, and the pragmatics of Phenomenology (2011)

In the first reading, Burnham states that light possesses unique qualities that make it an ideal medium for sculpture. Unlike traditional sculptural materials, light can define and transform space, creating temporary and dynamic sculptural forms. Thus, I found Laszlo Moholy-Nagy’s light-space modulator an interesting piece within the context of Light and Space simply because the sculpture was made to exist as a three-dimensional object in its own right, rather than solely a means of creating projected lights.

Title: Light Prop for an Electric Stage (Light-Space Modulator; Lichtrequisit einer elektrischen Bühne)
Artist: László Moholy-Nagy 
Date: 1930


The idea of intentionally disrupting a viewer’s sensory experience for a more genuine and authentic reaction is a recurring theme in the readings. Robin Clark’s book, “Phenomenal: California Light, Space, Surface,” discusses how artists like Bruce Nauman allow viewers to physically engage with their works, giving them an active role as performers in the exhibition.

Title: Green Light Corridor
Artist: Bruce Nauman
Created: 1970

Similarly, Schuld’s book emphasises how artists such as Irwin, Wheeler, Nordman, and Turrell create artworks that act as experiential webs, inviting viewers to immerse themselves. Through these readings, I learned that experience is knowledge, as emphasised by Schuld as artists must let audiences carry the experience with them after encountering their projects. 

Title: Seu corpo da obra (Your Body of Work)
Artist: Olafur Eliasson
Created: 2011

 

Categories
INTERACTON LAB

Processing code

import processing.sound.*; import processing.serial.*; int endTime; // Variable to store the end time int startTime; SoundFile sound1; SoundFile sound2; Serial serialPort; boolean gameEnded = false; float characterSize = 150; // Size of the character square float characterX, characterY; // Position of the character float characterSpeed = 25; // Speed of the character (increase this value for faster speed) float bubbleSize = 200; // Size of the bubbles float bubbleSpeed = 3; // Speed of the bubbles int numBubbles = 20; // Number of bubbles int score = 0; // Player's score float[] bubbleX; // Array to store bubble positions float[] bubbleY; // Array to store bubble positions String[] words; // Array to store bubble text float[] starX = new float[3]; float[] starY = new float[3]; float[] starSpeed = new float[3]; boolean openingScene = true; // Flag to indicate if the opening scene is being displayed PImage Image2;  ArrayList<String> chosenWords = new ArrayList<String>(); void addChosenWord(String word) { chosenWords.add(word); } void setup() { fullScreen(); characterX = width / 2; characterY = height / 2; PImage Image; Image = loadImage("star.png"); // Load star image Image2 = loadImage("galaxy.jpg"); sound1 = new SoundFile(this, "arcade_sound.wav" ); sound2 = new SoundFile(this, "drive.mp3"); sound2.loop(); bubbleX = new float[numBubbles]; bubbleY = new float[numBubbles]; words = new String[numBubbles]; for (int i = 0; i < numBubbles; i++) { bubbleX[i] = random(width); // Randomize starting X position bubbleY[i] = -bubbleSize * i; // Set starting Y position above the screen //bubbleText[i] = "Text " + i; // Set bubble text words[0] = "CREATIVE"; words[1] = "MINDFUL"; words[2] = "RELAXED"; words[3] = "EXPLORE"; words[4] = "TRAVEL MORE"; words[5] = "HEALTH"; words[6] = "HUMBLE"; words[7] = "PRODUCTIVE"; words[8] = "FORGIVE"; words[9] = "CONSISTENT"; words[10] = "HAVE FUN"; words[11] = "EMBRACE"; words[12] = "BE BRAVE"; words[13] = "APPRECIATE"; words[14] = "BALANCE"; words[15] = "INSIPRE"; words[16] = "IMPROVE"; words[17] = "BRIGHT"; words[18] = "SELF-LOVE"; words[19] = "FIND LOVE"; } String portName = "/dev/cu.usbmodem14201"; // Specify the correct port name int baudRate = 9600; // Must match the Arduino baud rate serialPort = new Serial(this, portName, baudRate); } void draw() { if (openingScene) { displayOpeningScene(); } else { playGame(); } //println(millis()); } void displayOpeningScene() { background(0, 0, 51); // Set dark blue background for (int i = 0; i < 100; i++) { float x = random(width); float y = random(height); float starSize = random(10, 15); float alpha = random(150, 255); fill(255, 255, 0, alpha); noStroke(); ellipse(x, y, starSize, starSize); } float shootingStarX = -1000; float shootingStarY = random(height / 2); float shootingStarSpeed = random(5, 10); shootingStarX += shootingStarSpeed; shootingStarY += shootingStarSpeed / 2; // Draw shooting star fill(255, 255, 0); noStroke(); triangle(shootingStarX, shootingStarY, shootingStarX - 50, shootingStarY - 20, shootingStarX - 50, shootingStarY + 20); // Set text properties fill(254, 255, 70); textAlign(CENTER, CENTER); textSize(110); float textX = width / 2; float textY = height / 2; text("CHOOSE YOUR 2024 GOAL", textX, textY); if (millis() > 18000) { openingScene = false; } } void playGame() // Resize the background image to match the full screen size { Image2.resize(displayWidth, displayHeight); // Set the resized image as the background background(Image2); // Rest of your code... // Rest of your code... fill(#6B9EB4); rectMode(CENTER); rect(characterX, characterY, characterSize, characterSize); for (int i = 0; i < 100; i++) { float x = random(width); float y = random(height); float starSize = random(3, 6); float alpha = random(150, 255); fill(255, 255, 0, alpha); noStroke(); ellipse(x, y, starSize, starSize); } float shootingStarX = -1000; float shootingStarY = random(height / 2); float shootingStarSpeed = random(5, 10); shootingStarX += shootingStarSpeed; shootingStarY += shootingStarSpeed / 2; fill(255, 255, 0); noStroke(); triangle(shootingStarX, shootingStarY, shootingStarX - 50, shootingStarY - 20, shootingStarX - 50, shootingStarY + 20); // Draw stars for (int i = 0; i < numBubbles; i++) { fill(#FEFF46); drawStar(bubbleX[i], bubbleY[i], bubbleSize); bubbleY[i] += bubbleSpeed; // Move the star downwards // Check if the star has reached the bottom of the screen if (bubbleY[i] > height + bubbleSize / 2) { fill(255); bubbleX[i] = random(width); // Randomize X position bubbleY[i] = -bubbleSize; // Reset Y position above the screen } // Check collision with the character if ((dist(characterX, characterY, bubbleX[i], bubbleY[i]) < characterSize / 2 + bubbleSize / 2) && !gameEnded) { score++; addChosenWord(words[i]); fill(255); bubbleX[i] = random(width); // Randomize X position bubbleY[i] = random(-bubbleSize*2, -height*2); // Reset Y position above the screen sound1.play(); } // Display text inside stars fill(0); textAlign(CENTER, CENTER); textSize(30); text(words[i], bubbleX[i], bubbleY[i]); } // Display score fill(255); textAlign(LEFT); textSize(80); text("Word counts: " + score, 30, 80); // Read serial data from Arduino while (serialPort.available() > 0) { String data = serialPort.readString().trim(); if (data.equals("1")) { characterX -= characterSpeed; // Move character to the left } else if (data.equals("0")) { characterX += characterSpeed; // Move character to the right } } characterX = constrain(characterX, characterSize / 2, width - characterSize / 2); characterY = constrain(characterY, characterSize / 2, height - characterSize / 2); // Check if the game should end if (score >= 10) { if (endTime == 0) { endTime = millis() + 2000; // Set the end time 2 seconds (2000 milliseconds) from now } else if (millis() >= endTime) { endGame(); // Call the endGame() function when the specified time has elapsed } } } void drawStar(float x, float y, float size) { float angle = TWO_PI / 10; float halfAngle = angle / 2.0; float radius1 = size / 2.0; float radius2 = radius1 / 2.5; beginShape(); for (float a = 0; a < TWO_PI; a += angle) { float sx = x + cos(a) * radius1; float sy = y + sin(a) * radius1; vertex(sx, sy); sx = x + cos(a + halfAngle) * radius2; sy = y + sin(a + halfAngle) * radius2; vertex(sx, sy); } endShape(CLOSE); } void endGame() { sound1.stop(); gameEnded = true; background(#000033); // Set dark blue background for (int i = 0; i < 3; i++) { starX[i] = random(width); starY[i] = random(height); starSpeed[i] = random(3, 6); } for (int i = 0; i < 3; i++) { starX[i] += starSpeed[i]; if (starX[i] > width) { starX[i] = 0; starY[i] = random(height); starSpeed[i] = random(3, 6); } float starSize = random(10, 20); float alpha = random(100, 200); fill(#FFFF66, alpha); ellipse(starX[i], starY[i], starSize, starSize); } fill(#FEFF46); textAlign(CENTER, CENTER); textSize(95); text("YOU GAINED "+ score + " AFFIRMATIONS ", width / 2, height / 5); textSize(70); text("MAY ALL YOUR WISH COME TRUE IN 2024", width / 2, height / 2); String[] tempwordlist = chosenWords.toArray(new String[chosenWords.size()]); String combinedString = join(tempwordlist," "); text(combinedString, width/2,height/1.5); } void keyPressed() { if (keyCode == 32) { // Space bar key code if (openingScene) { openingScene = false; // Start the game here } else { openingScene = true; // Restart the game here score = 0; chosenWords.clear(); // Clear the chosenWords list for (int i = 0; i < numBubbles; i++) { bubbleX[i] = random(width); bubbleY[i] = -bubbleSize * i; } startTime = millis(); } } } void endGame2() { if (openingScene) { // Display the opening scene background(0); fill(255); textSize(50); textAlign(CENTER, CENTER); text("Game Over", width / 2, height / 2 - 100); text("Score: " + score, width / 2, height / 2); text("Press SPACE to restart", width / 2, height / 2 + 100); } else { // Ending scene with chosen words background(Image2); fill(#6B9EB4); rectMode(CENTER); rect(characterX, characterY, characterSize, characterSize); // Display the chosen words in a list fill(255); textSize(20); textAlign(LEFT, TOP); float wordListX = 30; float wordListY = 150; for (int i = 0; i < chosenWords.size(); i++) { text(chosenWords.get(i), wordListX, wordListY + i * 30); } for (int i = 0; i < 100; i++) { float x = random(width); float y = random(height); float starSize = random(3, 6); float alpha = random(150, 255); fill(255, 255, 0, alpha); noStroke(); ellipse(x, y, starSize, starSize); } float shootingStarX = -1000; float shootingStarY = random(height / 2); float shootingStarSpeed = random(5, 10); shootingStarX += shootingStarSpeed; shootingStarY += shootingStarSpeed / 2; fill(255, 255, 0); noStroke(); triangle(shootingStarX, shootingStarY, shootingStarX - 50, shootingStarY - 20, shootingStarX - 50, shootingStarY + 20); // Draw stars for (int i = 0; i < numBubbles; i++) { fill(#FEFF46); drawStar(bubbleX[i], bubbleY[i], bubbleSize); bubbleY[i] += bubbleSpeed; // Move the star downwards // Check if the jstar has reached the bottom of the screen if (bubbleY[i] > height + bubbleSize / 2) { fill(255); bubbleX[i] = random(width); // Randomize X position bubbleY[i] = -bubbleSize; // Reset Y position above the screen } // Check collision with the character if ((dist(characterX, characterY, bubbleX[i], bubbleY[i]) < characterSize / 2 + bubbleSize / 2) && !gameEnded) { score++; fill(255); bubbleX[i] = random(width); // Randomize X position bubbleY[i] = random(-bubbleSize*2, -height*2); // Reset Y position above the screen sound1.play(); } // Display text inside stars fill(0); textAlign(CENTER, CENTER); textSize(30); text(words[i], bubbleX[i], bubbleY[i]); } // Display score fill(255); textAlign(LEFT); textSize(80); text("Word counts: " + score, 30, 80); // Read serial data from Arduino while (serialPort.available() > 0) { String data = serialPort.readString().trim(); if (data.equals("1")) { characterX -= characterSpeed; // Move character to the left } else if (data.equals("0")) { characterX += characterSpeed; // Move character to the right } } characterX = constrain(characterX, characterSize / 2, width - characterSize / 2); characterY = constrain(characterY, characterSize / 2, height - characterSize / 2); if (score >= 10) { if (endTime == 0) { endTime = millis() + 2000; // Set the end time 2 seconds (2000 milliseconds) from now } else if (millis() >= endTime) { endGame(); // Call the endGame() function when the specified time has elapsed } } } }