Final Project summary

For my final project, I set out to create a game that would teach people how to recycle. I think that at the end, I’m pretty satisfied with the outcome and feel that I’ve accomplished most of what I wanted to do. I think one of the things that was successful in the project was the serial communication between the “Arduino” and Processing, which itself took a week to figure out. I later went back and removed the motion sensor I had in there originally because it was too sensitive, and made do with three buttons instead. I also think I reached my goal of creating a game that was both educational and visually appealing, as I spent a lot of time on the visuals to make the game pop out more. However, there are also a lot of things that I wish I had more time to do, and would like to work on moving forward. One of them is a timer function, something like a 3, 2, 1, go mechanism at the start of the game, which was pretty complex and something I didn’t quite get to. I also would’ve liked to add audio, like the sounds of objects falling, movement, background noise, etc. as I think it would’ve added a lot to the experience. Another complicated feature I would’ve liked to add is a high score board where players can enter three characters “names” and have a total of maybe 5 high scores that would stay on the end screen, even after the game is closed.

Link to sketch on OpenProcessing (though it won’t work): https://www.openprocessing.org/sketch/546197

Documentation: documentation

Final project 4/28

For my final project, I’m making a game that teaches people how to recycle. So far, I’ve finished the physical circuit that includes the microcontroller, some buttons, wires, and a lot of other components. The Arduino code is also done. In processing, I’ve added many visuals, including the main sloth character that the user controls, the table, the bins, the background and more. I’ve also implemented the score function – if the garbage object is dropped into the correct bin, then the score will go up by one. However, there are definitely still some things I need to work out. Currently, if the object is not dropped into the correct bin, the program doesn’t really register this. So, I need to add something that allows the user to see that they’ve dropped the object into the wrong bin. Although the core functionality of the program is there, I’d also like to add some animations. First, I want the sloth’s hands to open up when he’s dropping the object. If the object is dropped into the correct bin, I want the sloth to be happy; if it’s in the wrong bin, I want him to be angry. If I have time, I would really like to implement a timer, in which the user only has 5 seconds to decide which bin the object goes into, and if time runs out, then it counts as wrong.

Final Project

For my final project, I want to stick with my idea of creating a game that teaches kids how to recycle, except it will be slightly more interactive than an online flash game. The main character will be a sloth that can move across the screen from left to right, controlled by the user. 3 bins – trash, recycling, and compost – are on the bottom of the screen. Throughout the game, a random object will be given to the user, who has to decide which bin it goes into. For example, if the item is a water bottle, it should go into the recycling bin, and if the user does that correctly, the score counter increases by one. If it’s wrong, there will be an indication in the sketch that the object was dropped in the wrong bin. To make this sketch, I’ll be using serial communication between Arduino and Processing. The Arduino will have 3 inputs: 2 buttons and a PIR motion sensor. The buttons will move the sloth either left or right, and activating the motion sensor will drop the object into the bin. I’ll also be using the sprite library in Processing to animate the sloth when doing certain actions, such as opening his hands when dropping an object or being annoyed if he gets one wrong.

Interface design for clarification:

Final Project Inspiration

For my final project, I want to use the p5js library p5.play to make a game. I don’t have an concrete idea about what exactly I’d like to make, but I think I want to create a game that teaches children how to recycle. I found a sketch on openprocessing, a pong game that someone created using p5.play. Basically, it works like traditional pong, where there are 2 paddles on either side and a ball bouncing from side to side, except in this sketch the user controls both paddles and tries to get as many hits as possible. I think this is a great example of a game created with p5.play, and there a couple elements in it that I can see myself incorporating into my own game. For example, the paddles are mapped to the mouse, so they followed the mouse up and down no matter where it is on the x-axis. For my game, I want to have a character in the middle who is mapped to the mouse, so that the character is able to move from side to side and drop items into either a trash, recycling, or compost bin. I also really like the simplicity of the pong game, as there aren’t too many interactive elements that might confuse the user. I want to employ the same simplicity into my own sketch, but also make it visually appealing and fun to interact with. Similar to the hit counter in the middle of the pong sketch, I’ll probably try to create some sort of counter to keep track of points when the user puts an item in the correct bin.

For my project, I’ve started looking through some examples on the p5.play website, and think I’ll have to create some sprite animations for the final result. So, when I actually start creating my game, I’ll first have to figure out which parts need to be animated so I can draw those first, and then start the coding process, which I still haven’t quite thought through.

Pong sketch:

-https://www.openprocessing.org/sketch/518779-

Library

I was looking through the libraries on the p5.js website and was having a hard time deciding between p5.bots and p5.play. I am really interested in working with Arduino, controlling sensors, motors, and LEDs, but I also love to illustrate and animate, which is why I think I want to work with p5.play. I’ve always been interested in animation/game development, and would really like to create a game in the future with this library.

Data post

For the data sketch, I found an API from the GitHub list that listed threats to the Atlantic Puffin. There was a lot of information in there that I could use, but I really just wanted to represent the threats to the puffin in a visual way. So the information I used was the “name” of the animal and the “title” of each one of the threats. Other data included timing, scope, severity, among others, which were mostly classified as “Unknown,” which I didn’t think would fit in my sketch. I counted 17 threats listed in the API, but I only chose 9 that I thought could be represented in an aesthetically pleasing manner. Also, some threats were ambiguous and couldn’t be incorporated into the sketch, such as “Other impacts”, and “Type Unknown/Unrecorded.” In the end, I created visuals for the puffin and 9 of its threats. I placed the puffin on the left and pulled the name from the API and placed it right under. On the right side, I created 3 sets of ellipses, each of which would randomly changed into 1 of 3 different threats every time the sketch is reloaded, for a total of 9 threats.

Openprocessing link:

API Link:

http://apiv3.iucnredlist.org/api/v3/threats/species/name/Fratercula%20arctica/region/europe?token=9bb4facb6d23f48efbf424bb05c0c1ef1cf6f468393bc745d42179ac4aca5fee

Learning Processing Reflection

After reading sections from Learning Processing, I feel like I have a better sense of how to approach programming. I think if I read this before I started working on my midterm project, I definitely would have tried to utilize the methods of breaking down my problems into smaller, more manageable chunks. I was probably already using some of these methods in my head, just without realizing it. The debugging chapter was also very useful, and some of the tips are things that I’ve already been doing, again without realizing how practical they really are. Whenever I encounter a problem, I try to step away for a while, or talk it out to myself or a friend to find the issue. I think I don’t do enough simplifying or enough println(), so if I knew about these tips before starting my project, it’s possible that some of the problems I had could’ve been solved more quickly and efficiently. Overall, I think this was a very valuable read and gave me a new perspective on how to write and debug my code.