PacktLib: jQuery Game Development Essentials

jQuery Game Development Essentials

Credits

About the Author

About the Reviewer

www.PacktPub.com

Preface

jQuery for Games

The way of jQuery

Moving things around

Handling of events

Associating data with DOM elements

Manipulating the DOM

Stay curious my friend!

Summary

Creating Our First Game

How does this book work?

Let's get serious – the game

Learning the basics

Initializing the game

Main loop

Collision detection

Summary

Better, Faster, but not Harder

Intervals and timeouts

Keyboard polling

HTML fragments

Avoiding reflow

Moving your sprite around using CSS Transforms

Using requestAnimationFrame instead of timeouts

Summary

Looking Sideways

Offline divs

Groups

Sprite transformation

Tile maps

Collision detection

Coding the game

Basic setup of the game screen

Object-oriented code for the player

Player control

Parallax scrolling

Creating enemies

Summary

Putting Things into Perspective

Optimizing tile maps for top-down games

Sorting the occlusion

Collision detection

The complete game

Isometric tiles

Summary

Adding Levels to Your Games

Implementing a multi-file game

Modifying our platform game

Summary

Making a Multiplayer Game

World of Ar'PiGi

Managing the player's account

Keeping the players in sync

Taking care of monsters

Summary

Let's Get Social

Creating a simple leaderboard

Making cheating harder

Integrating with Twitter

Integrating with Facebook

Summary

Making Your Game Mobile

Making your game run well on mobile devices

Touch control

Integrating our game with the springboard

Using device orientation

Using the offline application cache

Using web storage

Summary

Making Some Noise

Abstracting audio

Embedding sound

HTML5 Audio element

Web Audio API

Flash fallbacks

Generating sound effects

Summary

Index