Sumeet Arora, expert in 3d rendering with a passion towards game technologies help his clients in launching games on mobile and web.
In about 400 pages the author sets out a step-by-step approach to build a in-browser multiplayer role-playing game (“5000 AD”) based on WebGL. We can see this book as an example-based tutorial that help the reader to understand WebGl developing a complete game.
Chapters overview: Chapter 1, Getting Started with WebGL Game Development, covers basic terminologies of 3D and the basics of WebGL, 3D mathematics, and 3D graphics. It also gives a walkthrough of the WebGL API and discusses the structuring of a WebGL application. Topics: • Understanding WebGL • Understanding basic 3D mathematics • Learning the basics of 3D graphics • Understanding WebGL's rendering pipeline • A walkthrough of the WebGL API • The structuring of a WebGL application and learning shaders for debugging your application Chapter 2, Colors and Shading Languages, explains how to add colors, light, and material to objects in a scene. It discusses how to export 3D objects using tools such as Blender and also explains the basic Wavefront OBJ file format and the JSON file format. Also, we will learn about directional lights in this chapter. Topics: • Adding colors to primitive objects • Exporting 3D objects from tools such as Blender • Understanding directional lights • Making our objects respond to light and reflection algorithms • Shading models Chapter 3, Loading the Game Scene, teaches us how to handle loading and rendering of multiple objects through coding. This chapter also teaches you to add point lights to your scene. Topics: • Code changes to support multiple objects • WebGL, a state machine • Request animation frames • Load the scene • Positional lights • Multiple lights and shaders Chapter 4, Applying Textures, covers all of the topics on how to create, load, and apply textures to 3D objects. It also teaches advanced techniques such as filtering and cubemaps. Topics: • Texturing basics • Loading textures and using them in fragment shaders • Texture filtering and wrapping • Loading objects exported from Blender • Mipmapping • Cubemap textures Chapter 5, Camera and User Interaction, focuses on evolving our own camera class for our game scene. We will also empower our users to view the game scene from different angles and positions by adding the mouse and keyboard interactivity. Topics: • ModelView transformations • Perspective transformations • The basic camera • The free camera • Controlling the camera with the keyboard and mouse • The orbit camera Chapter 6, Applying Textures and Simple Animations to Our Scene, starts by simulating a first-person camera and takes it forward by giving weapons to our character. We also dive deep into different animations techniques used in game engines. Topics: • Architectural update: add textures to our scene • Animation types in 3D games • First-person camera • Simple bullet action: linear animation • Multiple bullets: how to reuse objects • Grenade action: B-spline interpolation • Explosion effect: texture animation Chapter 7, Physics and Terrains, explains physics simulation and discusses how physics engines control component trajectories as well as work with collision detection in a game. Topics: • A simple terrain: plane geometry • JavaScript 3D physics engines: JigLibJS • Adding gravity and a rigid body to the game scene • Forces, impulse, and collision detection: grenade and bullet animation revisited • Extending our terrain with physics Chapter 8, Skinning and Animations, covers our study of character animation by understanding the skeleton, which is the base of the character, upon which the body and its motion are built. Then, we learn about skinning and how the bones of the skeleton are attached to the vertices. Topics: • Basics of a character's skeleton • Basics of skinning • Loading a rigged JSON model • Animating a rigged JSON model • Exporting models from 3D software in JSON Chapter 9, Ray Casting and Filters, unveils a very powerful concept in game development called ray casting, which is used to cover cases that cannot be handled by collision detection. This also covers framebuffers, another very important concept used in game development. Topics: • Basic concepts of ray casting • The basics of picking • Implementing picking using ray casting • Framebuffers • Implementing filters using framebuffers Chapter 10, 2D Canvas and Multiplayer Games, covers the use of 2D rendering in 3D games through canvas 2D, a very powerful 2D drawing API. We also discuss the technology behind HTML-based multiplayer games. Topics: • Canvas 2D basics and the drawing API • 2D sprites for model labels and game scores • Real-time communication: HTTP long polling and WebSockets • Node.js: Socket.IO • Sample implementation of the multiplayer game: a spectator player
Conclusion: If you want “undestand” WebGl or know how to develop a multiplayer game or simply handle 3D objects with JavaScript you must read it! I suggest this book not only to newbies but also to OpenGl developer that have never developed in-browser game/application.
The book covers very well all aspects of WebGL Game Development. Besides using well known APIs fortunately a lot of time is spent describing complex math-related and other WebGL techniques. While reading the book a number of useful tips explain why some gaming techniques are chosen or preferred above other ones. The author really knows what he is talking about and gives some real nice examples and instructions on how to use Blender for e.g. skinned model objects. Every aspect of building a game is discussed and users with some experience can jump into individual chapters to delve into specific topics.
For real starters this may not be the best book, since a lot of code-samples do not work in the mentioned preferred browsers! On my test-machine, a MacMini-2014 with 27" Thunderbolt display, OSX 10.9.3, latest Safari, FireFox and Google Chrome, only on Chrome did all examples work. On Safari only 2 out of 39 did work, and on FireFox nothing worked! Even on a VMwareFusion's virtual Windows-7 nothing worked with the latest Firefox (version 30) and only 11 out of the 39 did work on Internet-Explorer version 11.0.7. Since the author claims that it should work on the three major browsers, a lot of review or rework needs to be done! Maybe an Appendix can be devoted on how to get thinks working in the various browser/OS-environments. Finally all downloaded code-samples did lack a good coding style, which, given the great number of 'beautifier'-tools, serious affects the readability and understandability.
Sumeet Arora explain in a very clear way what WebGL is and what is not: it is a JavaScript API based on OpenGL ES 2.0 that provides 2D and 3D rendering capabilities to create in-browser 3D games. It is not a game engine like Unity or Cocos2D, but it makes what is designed for in an incredibly powerful way. Keeping this distinction in mind, you will find WebGL Game Development a book very deep and full of inspiring points. Writing a 3D game (but also a game!) is not an easy task: you should have a good starting idea, strong programming knowledges and strong mathematics background... and here is where WebGL and Summet could help you!
WebGL is quite simple and Sumeet introduce you with the WebGL world using a step by step approach. Starting in Chapter 1 with explaining basic 3D mathematics, he introduce also the final target of the book: "5000 AD", a in-browser multiplayer RPG.
Chapter after chapter, Sumeet increase the knowledge around WebGL describing themes like rendering, texturing, animations, cameras, physics, user interaction, on screen display and so on. The complexity is increased, too, but with a very smooth approach.
I should suggest this book to everyone has the insane idea to create his own 3D game and even to skilled developers that need a reference manual near their PC, ready to be browsed in case of necessity.