Table of Contents

Chapter 1 Introducing HTML5

Beyond Basic HTML

JavaScript

AJAX

Bridging the Divide

Google Gears

Chrome Frame

Getting Things Done with WebSockets and Web Workers

WebSockets

Web Workers

Application Cache

Database API

WebSQL API

IndexedDB API

Web Storage

Geolocation

Getting Users’ Attention with Notifications

Requesting Permission to Display Notifications

Creating Notifications

Interacting with Notifications

Media Elements

Controlling Media

Handling Unsupported Formats

HTML5 Drawing APIs

Canvas

SVG

WebGL

Conveying Information with Microdata

Chapter 2 Setting Up Your Development Environment

Development Tools

Installing Java

Installing the Eclipse IDE and Google Plugin

Google Web Toolkit

Web Server Tools and Options

Google App Engine

Opera Unite

Node.js and RingoJS

Browser Tools

Inside the Chrome Developer Tools

Chrome Extensions

Safari Developer Tools

Firebug

HTML5 Tools

ProcessingJS

Inkscape

SVG-edit

Raphaël

3D Modeling Tools

Blender

Chapter 3 Learning JavaScript

What Is JavaScript?

JavaScript’s Basic Types

Understanding Arithmetic Operators

Understanding JavaScript Functions

Functions as First-class Objects

Comparison Operators

Conditional Loops and Statements

Controlling Program Flow with Loops

Delayed Execution with setTimeout and setInterval

Creating Complex Objects with Inheritance and Polymorphism

Making Inheritance Easier with the Prototype Library

Learning JQuery

Manipulating the DOM with Selectors

JQuery Events

AJAX with JQuery

Cross-Site Scripting

JSON: The Other JavaScript Format

JavaScript Outside of the Browser

Mobile Platforms

JavaScript as an Intermediary Language

JavaScript on the Desktop

Server-Side JavaScript

Chapter 4 How Games Work

Designing a Game

Writing a Basic Design Document

Deciding on a Game Genre

The Game Loop

Getting Input from the User

Representing Game Objects with Advanced Data Structures

Making Unique Lists of Data with Sets

Creating Object Graphs with Linked Lists

Understanding the APIs in Simple Game Framework

Core API

Components API

Resources API and Networking APIs

Building Pong with the Simple Game Framework

Setting Up the Application

Drawing the Game Pieces

Making Worlds Collide with Collision Detection and Response

Understanding Newton’s Three Laws

Making the Ball Move

Advanced Collision Detection and Particle Systems with Asteroids

Creating Competitive Opponents with Artificial Intelligence

Adding AI to Pong

Advanced Computer AI with Tic-Tac-Toe

Chapter 5 Creating Games with the Canvas Tag

Getting Started with the Canvas

Drawing Your First Paths

Drawing Game Sprites for Tic-Tac-Toe

Drawing Objects on the Canvas with Transformations

Ordering Your Transformations

Saving and Restoring the Canvas Drawing State

Using Images with the Canvas

Serving Images with Data URLs

Serving Images with Spritesheets

Drawing Images on the Canvas

Animating Objects with Trident.js

Creating Timelines

Animating with Keyframes

Creating Nonlinear Timelines with Easing

Animating Game Objects with Spritesheets

Simulating 3D in 2D Space

Perspective Projection

Parallaxing

Creating a Parallax Effect with JavaScript

Creating Copy Me

Drawing Our Game Objects

Making the Game Tones

Playing MIDI Files in the Browser

Playing Multiple Sounds at Once

Playing Sounds Sequentially

Drawing Our Game Text

Styling Text with CSS Fonts

Chapter 6 Creating Games with SVG and RaphaëlJS

Introduction to SVG

First Steps with RaphaëlJS

Setting Up Our Development Environment

Drawing the Game Board

Drawing Game Text

Custom Fonts

Specifying Color

Loading Game Assets

Converting SVG Files to Bitmap Images

Creating Our Game Classes

Shuffling Cards

Drawing and Animating Cards

Creating Advanced Animations

Paths

moveto and lineto

curveto

Exporting Paths from an SVG File

Animating Along Paths

Extending Raphaël with Plugins

Adding Functions

SVG Filters

Speed Considerations

Chapter 7 Creating Games with WebGL and Three.js

Moving to Three Dimensions

Giving Your Objects Some Swagger with Materials and Lighting

Understanding Lighting

Using Materials and Shaders

Creating Your First Three.js Scene

Setting Up the View

Viewing the World

Loading 3D Models with Three.js

Programming Shaders and Textures

Using Textures

Creating a Game with Three.js

Simulating the Real World with Game Physics

Revisiting Particle Systems

Creating Scenes

Selecting Objects in a Scene

Animating Models

Sourcing 3D Models

Benchmarking Your Games

Checking Frame Rate with Stats.js

Using the WebGL Inspector

Chapter 8 Creating Games Without JavaScript

Google Web Toolkit

Understanding GWT Widgets and Layout

Exposing JavaScript Libraries to GWT with JSNI

RaphaëlGWT

Adding Sound with gwt-html5-media

Accessing the Drawing APIs with GWT

CoffeeScript

Installing CoffeeScript

Compiling CoffeeScript Files

A Quick Guide to CoffeeScript

Basics

Functions and Invocation

Aliases, Conditionals, and Loops

Enhanced for Loop and Maps

Classes and Inheritance

Alternate Technologies

Cappuccino

Pyjamas

Chapter 9 Building a Multiplayer Game Server

Introduction to Node.js

Extending Node with the Node Package Manager

Managing Multiple Node Versions

Making Web Apps Simpler with ExpressJS

Serving Requests with URL Routing

Managing Sessions

Understanding the ExpressJS Application Structure

Templating HTML with CoffeeKup

Persisting Data with Caching

Managing Client/Server Communication

Communicating with Socket.IO

Setting Up a Simple Socket.IO Application with Express

Making Web Sockets Simpler with NowJS

Debugging Node Applications

Creating a Game Server

Making the Game Lobby

Creating Game Rooms with NowJS Groups

Managing Game Participants and Moving Between Game Rooms

Managing Game Play

Chapter 10 Developing Mobile Games

Choosing a Mobile Platform

iOS

Android

WebOS

Windows Phone 7

Flick, Tap, and Swipe: A Quick Guide to Mobile Gestures

Deciding Between an Application and a Website

Storing Data on Mobile Devices

Relaxing in Your Lawnchair: An Easier Way to Store Data

Getting Started with Lawnchair

Client-Side Scripting Simplified with JQuery and Zepto

Using JQuery Variants

Using Zepto.js

Architecting Your Applications with JoApp

Choosing an Application Framework

PhoneGap

Diving into the PhoneGap APIs

Appcelerator Titanium

Diving into the Appcelerator Titanium APIs

Packaging Android Applications with Titanium and PhoneGap

Packaging an Application with Titanium

Packaging an Application with PhoneGap

Chapter 11 Publishing Your Games

Optimizing Your Game’s Assets

Minification with Google Closure Compiler

Running Applications Offline with Application Cache

Hosting Your Own Server

Deploying Applications on Hosted Node.js Services

Publishing Applications on the Chrome Web Store

Describing Your Application’s Metadata

Deploying a Hosted Application

Deploying a Packaged Application

Testing Your Applications Locally

Uploading Your Application to the Chrome Web Store

Configuring Your Application

Deciding Between Packaged and Hosted Chrome Apps

Publishing Applications with TapJS

Creating a TapJS Application

Packaging an Application for TapJS

Publishing a TapJS Application to Facebook

Publishing Games with Kongregate

Publishing HTML5 Applications to the Desktop

Index

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.13.76