Skip to content

Grab Them Apples:
I made a game!

For my ICM midterm, I made a game. After my Applications presentation, and other projects I was working on, I just wanted my programming midterm to be an example of what I have learned over the past 8 weeks. Holy crap, it’s only/already been 8 weeks.

So I focused on Daniel Shiffman’s Raindrop Game in chapter 10 of “Learning Processing“.

My first challenge was just creating the basic game. After checking out Shiffman’s code, and editing it so that my catcher (the mouth) stayed at the bottom of the screen, the basic issue was the speed of the apples falling. The apples, an array of objects, were randomizing their speed too slowly and at too large a threshold- so they were either falling super fast or super slow. After consulting a classmate, we changed the milliseconds between apples from 300 to 800, giving them slightly more time between drops.

My second challenge was creating a Start button that reappeared with the final score after the array was done and the game ended, and would then restart with a score of 0 when pressed again. I found out quickly that it was all about “if” and “else” statements. Oh, and booleans. I love booleans.

Here, play it for yourself: Grab Them Apples!

Basically, I feel like I understand Processing. I’m not good at it, and I don’t foresee myself writing anything from scratch any time soon, but I’m much more comfortable looking at code, and kind of even enjoy debugging. There’s a lot I’d like to do with the game- make the mouth move, add moving clouds in the background, make a High Scores list at the end, etc… but for now, I’m going to take a break from apples and try to think about my next project.

3 Comments

  1. L-whips wrote:

    High score of 400 points! Beat that internet. I have one complaint and one compliment. I’ll start with the complaint: many of my apples were halfway or more off the screen. Maybe you did this to make it more difficult. Now for the good stuff, my compliment: the noise that it makes when you eat the apple is HILARIOUS! It makes catching those little red orbs of forbidden fruit so much more satisfying.

    Wednesday, November 10, 2010 at 10:26 am | Permalink
  2. Natalie Rachel wrote:

    Liam-

    I hear you on the complaint! When changing the size of the window, something weird happened where the apples would fall out of frame- but only on the right side. The mouth also goes out of frame on the right side. I’m sure it’s just one or two lines of code that I’d need to tweak. Glad you enjoyed the noise! The sound was actually the last thing I added to the game, and I’m so glad I did. Hopefully by Thanksgiving I’ll be able to show you my work in progress for my final project. AHHH.

    Wednesday, November 10, 2010 at 10:55 am | Permalink
  3. Dad wrote:

    MADE 420 POINTS AT FIRST TRY… NOT BAD FOR AN OLD RUSTY BOY.
    HAPPY WITH THE RESULT, I DID NOT TRY AGAIN. AFRAID TO MAKE LOWER SCORE…

    Wednesday, November 10, 2010 at 4:20 pm | Permalink

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*