Foundation HTML5 Canvas

Author: Rob Hawkes
Publisher: Friends of Ed, 2011
Pages:316
ISBN: 978-1430232919
Aimed at: Existing programmers
Rating: 4.5
Pros: Good introduction to Canvas that succeeds in being fun
Cons: Very basic
Reviewed by: Ian Elliot

The subtitle of this book is For Games and Entertainment and it focuses on creating classical sprite based 2D games.

While there are arguably more interesting graphics features that are associated with HMTL5 - i.e. WebGL and 3D graphics - Canvas is the only one that has fairly universal support. What this means is that if your application can fit into Canvas then it is worth using it.

This book is an introduction not only to Canvas but to many of the ideas of sprite-based animation.

 

Banner

 

It starts off with a look at HTML5 and attempts to explain what it is all about, what is in the HTML5 standard and what are simply associated technologies. Interesting but not essential to the book. Chapter 2 attempts a roundup of JavaScript - handy if you have forgotten your JavaScript but its not going to teach you the language in the space allocated. One minor problem is that the author introduces jQuery. I'm a great jQuery fan but in this instance it doesn't seem to add much and it actually makes some of the code more complex.

Chapter 3 is where we really get started with Canvas and it covers drawing basic shapes. Chapter 4 moves on to saving and restoring the state and graphics transformations. Chapter 5 deals with images and video - including processing video and then displaying it using Canvas. This brings the Canvas tutorial to a close and at this point in the book (page 160) you are ready to move on to animation.

Chapter 6 introduces basic draw,update, clear animation and points out that using object oriented sprites this becomes much easier to organize. Chapter 7 moves on to more advanced animation in the sense of adding velocity, acceleration and collisions to sprites.

Chapters 8 and 9 provides two fairly good examples of how to implement complete games - a space bowling game and asteroid avoidance. Both are fairly simple but provide an insight into how to go about putting everything together to create a game.

The final chapter is about the future of Canvas and includes sections on SVG and Flash v Canvas, WebGL and a range of other topics.

Overall this is suitable for the beginner who knows some JavaScript or at the very least programs in another language - the non-programmer would be hard pressed to learn to program from the introduction. The book isn't very advanced an this is mainly because Canvas isn't that advanced or difficult to use. The book does however stress the modern ideas of using object oriented sprites to make animation easier to work with.

Without additional technologies like WebGL JavaScript is limited to creating 2D games but for this Canvas is up to the job. It may not have the tools and well developed support of say Flash but it is early days.

If you want to use Canvas to have some fun then this book does a good job of keeping the fun in the equation.

As long as you aren't a complete complete beginner or an advanced programmer it is recommended.

Banner


Hello! iOS Development

Author: Lou Franco & Eitan Mendelowitz
Publisher: Manning
Pages: 344
ISBN: 978-1935182986
Audience: Complete beginners
Rating: 2
Reviewer: Lucy Black

This looks like the book to get you started on iOS. Its got a cover with a cartoon character and if you flip though you will see lots more cartoons [ ... ]



The Developer's Code

Author: Ka Wai Cheung
Publisher: Pragmatic Bookshelf
Pages: 250
ISBN: 978-1934356791
Aimed at: New programmers
Rating: 4
Pros: Readable opinions with some useful advice
Cons: No opportunity to argue
Reviewed by: Sue Gee

 

Billed as the "guidance you need to get started". Is it useful?


More Reviews

Last Updated ( Wednesday, 08 June 2011 )
 
 

   
RSS feed of book reviews only
I Programmer Book Reviews
RSS feed of all content
I Programmer Book Reviews
Copyright © 2014 i-programmer.info. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.