WebGL Game Development
By Sumeet Arora
Publisher: Packt Publishing
Final Release Date: April 2014
Pages: 418

In Detail

WebGL, the web implementation of Open GL, is a JavaScript API used to render interactive 3D graphics within any compatible web browser, without the need for plugins. It helps you create detailed, high-quality graphical 3D objects easily. WebGL elements can be mixed with other HTML elements and composites to create high-quality, interactive, creative, innovative graphical 3D objects.

This book begins with collecting coins in Super Mario, killing soldiers in Contra, and then quickly evolves to working out strategies in World of Warcraft. You will be guided through creating animated characters, image processing, and adding effects as part of the web page canvas to the 2D/3D graphics. Pour life into your gaming characters and learn how to create special effects seen in the most powerful 3D games. Each chapter begins by showing you the underlying mathematics and its programmatic implementation, ending with the creation of a complete game scene to build a wonderful virtual world.

Approach

This book is set-by-step, example-based tutorial that provides details on gaming logic using Web GL.

Who this book is for

If you are a programmer who wants to transform the skill of blending imagination and throughput in games, this is the book for you. You need to have a good understanding of object-oriented programming, JavaScript, and vector and matrix operations.

Product Details
Recommended for You
Customer Reviews

REVIEW SNAPSHOT®

by PowerReviews
oreillyWebGL Game Development
 
5.0

(based on 2 reviews)

Ratings Distribution

  • 5 Stars

     

    (2)

  • 4 Stars

     

    (0)

  • 3 Stars

     

    (0)

  • 2 Stars

     

    (0)

  • 1 Stars

     

    (0)

Reviewed by 2 customers

Sort by

Displaying reviews 1-2

Back to top

 
5.0

The best sample-based book on WebGl

By Tino

from Napoli

About Me Developer

Verified Reviewer

Pros

  • Accurate
  • Helpful examples
  • Well-written

Cons

    Best Uses

    • Intermediate

    Comments about oreilly WebGL Game Development:

    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.

    (2 of 2 customers found this review helpful)

     
    5.0

    Great book with lots of detail

    By Doug

    from Perth, AU

    About Me Developer

    Pros

    • Detailed
    • Helpful examples
    • Well-written

    Cons

      Best Uses

      • Intermediate

      Comments about oreilly WebGL Game Development:

      This book really digs into the detail of shaders and webgl in a way that cuts to the core of how they really work and how to use them without having to rely on a high level framework.

      While you can get away without any of this sort of in-depth knowledge and pretend to still be using the old fixed function pipeline (three.js), the specific details about shader lighting models and vertex shaders in this book are extremely valuable.

      If I had any complaint it would be that the series of examples in this book are all geared towards incrementally building an FPS game engine... including physics and multiplayer.

      As such, the book vears into a couple of relatively irrelevant topics in the last few chapers (websockets, physics engines). It felt like these were a distraction and the end of the book should have rather focued on webgl framebuffer effects to match the core focus of the rest of the book.

      Never the less, this is still by far the best book on webgl that I've read, and a valuable primer to get to grips with how to use webgl before you start using a framework with no real understanding of what's actually going on.

      Displaying reviews 1-2

      Back to top

       
      Buy 2 Get 1 Free Free Shipping Guarantee
      Buying Options
      Immediate Access - Go Digital what's this?
      Ebook: $26.99
      Formats:  ePub, Mobi, PDF