Date of Award

1-1-2013

Document Type

Masters Thesis

Degree Name

M.S.

Organizational Unit

Daniel Felix Ritchie School of Engineering and Computer Science

First Advisor

Mario Lopez, Ph.D.

Second Advisor

Chris Gauthier-Dickey, Ph.D.

Third Advisor

Scott Leutenegger

Fourth Advisor

Nathan Sturtevant

Keywords

Bounding boxes, Collision detection, CUDA

Abstract

The traditional method for detecting collisions in a 2D computer game uses a axisaligned bounding box around each sprite, and checks to determine if the bounding boxes overlap periodically. Using this single bounding box method may result in a large amount of pixel intersection tests, since a sprite may be composed of areas where the pixels are empty and the intersecting bounding box test results in false positives.

Our algorithm analysis shows that the optimal two or three bounding boxes is the best partition we can get for a reasonable time complexity. The results further show significantly diminishing returns for calculating four bounding boxes and above, since it takes a comparably large amount of calculation to find the optimal four bounding boxes or more.

We present a multiple bounding boxes algorithm to show that multiple bounding boxes outperforms the traditional single bounding box method. In addition, we implement the simulation test for the 2-bounding-boxes and 3-bounding-boxes both in serial processing and CUDA parallel processing.

Our simulation result shows that out of the 1,000,000 tests we run, both the 2-bounding boxes and 3-bounding-boxes partition resulted in far fewer pixel-checks compared to the one bounding box method. Our experiment in serial processing and CUDA parallel processing also shows that GPU programming can be used to significantly reduce the time in calculation and to speed up the process of collision detection when we have a large enough number of pixels to process.

Publication Statement

Copyright is held by the author. User is responsible for all copyright compliance.

Rights Holder

Min Qi

Provenance

Received from ProQuest

File Format

application/pdf

Language

en

File Size

91 p.

Discipline

Computer science



Share

COinS