Jump to ratings and reviews
Rate this book

jQuery Game Development Essentials

Rate this book
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. Overview 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. What you will learn from this book Approach Written as a concise yet practical guide with an explicit focus on utilizing jQuery for game development, you'll learn how to create stunning games that look great - without the hassle of learning about a complex game engine in the process. Who this book is written 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.

244 pages, Paperback

First published January 1, 2013

Loading...
Loading...

About the author

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
2 (28%)
4 stars
3 (42%)
3 stars
2 (28%)
2 stars
0 (0%)
1 star
0 (0%)
Displaying 1 - 3 of 3 reviews
Profile Image for Az Cross.
1 review
May 22, 2013
I did a review on my blog at grimpanda.com, but I thought I would share it here as well, so I copied/pasted the most relevant bits. I loved this book!

In the preface, the author asserts that the book is recommended for beginners of web development who have at least some knowledge in Javascript/jQuery. While this is certainly true, let me be the first to say that it's usefulness extends far beyond the new developer. If you can sit down at your keyboard and write a fully featured jQuery multiplayer mobile/browser game without needing any assistance, this book isn't for you. If, on the other hand, you are weak in any area ranging from jQuery utilization, building your own game engine frameworks, server code for efficient multiplayer game features, utilizing social networking effectively in your game or launching all of this onto a mobile device, then this book *is* for you.

Structures

Too often I pick up a book and get a couple chapters in only to realize that they pulled out all of the stops right at the beginning and then ran out of air. Even more common are books that present information in fragments that are difficult to implement in any meaningful way. In the end, the reader is left with another space on the bookshelf filled with a nothing more than a very poor, overly-worded reference.

Not so with jQuery Game Development Essentials. Selim Arsever, the books author, leads the reader carefully down a path of understanding and knowledge gathering. Arsever begins by familiarizing the reader with critical concepts, before moving easily into an approachable but powerful game example. The simple, single screen game, teaches the programmer important cornerstones such as collision detection, game states, and input calculation; A foundation the reader can build upon solidly while continuing the journey forwards to more developing more robust skills.

Language

Throughout the publication, Arsever keeps the reader engaged by using easy to read, simple language. While your skillset and understanding will continue to ramp up as you progress through the chapters, the difficulty does not. Again, this is due in large part to the books meticulous ability of explaining the foundation before moving on to the more advanced sections.

That is probably my favorite feature of this book. Pretty often I am able to follow books in this category in the beginning. Inevitably however, I end up getting mired down in the language as the text progresses. Usually, I end up just pasting code and giving up on reading the chapters explaining it. This leaves me feeling unsatisfied and well... a little sad! Not so in this book! I was able to read through each and every chapter as if it were the first. I really can't stress my happiness with this major detail.

Building Blocks

As I've already mentioned, the book carefully leads the reader from concept to concept in text, and mirrors that growth in the actual coding. There is no useless information in this book. No fluff code, or stupid games that teach nothing. Each page is designed to progress you that much further in your journey down this awesome road.

While not strictly so, the layout sort of follows a "learn it, build it, improve it" workflow. Arsever will introduce key concepts, discuss them in an intuitive manner, then have you working with relevant code. Only after introducing the simplest possible answer to a problem will the reader then move on to make it more robust. In this manner, it is very easy to take in the information in a modular method.

After you have a decent working prototype, he will usually spend quite a bit making sure that we can take the basics to something modern and exciting. Anything from integrating social networking into your game to allowing your new game to respond to user touch!

TLC

Here's another aspect of the book that really drew me in. There are many times throughout the publication that Arsever takes time to `care'. I say `care' because he obviously spent a great deal of time thinking about YOU the reader. He doesn't just shove directions down your throat, but takes the time to inform you what tools are available for the upcoming tasks. He understands that not everyone can afford the most expensive tools, so wherever possible he links us to open source and freely available alternatives.

On top of that, he points points out whenever possible, areas that might need additional attention. For example, he knows that social website API's change often, and instead of simply leaving you with some code that may not work over time, he explains how you can stay up to date in the future. These little things really impress me. I don't feel like I was taken for a quick buck or two and left hanging. I feel more like I'm being taught and privileged enough to learn from the best.

Wrapping Up

In jQuery Game Development Essentials you will move from a single screen web game to a multiplayer RPG to distributing your creations across mobile networks. It not only promises this, but does so in spades. Selim Arsever gets you from 0 to 60, no, 0 to 100 in red carpet fashion. He shrugs off the pitfalls of other books in the genre without issue. It's easy enough to follow from cover to cover, that if you are a complete beginner you will have no trouble. It's feature packed enough that even a seasoned programmer will find more than enough helpful information to take their experience and knowledge to the next level.
2 reviews2 followers
June 8, 2013
The jQuery has become the main framework for developing applications with JavaScript, the book is suitable for those who already have some knowledge about jQuery.

The book begins with the approach:
- Peculiarities of jQuery;
- Movement of elements;
- Event handling;
- DOM manipulation

Most jQuery statements are of the following form: a selection followed by one or more actions. The way those actions are combined is called chaining and is one of the most elegant aspects of jQuery.

Questions about animation with jQuery and the initial problems of chaining and queue of animations are clarified.

Handle events: there are the lot of ways to handle events going from keyboard input, form submission, window resizing or click the button. And ways to remove an event handler too.

In chapter 2 the book talks about the game "Frogger", an old school arcade game that you play the role of a frog trying to cross the screen by jumping on logs and avoiding cars.

The book will use DOM elements of a web page to render game elements. Another popular solution would be to use CANVAS element. There are plus and minus points for both technologies and there are a few effects that are simply not possible to produce with only DOM elements.

There a lot of code to create in the whole book, but if you only want to only look, its possible to download the zip file and have fun.

The concept of animated sprites described in the book is interesting: an image as a long strip where there is a character drawn in some positions, placed side by side and inserted into a "DIV" tag. Then control the position of the first character in the "DIV" and move the strip to display the second character in the same "DIV" using a timer function, popping the animation effect.

To avoid starting the game before some images are loaded, you can use jQuery to preload them and then start the game.

The issue of collision detection elements is addressed very simply in the first chapter and enhanced in the following chapters.

The process adopted in the book to create jQuery game has the goal to work just fine on almost all devices and in almost all browsers, the main reason being it's very simple and contains few
moving sprites. However, you will realize through the chapters that game become more and more complex, need to take great care to write optimized code for obtaining good performance.

The book still talks about:
- Games that use what is called an orthogonal projection;
- Create another levels for your game;
- Implementing an interpreter for a JSON file;
- Create enemies and configure them;
- AJAX to load files asynchronously;
- Integrating the game with Facebook / Twitter;
- Obfuscating your code;
- Load and preload music / sound files to use in the game.

The chapter of multiplayer game talks about server-side tools to run your game, using PHP + MySQL and the problems involved:
- How many users will be able to play simultaneously on your system?
- What will you do when the number of players grows past this limit?

And the last but not least: Mobile Games - problems like memory and power limitations. Checking browser detection and the visible area of the page are very important subjects in this chapter.
Situations where can be useful to access the device orientation or the ability to work offline using cache application.

Book url: http://www.packtpub.com/jQuery-game-d...

1 review
May 28, 2013
The book starts off with the following: "Writing games is not only fun but also a very good way to learn a technology through and through" and I could not agree more.

I have been programming for 30+ years and at this point I want to try and future proof my knowledge by learning what looks to be very important to our future HTML and JS and jQuery is designed to make this much easier and efficient. I ran into this book while searching for HTML Game programming info and it seemed like it would be a great way to leverage jQuery for Game Creation and learn a bit on how HTML Games work in general and this book did not disappoint.

From the beginning this book covers it all from the basics of what jQuery can do for you in Game Development down to how Audio works and extra ways to make things just work for your audience. The author also includes handy links to other references for more information on how to continue your learning which I thought was very helpful.

The writing style is very friendly and it feels as if the author is there with you helping you learn rather than a dry instructional book. The code style is snippets of functional code and not complete start to end of each function which helps to keep the book focused on what you are learning for that chapter. The entire code is included as a download with the book so I never ran into an issue if I needed more information.

This is a review of the eBook version and if you have the choice I would go with the ePub format as it is formatted very well with great use of color to keep things formatted for easy reading.
Displaying 1 - 3 of 3 reviews