Thursday, January 7, 2010

Sorting Bottles and Boxes with Processing

(Click the link at the bottom to see the game.)

One of my classes this term (a game design grad course) requires the use of Processing:
Processing is an open source programming language and environment for people who want to program images, animation, and interactions. It is used by students, artists, designers, researchers, and hobbyists for learning, prototyping, and production. It is created to teach fundamentals of computer programming within a visual context and to serve as a software sketchbook and professional production tool.
Instead of concentrating on the complete picture of how to develop a game (we have a whole stream for that), we will be thinking about design. We will be talking about things like the theory of fun, ideas for boosting our creativity, and coming up with new and interesting game mechanics. So instead of creating traditional large games, we are going to have a few design challenges, where we have one week to make a game that meets the challenge requirements. These assignments will be done in Processing.

On the first day of class (Tuesday), our prof said he wanted us to download Processing, learn it, and make a game by the next class (Thursday). Seriously. Hm.

It turns out that this was pretty easy to do. I had used Processing for one assignment in the past, but didn't know it well. But because I already know how to program, it was super easy to get started. I did some reading review for an hour, and then jumped into a simple game idea.

The concept is to sort stuff. It's actually inspired the sorting activity from CS Unplugged. You have eight bottles and boxes at the bottom and a scale in the middle. You have to put the items in order from lightest to heaviest, but you don't know what's inside them, so you can't go by size alone. You can put two items on the scale and see which one is heavier. The "game" is in finding the technique you decide to use to sort the bottles with the help of the scale. A more complex version would allow for the player to arrange the bottles on the screen in whatever way they want, but for now you'd have to keep track of things on paper.

I made this game with about seven hours of coding. I had a little bug last night that I left to fix this morning, but the sleep made it very easy to find (it was fixed in about 60 seconds). I think this just goes to show how well processing has met its goal of providing a way to rapidly sketch out ideas. I'm hooked already!

0 comments:

Post a Comment

Comments are moderated - please be patient while I approve yours.