Free Sample
+ Collection

jQuery Game Development Essentials

Selim Arsever

Your knowledge of JavaScript and jQuery is just about all you need to start creating some stunning browser-based games. This guide shows you how, from the basics to advanced techniques. Whatever the genre, this is the book for you.
RRP $26.99
RRP $44.99
Print + eBook

Want this title & more?

$12.99 p/month

Subscribe to PacktLib

Enjoy full and instant access to over 2000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

Book Details

ISBN 139781849695060
Paperback244 pages

About This Book

  • Discover how you can create a fantastic RPG, arcade game, or platformer using jQuery!
  • Learn how you can integrate your game with various social networks, creating multiplayer experiences and also ensuring compatibility with mobile devices.
  • Create your very own framework, harnessing the very best design patterns and proven techniques along the way.
  • The updated code files can be found here.

Who This Book Is For

Knowledge of JavaScript and jQuery as well as basic experience with frontend development is all you need to start making games in a matter of hours with this essential guide. Whilst also suitable for those who simply want to start making games with jQuery, it's specifically targeted at web developers that want to experiment with and utilize their existing skills.

Table of Contents

Chapter 1: 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!
Chapter 2: 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
Chapter 3: 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
Chapter 4: Looking Sideways
Offline divs
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
Chapter 5: Putting Things into Perspective
Optimizing tile maps for top-down games
Sorting the occlusion
Collision detection
The complete game
Isometric tiles
Chapter 6: Adding Levels to Your Games
Implementing a multi-file game
Modifying our platform game
Chapter 7: Making a Multiplayer Game
World of Ar'PiGi
Managing the player's account
Keeping the players in sync
Taking care of monsters
Chapter 8: Let's Get Social
Creating a simple leaderboard
Making cheating harder
Integrating with Twitter
Integrating with Facebook
Chapter 9: 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
Chapter 10: Making Some Noise
Abstracting audio
Embedding sound
HTML5 Audio element
Web Audio API
Flash fallbacks
Generating sound effects

What You Will Learn

  • Create sprite-based, multi-platform games using the latest web standards and jQuery
  • Use powerful techniques directly from the games industry to make your own games harness stunning visual effects without compromising on performance
  • Learn how you can develop real-time multiplayer games and integrate them with social networks
  • Overcome the limitations of mobile browsers allowing you to take full advantage of their various features with minimum hassle
  • Develop a platformer, an arcade game, or even your very own RPG with jQuery at the core
  • Discover how you can easily implement features like parallax scrolling
  • Utilize your existing skills in jQuery in a fun and exciting new context

In Detail

jQuery is a leading multi-browser JavaScript library that developers across the world utilize on a daily basis to help simplify client-side scripting. Using the friendly and powerful jQuery to create games based on DOM manipulations and CSS transforms allows you to target a vast array of browsers and devices without having to worry about individual peculiarities.

"jQuery Game Development Essentials" will teach you how to use the environment, language, and framework that you’re familiar with in an entirely new way so that you can create beautiful and addictive games. With concrete examples and detailed technical explanations you will learn how to apply game development techniques in a highly practical context.

This essential reference explains classic game development techniques like sprite animations, tile-maps, collision detection, and parallax scrolling in a context specific to jQuery. In addition, there is coverage of advanced topics specific to creating games with the popular JavaScript library, such as integration with social networks alongside multiplayer and mobile support. jQuery Game Development Essentials will take you on a journey that will utilize your existing skills as a web developer so that you can create fantastic, addictive games that run right in the browser.


Read More