Skip to main content
  • Book
  • © 2017

Building a 2D Game Physics Engine

Using HTML5 and JavaScript

Apress

Authors:

  • A unique and practical all-in-one resource on 2D game physics

  • Features easy to read and follow content and utilizes a learn-by-doing approach

  • Allows you to integrate with existing game engines

Buy it now

Buying options

eBook USD 29.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book USD 37.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Other ways to access

This is a preview of subscription content, log in via an institution to check for access.

Table of contents (5 chapters)

  1. Front Matter

    Pages i-xviii
  2. Introduction to 2D Game Physics Engine Development

    • Michael Tanaya, Huaming Chen, Jebediah Pavleas, Kelvin Sung
    Pages 1-14
  3. Implementing the 2D Physics Engine Core

    • Michael Tanaya, Huaming Chen, Jebediah Pavleas, Kelvin Sung
    Pages 15-36
  4. Incorporating Collision Detection

    • Michael Tanaya, Huaming Chen, Jebediah Pavleas, Kelvin Sung
    Pages 37-69
  5. Completing the Physics Engine and Rigid Shape Component

    • Michael Tanaya, Huaming Chen, Jebediah Pavleas, Kelvin Sung
    Pages 71-103
  6. Summarizing the Physics Engine

    • Michael Tanaya, Huaming Chen, Jebediah Pavleas, Kelvin Sung
    Pages 105-112
  7. Back Matter

    Pages 113-116

About this book

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.


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)

Authors and Affiliations

  • Bothell, USA

    Michael Tanaya, Huaming Chen

  • Kenmore, USA

    Jebediah Pavleas

  • Woodinville, USA

    Kelvin Sung

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

  • Publisher: Apress Berkeley, CA

  • eBook Packages: Professional and Applied Computing, Professional and Applied Computing (R0), Apress Access Books

  • Copyright Information: Michael Tanaya, HuaMing Chen, Jebediah Pavleas and Kelvin Sung 2017

  • Softcover ISBN: 978-1-4842-2582-0Published: 13 January 2017

  • eBook ISBN: 978-1-4842-2583-7Published: 11 January 2017

  • Edition Number: 1

  • Number of Pages: XVIII, 116

  • Number of Illustrations: 23 b/w illustrations, 19 illustrations in colour

  • Topics: Game Development

Buy it now

Buying options

eBook USD 29.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book USD 37.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Other ways to access