Advertisement

© 2017

Building a 2D Game Physics Engine

Using HTML5 and JavaScript

Book

Table of contents

  1. Front Matter
    Pages i-xviii
  2. Michael Tanaya, Huaming Chen, Jebediah Pavleas, Kelvin Sung
    Pages 1-14
  3. Michael Tanaya, Huaming Chen, Jebediah Pavleas, Kelvin Sung
    Pages 15-36
  4. Michael Tanaya, Huaming Chen, Jebediah Pavleas, Kelvin Sung
    Pages 37-69
  5. Michael Tanaya, Huaming Chen, Jebediah Pavleas, Kelvin Sung
    Pages 71-103
  6. Michael Tanaya, Huaming Chen, Jebediah Pavleas, Kelvin Sung
    Pages 105-112
  7. Back Matter
    Pages 113-116

About this book

Introduction

Build your very own 2D physics-based game engine simulation system for rigid body dynamics. Beginning from scratch, in this book you will cover the implementation technologies, HTML5 and JavaScript; assemble a simple and yet complete fundamental mathematics support library; define basic rigid body behaviors; detect and resolve rigid body collisions; and simulate collision responses after the collisions.

In this way, by the end of Building a 2D Game Physics Engine, you will have an in‐depth understanding of the specific concepts and events, implementation details, and actual source code of a physics game engine that is suitable for building 2D games or templates for any 2D games you can create and can be played across the Internet via popular web‐browsers.


What You'll Learn

  • Gain an understanding of 2D game engine physics and how to utilize it in your own games
  • Describe the basic behaviors of rigid bodies
  • Detect collisions between rigid bodies
  • Resolve interpretations after rigid body collisions
  • Model and implement rigid body impulse responses


Who This Book Is For

Game enthusiasts, hobbyists, and anyone who is interested in building their own 2D physics game engines but is unsure of how to begin.

Keywords

game physics 2d engine game development programming HTML5 JavaScript CSS Web

Authors and affiliations

  1. 1.BothellUSA
  2. 2.BothellUSA
  3. 3.KenmoreUSA
  4. 4.WoodinvilleUSA

About the authors

Michael Tanaya is an international graduate student from Indonesia in the Computer Science and Software Engineering program at the University of Washington Bothell (UWB). He received his Bachelor of Computer Science in 2014 from the University of Minnesota at Twin Cities. During his time as an undergraduate he took interests in computer games and web application development. In his free time, he enjoys playing competitive video games, designing and developing video games with Unity™ and Cocos2D™. Currently Michael is working with Professor Kelvin Sung on developing a system that integrates virtual and augmented reality technologies in creating a multimedia environment for active hands-on learning. He will be graduating in Spring 2017.

Huaming Chen is an international graduate student from China in the Computer Science and Software Engineering program at the University of Washington Bothell (UWB). He received dual undergraduate degrees, in Computer Science and Economics, from Xiamen University in 2015. During his time as an undergraduate, he was interested in data mining and video game design. His projects include a large number of website groups that related to each other and a software system that recommend useful information based on those website groups. He also developed a mobile game using Unity. Currently Hua Ming is working on a project that focuses on designing video games that simplify vision therapy. He will be graduating in Spring 2017.

Jebediah Pavleas is a software engineer that received his Master of Science in Computer Science and Software Engineering from the University of Washington Bothell (UWB) in 2016 as well as a Bachelor of Science in 2012 where he was the recipient of the Chancellor’s Medal for his class. In 2015 he interned at Microsoft Research where he worked on improving the safety and usability of an eye gaze wheelchair. During his time as a student he took a great interest in both computer graphics and games. His projects included an interactive math application that utilizes Microsoft’s Kinect sensor to teach algebra, a 2D role-playing game designed to teach students introductory programming concepts, and a website where students can compete in various mini-games to control checkpoints around campus. Relating to these projects, he co-authored publications in IEEE Computers and The Journal of Computing Sciences in Colleges. He enjoys designing, building, and playing games of all kinds as well as adapting technology for improved accessibility. Jebediah is also the primary author of Learn 2D Game Development with C#, Apress, December 2013 and co-author of Build Your Own 2D Game Engine and Create Great Web Games, Apress, October 2015.

Kelvin Sung is a professor with the Computing and Software Systems division at University of Washington Bothell (UWB). He received his Ph.D. in Computer Science from the University of Illinois at Urbana-Champaign. Kelvin's background is in computer graphics, hardware, and machine architecture. He came to UWB from Alias|Wavefront (now part of Autodesk), where he played a key role in designing and implementing the Maya Renderer, an Academy Award-winning image generation system. Funded by Microsoft Research and the National Science Foundation, Kelvin’s recent work focused on the intersection of video game mechanics, solutions to real-world problems, and mobile technologies. Together with his students, Kelvin has co-authored three recent books: one in computer graphics (Essentials of Interactive Computer Graphics: Concepts and Implementations, A.K. Peters, 2008), and the others in 2D game engines (Learn 2D Game Development with C#, Apress, December 2013; and Build Your Own 2D Game Engine and Create Great Web Games, Apress, October 2015).

Bibliographic information

  • Book Title Building a 2D Game Physics Engine
  • Book Subtitle Using HTML5 and JavaScript
  • Authors Michael Tanaya
    Huaming Chen
    Jebediah Pavleas
    Kelvin Sung
  • DOI https://doi.org/10.1007/978-1-4842-2583-7
  • Copyright Information Michael Tanaya, HuaMing Chen, Jebediah Pavleas and Kelvin Sung 2017
  • Publisher Name Apress, Berkeley, CA
  • eBook Packages Professional and Applied Computing Professional and Applied Computing (R0)
  • Softcover ISBN 978-1-4842-2582-0
  • eBook ISBN 978-1-4842-2583-7
  • Edition Number 1
  • Number of Pages XVIII, 116
  • Number of Illustrations 23 b/w illustrations, 19 illustrations in colour
  • Topics Game Development
  • Buy this book on publisher's site

Reviews

“The heart of the book concerns several aspects of the physics and implementation of collision detection, and not only will this get you to some working code, but should give you enough to take away and try in other languages, without being propped up by libraries. The final demo project, and pointers to further exploration, should see you ready to build your own games.” (The MagPi, Issue 58, June, 2017)