PacktLib: WebGL Game Development

WebGL Game Development

Credits

About the Author

About the Reviewers

www.PacktPub.com

Preface

Getting Started with WebGL Game Development

Understanding WebGL

Differentiating WebGL from the game engine

Understanding basic 3D mathematics

Learning the basics of 3D graphics

Understanding WebGL's rendering pipeline

A walkthrough of the WebGL API

Drawing using vertex buffer objects

Drawing using index buffer objects

Debugging a WebGL application

Summary

Colors and Shading Languages

Understanding colors

Rendering 3D objects

Understanding the illumination/reflection model

Understanding shading/interpolation models

Summary

Loading the Game Scene

Supporting multiple objects

Understanding WebGL – a state machine

Understanding request animation frames

Loading the scene

Understanding positional lights

Multiple lights and shaders

Summary

Applying Textures

Texturing basics

Loading textures

Texture wrapping

Exporting models from Blender

Parsing UV coordinates from the JSON file

Rendering objects exported from Blender

Understanding mipmapping

Applying filtering modes

Understanding cubemaps and multi-texturing

Summary

Camera and User Interaction

Understanding ModelView transformations

Understanding perspective transformations

Using the basic camera

Understanding the free camera

Adding keyboard and mouse interactions

Comprehending the orbit camera

Summary

Applying Textures and Simple Animations to Our Scene

Applying textures to our scene

Understanding the animation types in 3D games

Using first-person camera

Simple bullet action – linear animation

Using B-spline interpolation for grenade action

Using texture animation for an explosion effect

Summary

Physics and Terrains

Understanding a simple terrain – plane geometry

Comparing JavaScript 3D physics engines

Adding gravity and a rigid body to the game scene

Implementing forces, impulse, and collision detection

Extending our terrain with physics

Summary

Skinning and Animations

Understanding the basics of a character's skeleton

Understanding the basics of skinning

Loading a rigged JSON model

Animating a rigged JSON model

Exporting models from 3D software in JSON

Summary

Ray Casting and Filters

Understanding the basic ray casting concepts

Learning the basics of picking

Implementing picking using ray casting

Offscreen rendering using framebuffers

Applying filters using framebuffers

Summary

2D Canvas and Multiplayer Games

Understanding canvas 2D basics and the drawing API

Adding 2D textures as model labels

Implementing the Sprite class

Implementing the ModelSprite class

Communicating in real time

Using Node.js and Socket.IO for multiplayer games

Implementing a multiplayer game

Summary

Index