Book Image

WebGL Game Development

By : Sumeet Arora
Book Image

WebGL Game Development

By: Sumeet Arora

Overview of this book

<p>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.</p> <p>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.</p>
Table of Contents (17 chapters)
WebGL Game Development
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Differentiating WebGL from the game engine


WebGL only provides 3D rendering capability. It is simple, straightforward, and insanely fast. It is good at what it does, that is, rendering 2D and 3D graphics. It is a low-level programming interface with a very small set of commands.

WebGL is not a game engine like Unity, Cocos2D, or Jade. A game engine has many other features, such as collision detection, ray casting, particle effects, and physics simulation. Using WebGL, you can create your own game engine.

WebGL provides functionalities to draw basic primitives such as lines, circles, and triangles that can be used to draw any complex 3D object. It does not provide a direct function to add a camera to your scene. However, a camera class can be evolved to do the same. This is what this book will help you with. It will help you create a library on top of WebGL tailored for creating games and gaming functions.