My First Baseball Game

Well it’s certainly getting to that point where ICM is a challenge. I think the difficulty I’m having with it is that I am just overwhelmingly anxious about it yet when I try to pinpoint what specifically I am anxious about, I can’t. I was explaining it to my friend Patrick this way: when I eat lunch I eat my sandwich, then my chips, then my dessert. I don’t understand those people who eat chips while they’re eating those sandwich and I have a severe disdain for those monsters who put chips ON their sandwich and that’s what coding is. I understand for loops and if statements and Boolean variables independent from one another but when you put all of them in a sandwich? Uh-uh.

I decided the best way to deal with my anxiety about all of this was to start simple…keep it rudimentary, ya know. So that explains my first sketch. I originally wanted it to be people watching TV and when you clicked on the television, it turned on to show Dan-O’s face. I was getting way too stressed and not getting to my other assignments so I decided to simplify it. Instead of focusing on mousePressed or anything like that, I just kept it simple with if statements. I felt pretty confident about inserting images so I decided to put Dan-O’s face in there to try and somewhat keep with my theme.

My second sketch was one I was really proud of and one that…sort of let things click in my mind. I was taking a break from ICM and watching the end of the Orioles game. It was the top of the 9th, man on first against a division rival who we needed to beat to stay alive in the playoff race. My favorite Oriole, Hyun Soo Kim, came up to bat with a man on first down by a run, and then BAM a two run shot to right center field. I decided I had to commemorate this moment in code. I started with an image behind home plate. I inserted some variables – something I felt shaky doing – and figured out logically how to make what I wanted to make. I threw in some if statements and as I was doing so was like….man, I can make a game of my own. So I inserted a mousePressed function that made the ball appear to be hit when the mouse was clicked. To make it more difficult, I decreased the range in which you could “swing” (read: click). I also figured I needed to add sound so I used the reference library but couldn’t get it quite right. Thanks to Matt and Kat, I was able to realize my issue: I was doing function preload twice.

For the last sketch…it was sort of a failure but I figured it was a good learning experience. I used a for loop to set up my images but I want them to be able to switch places (pink on bottom, blue on top…how risqué), when mousePressed is clicked but I can’t figure out how to do it for the life of me.

Leave a Reply

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