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

Summary


In this chapter, we first covered the implementation of the canvas 2D context as texture in our game scene. This is a very powerful tool, not just limited to game development, but is also used in many 3D applications such as product customization tools. The canvas 2D API offers a very powerful list of functions to manipulate images using its pixel data. This gives us the ability to add dynamic textures to our game scene.

In the second section of the chapter, we introduced you to multiplayer games and used WebSockets to create a sample spectator client. We used the module Sockets.IO of Node.js, to implement our multiplayer game.

In this book, we have trained ourselves in topics such as rendering, animation, physics engines, collision detection, bone animations, and multiplayer games to evolve our world in 5000 A.D. Now, we leave it up to you to complete your world and add components that excite the users of your game.