Learning Android Game Development by Nikhil Malankar

Learning Android Game Development by Nikhil Malankar

Author:Nikhil Malankar
Language: eng
Format: epub
Tags: COM012040 - COMPUTERS / Programming / Games, COM071000 - COMPUTERS / Digital Media / Video and Animation, COM086000 - COMPUTERS / Computerized Home and Entertainment
Publisher: Packt Publishing
Published: 2017-05-26T05:56:26+00:00


Thus, this chapter will be divided into two main sections. The studies of collision detection and artificial intelligence are in themselves quite vast topics. For the sake of simplicity to serve our purpose, we will be taking a look at the most basic version of these topics to get an entry level understanding for being able to apply the knowledge of these concepts in our game. So without further ado, let's dive into this complex yet exciting topic of collision detection.

Collision detection

To explain it simply, collision is a short duration interaction between two bodies. There are many different types of collisions such as elastic and non-elastic. The study of the intersection of two or more objects overlapping each other is called as collision detection. It is one of the most complex pieces of computational mathematics and is divided into many types, such as:

Bounding Box Collision: This is the simplest form of collision techniques wherein we take two rectangles and check for collision if they overlap each other. For this, we need four coordinates of each rectangle, namely, the x and y position and width and height of both rectangles.

Circle Collision: This is the second simplest type of collision wherein we test for collisions between two circles. Here, the radius of two circles and x and y position of the center of the circles are taken into account to test for overlapping.

Separating Axis Theorem: This type of collision is a bit more complex than the other two mentioned earlier, primarily because this is used to detect collisions between two polygons.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.