O'Reilly logo

HTML5 Game Development For Dummies by Andy Harris

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2

Talking to the User

In This Chapter

arrow Building a page with form elements

arrow Using CSS for better forms

arrow Introducing JavaScript

arrow Responding to button clicks

arrow Changing CSS elements

Although HTML and CSS are pretty cool as they are, games are really about interactivity. You can get a small amount of interactivity through hyperlinks, but for the really fun stuff, you need to write computer code.

Most people think that computer programming is a challenging skill, but it’s actually not that hard to learn. You already have everything you need to get started: a text editor and a basic web page.

Modern web browsers all have built-in support for a programming language called JavaScript. JavaScript is a reasonably easy language to learn, and it provides more than enough power for some really fun games. Here are a few key features of JavaScript:

check.png It’s a scripting language. This class of programming ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required