3D Game Programming

(C. Jardin) #1
GREAT: Star Wars
GREAT: The Empire Strikes Back
GREAT: Indiana Jones and the Raiders of the Lost Ark

We’ll see lists again in some of the later chapters.


7.6 What Makes JavaScript Different


Many things make JavaScript different from other languages, but the most
important for us is that it’s meant to be run in a browser. This means it can
do a lot of web work very easily. As we saw in Chapter 4, Project: Moving
Avatars, on page 35, JavaScript can open browser alert dialogs:

alert('Stop what you are doing and shout "Yay!"');

JavaScript is also really good at making changes in web pages. We won’t
change web pages much in this book, although we will cover the topic when
we make scoreboards in some of our games.

7.7 What’s Next


There is a lot of information in this chapter. Don’t worry if not all of it makes
sense yet. When you work through the later chapters, come back here if you
have questions. More and more of this will begin to make sense as you
progress.

The basics that we’ve covered here are like the nouns of the JavaScript lan-
guage. The functions we saw in Chapter 5, Functions: Use and Use Again, on
page 49, are like the verbs—they tell the basics what they need to do in order
to make things happen.

Speaking of making things happen, let’s get back to adding cool stuff to our
avatar!

Chapter 7. A Closer Look at JavaScript Fundamentals • 78


Prepared exclusively for Michael Powell report erratum • discuss

Free download pdf