20.03.2013 Views

Introduction to Computer Science with Scratch and App Inventor

Introduction to Computer Science with Scratch and App Inventor

Introduction to Computer Science with Scratch and App Inventor

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Mole Mash Game<br />

To learn <strong>App</strong> Inven<strong>to</strong>r, we are going <strong>to</strong> step through one of the Google tu<strong>to</strong>rials <strong>to</strong> build a simple Whacka-Mole<br />

game. We’ll also add a few bells <strong>and</strong> whistles of our own. The first thing we will need <strong>to</strong> do is <strong>to</strong><br />

start <strong>App</strong> Inven<strong>to</strong>r <strong>and</strong> create a new project.<br />

A new project looks like this:<br />

This palate contains<br />

the different user<br />

interface elements<br />

that you can use in<br />

your programs<br />

The middle portion of<br />

the screen is where<br />

you lay out the<br />

interface for your<br />

application<br />

To start <strong>App</strong> Inven<strong>to</strong>r, go <strong>to</strong><br />

http://appinven<strong>to</strong>r.googlelabs.com.<br />

Click on the My Projects link at the <strong>to</strong>p of the page.<br />

Click on the new but<strong>to</strong>n in the upper<br />

left h<strong>and</strong> corner of the screen.<br />

In the dialog box that opens, give your<br />

new game a name. I will call mine<br />

MoleMash*<br />

This section shows you a<br />

list of the components <strong>and</strong><br />

media items that have<br />

already been added <strong>to</strong> your<br />

project.<br />

Here you can see <strong>and</strong><br />

change the properties of an<br />

individual interface<br />

component<br />

*The name that I gave my game might look a little funny. I wrote “Mole Mash” <strong>with</strong> no spaces, <strong>and</strong> I capitalized the first letter<br />

of each word. This kind of formatting is called camel case. Camel case is used extensively in programming for naming different<br />

parts of projects. When you learn a new programming language it is always important <strong>to</strong> learn the conventions (like camel case)<br />

that programmers use in that language. It is also important <strong>to</strong> learn whether a language is case sensitive. In some languages<br />

MoleMash, molemash <strong>and</strong> MOLEMASH would all be the same thing – those are case insensitive languages. In other languages<br />

each different combination of upper/lowercase letters would name a distinct entity.<br />

mbrace Game Development Workbook Page 34

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!