Hunting Game: Progress Report

 

Jin Zhang(3161758) & Siyue Liang(3165618)

Inspiration

In our previous projects, we paid more attention to the visual effects aspect. Most of our projects are a bit weak in terms of interactivity. For this final project, we decided to explore more on the physical interactions. We want to build a shooting game by using physical materials and make it realistic. Our idea is to create a shooting theme related game where the player uses a laser pointer / a toy gun to aim for the center of the targets.

 

Contextual Work

The duck hunting game:

https://www.youtube.com/watch?v=YyM6MmBM14w

 

A light sensor would be placed in the center of the target and a servo motor is attached to the base of the target.  When the player put the pointer to the center, the target would fall flat. Some of the details still need to be refined and we are still in the testing phase.

 

Materials & Techniques

  • Light sensors/pressure sensors
  • Servo motors
  • Light pointers/laser light
  • Cardboards and aluminum foil

 

Since our idea for this project is pretty different from what we did for previous projects, we might not be using any same materials or techniques as before. We are still thinking what kind of sensor should we use as switches in this game.

 

Code & Wiring

 

#include <Servo.h>

Servo servo1;

int forcevalue = analogRead(A0);   

int pos1 = 90;

 

void setup() {

Serial.begin(9600);   

servo1.attach(9); //servo at digital pin 9

//servo.write(0); //initial point for servo

 

}

 

void loop() {

 forcevalue = analogRead(A0); //attached to analog 0

 Serial.print(“Sensor value = “);

 Serial.println(forcevalue);

 

 //int value = map(reading, 0, 1023, 0, 255);

 if (forcevalue = 100){

 for (pos1 = 90; pos1 <= 180; pos1 += 30) {

 servo1.write(pos1);

 delay(1);  

 }

}

}

%e5%b1%8f%e5%b9%95%e5%bf%ab%e7%85%a7-2018-11-26-%e4%b8%8b%e5%8d%886-18-53

Work in Progress

wechatimg4015

wechatimg4017

The sensor works as a switch to control the servo motor and sound.

wechatimg4019

wechatimg4021

The value of the sensor would go from 0 and suddenly to 1023 for some reasons.  We were confused and figured that there might be something wrong with the wiring or the code.  We are still testing it and trying to find a solution for this issue.

Experiment 1: Cubical Vortex Effect – Jin Zhang & Siyue Liang

Experiment I: Cubical Vortex Effect

Jin Zhang(3161758) & Siyue Liang(3165618)

09.27.2018

Atelier I

Github Link:

https://github.com/haizaila/Experiment1

1

 

We were interested in the examples shown in class on sound controlled animation so we wanted to experiment more with it. Based on this idea, we tried to connect our 3D shapes by inputting songs or the computer microphone.

The reason we chose to work with html5 and javascript is that we had a similar lessons last year so we already learned some basic knowledge, so we are comfortable working with it.

 

This is what we made in the very beginning.  Cubes and cones are displayed from far to near by adding the z-axis.  It creates a tunnel-like shape and looks very cool.

2

 

 

Our original thought was to input an audio file and make animation react to the music.  We tried using the “loadSound” and “analyzer.getLevel” to input the music as a value for the animation.  But it didn’t work because the audio file couldn’t be loaded properly for some reason. So we went back to using “micLevel”. However, because the microphone records every tiny acoustical signal that it gets, the animation wouldn’t move as orderly because it is very easily disrupted by the outside voices.

 

 

After that, we just played around with the code more and got some of these random effects. Some of them worked and some of them did not.  Then we added a few if statements to make the shapes switch to cones when mouse is pressed, just to make it more fun and interactive.

5

6

7

We tried to change the “rotate” code in order to make the cubes and corns rotate in different angles individually. However, it could only rotate in one angle as a whole for some reasons.

 

I really liked this one because it has a cool future and space feel to it.  How we got this was we set the diameter of the cones to be equal to the mic value and when there is no sound, the cones would become these rod-like shapes.

3

 

In our final version, “micLevel” controls the stroke color, the size, and the rotating of the shapes and mouseX and mouseY controls their stroke and movement.  

8

 

It’s a really interesting process to see the changing of the result by playing with different elements.  We had a lot of fun doing this project together and we would definitely keep exploring sound interactive art.

 

 

Reference/Inspiration

This sketch is from openprocessing and it inspired us to have the idea of creating 3D effects and explore the beauty of geometrical shapes.  

We used the part for reference where a for loop was used to create shapes and translating them to different positions according to the mouse coordinates continually.

https://www.openprocessing.org/sketch/494306