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


Python Programming and Visualization for Scientists 2nd Ed

Author: Alex DeCaria and Grant Petty
Publisher: Sundog Publishing
Pages: 372
ISBN: 978-0972903356
Print: 0972903356
Audience: Scientists wanting to use Python
Rating: 2
Reviewer: Mike James
Visualization - a difficult topic and difficult to see how to explain the ideas in a book.



Expert Performance Indexing in Azure SQL and SQL Server 2022

Author: Edward Pollack & Jason Strate
Publisher: Apress
Pages: 659
ISBN: 9781484292143
Print: 1484292146
Kindle: B0BSWH65ST
Audience: DBAs & SQL devs
Rating: 4 or 1 (see review)
Reviewer: Ian Stirk 

This book discusses indexes, a primary means of improving performance in SQL Server, how does  [ ... ]


More Reviews

Last Updated ( Wednesday, 08 June 2011 )