|
There was considerable enthusiasm about the new capabilities of HTML5, and even
suggestions that no other technologies or products are necessary to produce dynamic,
engrossing, interactive websites. That may be overstating things, but it is true the new
features are exciting. HTML is HTML5. It now is possible, using just HTML, Cascading
Style Sheets, and JavaScript, to draw lines, arcs, circles, and ovals on the screen and
specify events and event handling to produce animation and respond to user actions.
You can include video and audio on your website with standard controls, or include the
video or audio in your application exactly when and where needed. You can create forms
that validate the input and provide immediate feedback to users. You can use a facility
similar to cookies to store information on the client computer. And you can use new
elements, such as headers and footers, to help structure your documents.
This book is based on my teaching practices and past writings. Delving into the
features of a technology or general programming concepts is best done when there is a
need and a context. Games, especially familiar and simple ones, supply the context and
thus the motivation and much of the explanation. When learning a new programming
language, one of my first steps is to program the game of craps. Also, if I can build a
ballistics simulation with animation, such as the slingshot game, and make a video or
audio clip play when a specific condition occurs, I am happy. If I can construct my own
maze of walls, draw a stick figure for hangman, and store information on the player's
computer, I am ecstatic. And that’s what we do in this book. As you see how to build
these simple games, you’ll build your expertise as well. |