Final Project Documentation: The Matrix: Are you the One?

My Place of Inspiration:

From the falling codes to the flying super human, the theme of my whole project is based on the movie The Matrix. When I was planning out my final project, I thought that I would include so many aspects of this movie to my project like the falling codes, the using of red and blue pill as a way for the users to continue or not continue with the game, and so many more. As I started working on my final project, I came to realize that some aspects were not possible to be integrated into the project under the provided time. And some aspects would take so much of my time, but would not be a necessary feature at all. For example, I initially wanted to create a candy box that uses two servo motors to pump out candy to the users. When I was working, I realized that it would take a lot of time, and I was not sure whether it would work the way I intended it to be. In addition, it would not play an importance role in the overall project at all. Thus, although I had so many ideas from my place of inspiration, I learned that at some point,  I need to go away ideas that would hinder the flow of my overall project.

My Project’s Journey:

I started my project by coding the falling matrix codes in processing. Although I saw many examples of falling codes that were inspired from the movie, I did not find any examples that used processing to create the falling codes. I was not sure where to start, so I kept on watching the video of the falling codes again and again to know exactly where to start. As I watched, I noticed patterns that could help me put them into codes. For instance, the length of each string of falling codes are different and each column of falling codes has only one string. These realizations gave me a starting point.

When I started coding, I had another minor issue, which was not knowing what characters to use for the falling codes. When I did some research on the falling codes from The Matrix, I found out that they used the flipped versions of the Japanese characters. I was tempted to do the same, but I was worried that it would take so much dealing with what I had no knowledge about. Then, a great idea came to me. What if I used the alphabets from my country? Just like the flipped Japanese letters, no one will know what characters, which will create the magical effect like the matrix. And it’s something I could show my friends and family when I go back for the winter. This idea really boosted me up to continue coding. Below  are my native language alphabets. I did not include all of them in my falling codes because not all of them have the same size.

After finishing the first main part of my project, I started working on the second part, which was using the falling letters to create the outline of the person standing of the camera. This part unbelievably took a long time because I approached this problem by using the changes in frame of the captured video, so I needed to deal with pixels. However, to display each character, it requires more than on pixel, so I figure out the number of pixels that I should provide for each character, so the outline of the person is understandable and the characters are big enough for the users to realize that they are characters also. If each character takes too many pixels, they will form unrecognizable outline of the person, but if I made each character too small to fix the pixel, the users would not see that those characters are letters at all. Thus, it took me quite a while to get the tuning correct.

These first two parts of the project both required a lot of time and stressed me out. It required me to be patient and test many ideas. Sometimes I felt that I did not know what I was doing, but after several testing, I got things to work the way I wanted it to be or in a way that was unexpectedly satisfying. I guessed that was the source of my energy to keep coding and finishing my project. In addition, my joy in coding kept me coding for a long time until I got certain parts of my code to function properly.

Second Part of My Project’s Journey:

Although I got my falling codes and my image manipulation to work, I still felt that it was not enough to be interactive. Of course, the users might have an enjoyable seeing the outlines of themselves in falling characters, but their attention would be kept there for a long time. For less than 30 seconds, they will lose interest and move to something else. Thus, I needed to include something else they the users can play with. And this was the reason why I decided to include a game in my project. After the users were satisfied with looking themselves on the screen, they could play a challenging game.

The game was quite simple: the users need to control the person in the game to fly, so he would not crash into buildings. When I was making this game, I kept in mind that I should make it as interactive as possible. I thought that means that I needed to include as many ways as possible to get inputs from the users, so I thought of using four switches, each for left, right, up, and down. However, when I let my friends test my game, I noticed that using four controls in this case seemed so rigid and easy for the player because the users would have full control.Thus, I changed to one switch instead, in which the users can move the character in the game up by pressing the button. As it turned out, the game became more challenging as the users tried to maintain a balance between letting the character fall into buildings or flying up too high into buildings.

Below is a demonstration of my project:

Here is a picture of the button control:

My codes:

  • Arduino code:

 

  • Processing code

 

I have attached a zip file of my codes and images  here.

Reflections on My Project:

+ Problems:

  •  Because I used so many characters and keeping through them to update their x and       y values, my laptop was lagging so much, especially when I connected to the big monitor screen. To fix this, I did not use the falling codes as the background of my game but instead use a photo of the falling codes instead. In addition, I reduced the scaled resolution of the monitor.
  • The game was quite challenging for the users because the space between the buildings were too close to each other and they got only one hit. With this, I learned the lesson that it’s a good idea to create challenging games, but not too challenging to the point where users cannot get high score. Still, some people enjoyed the challenged and were able to score really high. I fixed this problem by increasing the space between buildings, so the game became less challenging for the users.
  • I broke my Arduino one hour before the show started because I was forcing the shield onto it when I was testing the control button. I was not so worried, however, because I had back up control, which was the up key on my laptop keyboard. I learned from my midterm project that you should always have a back up plan in case something goes wrong. At the end, I got the button to work by checking out an Arduino from the IM lab.

Further Improvements

My project would be even more enjoyable if I added sound to it. I was trying to add background music to it, but I received a null exception problem. I later found out that it had to do with using mp3 file as audio file. In addition, I think there should be a better way to do the falling codes without taking so much processing power from the laptop. Without the lagging from the falling codes, I could add many more features along side my game and make them run smoothly along side each other.

In addition, it would have been better if I flipped the captured image because the camera took in the mirror image of the objects in front of it. When the users were on the one end of the monitor, they needed to look the other end to find themselves. Thus, it took a while and made them think that they did not appear on the screen.

Overall, I found the project very fun. I enjoyed looking at other people standing in front of the monitor, moving their hands up and down, looking at themselves in the big monitor screen. I enjoyed seeing themselves trying to control the character through the moving buildings, trying to get the highest score. I will further add more features and improvements to my project and keep them up to post on this blog.

 

Leave a Reply

Your email address will not be published. Required fields are marked *