Build your own 2D Game Engine and Create Great Web Games [electronic resource] : Using HTML5, JavaScript, and WebGL  /
Sung, Kelvin.author.
Pavleas, Jebediah.author.
Arnez, Fernando.author.
Pace, Jason.author.
Build Your Own 2D Game Engine and Create Great Web Games teaches you how to develop your own web-based game engine step-by-step, allowing you to create a wide variety of online videogames that can be played in common web browsers. Chapters include examples and projects that gradually increase in complexity while introducing a ground-up design framework, providing you with the foundational concepts needed to build fun and engaging 2D games. By the end of this book you will have created a complete prototype level for a side scrolling action platform game and will be prepared to begin designing additional levels and games of your own. This book isolates and presents relevant knowledge from software engineering, computer graphics, mathematics, physics, game development, game mechanics, and level design in the context of building a 2D game engine from scratch. The book then derives and analyzes the source code needed to implement th ese concepts based on HTML5, JavaScript, and WebGL. After completing the projects you will understand the core-concepts and implementation details of a typical 2D game engine and you will be familiar with a design and prototyping methodology you can use to create game levels and mechanics that are fun and engaging for players. You will gain insights into the many ways software design and creative design must work together to deliver the best game experiences, and you will have access to a versatile 2D game engine that you can expand upon or utilize directly to build your own 2D games that can be played online from anywhere.
Contents at a Glance; Contents; About the Authors; About the Technical Reviewer; Acknowledgments; Introduction; Chapter 1: Introducing 2D Game Engine Development with JavaScript;  The Technologies;  Setting Up Your Development Environment;  Downloading and Installing JavaScript Syntax Checker;  Working in the NetBeans Development Environment;  Creating an HTML5 Project in NetBeans;  The Relationship Between the Project Files and the File System;  How to Use This Book;  How Do You Make a Great Video Game?;  References;  Technologies; Chapter 2: Working with HTML5 and WebGL;  Introduction
Canvas for Drawing The HTML5 Canvas Project ; Creating and Clearing the HTML Canvas;  Separating HTML and JavaScript;  The JavaScript Source File Project; Separate JavaScript Source Code File; Load and Run JavaScript Source Code from index.html;  Observations;  Elementary Drawing with WebGL;  The Draw One Square Project ; Set Up and Load the Primitive Geometry Data; Set Up the GLSL Shaders ; Define the Vertex and Fragment Shaders ; Compile, Link, and Load the Vertex and Fragment Shaders; Set Up Drawing with WebGL;  Observations;  Abstraction with JavaScript Objects
The JavaScript Objects ProjectSource Code Organization ; Abstracting the Game Engine; The Core of the Game Engine: gEngine.Core ; The Shared Vertex Buffer; The Shader Object; The Client Source Code;  Observations;  Separating GLSL from HTML;  The Shader Source Files Project; Loading Shaders in SimpleShader ; Extracting Shaders into Their Own Files ; Cleaning Up HTML Code ;  Source Code Organization ;  Changing the Shader and Controlling the Color;  The Parameterized Fragment Shader Project; Defining the SimpleFS.glsl Fragment Shader ; Modify the SimpleShader to Support the Color Parameter
Drawing with the New Shader  Summary; Chapter 3: Drawing Objects in the World;  Introduction;  Encapsulating Drawing ;  The Renderable Objects Project ; The Renderable Object;  Testing the Renderable Object;  Observations;  Transforming a Renderable Object;  Matrices as Transform Operators; Concatenation of Matrix Operators ;  The glMatrix Library ;  The Matrix Transform Project; Modify the Vertex Shader to Support Transforms; Modify SimpleShader to Load the Transform Operator; Modify Renderable Object to Set the Transform Operator; Testing the Transforms ;  Observations
Encapsulating the Transform Operator The Transform Objects Project;  The Transform Object; Transformable Renderable Objects ; Modify Drawing to Support Transform Object;  View, Projection, and Viewports;  Coordinate Systems and Transformations; Modeling and Normalized Device Coordinate Systems ; The World Coordinate System ; The Viewport;  The View Projection and Viewport Project; Modifying the Vertex Shader to Support the View-Projection Transform; Modifying SimpleVertex to Support the View-Projection Transform; Modifying RenderObject to Support the View-Projection Transform
Testing the View-Projection Transform and the Viewport
Includes index.
Build Your Own 2D Game Engine and Create Great Web Games teaches you how to develop your own web-based game engine step-by-step, allowing you to create a wide variety of online videogames that can be played in common web browsers. Chapters include examples and projects that gradually increase in complexity while introducing a ground-up design framework, providing you with the foundational concepts needed to build fun and engaging 2D games. By the end of this book you will have created a complete prototype level for a side scrolling action platform game and will be prepared to begin designing additional levels and games of your own. This book isolates and presents relevant knowledge from software engineering, computer graphics, mathematics, physics, game development, game mechanics, and level design in the context of building a 2D game engine from scratch. The book then derives and analyzes the source code needed to implement th ese concepts based on HTML5, JavaScript, and WebGL. After completing the projects you will understand the core-concepts and implementation details of a typical 2D game engine and you will be familiar with a design and prototyping methodology you can use to create game levels and mechanics that are fun and engaging for players. You will gain insights into the many ways software design and creative design must work together to deliver the best game experiences, and you will have access to a versatile 2D game engine that you can expand upon or utilize directly to build your own 2D games that can be played online from anywhere.
Computer games-Programming.
Software engineering.
Game Development.
Software Engineering/Programming and Operating Systems.