Date of Award

1-1-2013

Document Type

Thesis

Degree Name

M.S.

Department

Computer Science

First Advisor

Mario Lopez

Second Advisor

Chris GauthierDickey

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.

Provenance

Recieved from ProQuest

Rights holder

Min Qi

File size

91 p.

File format

application/pdf

Language

en

Discipline

Computer science

Share

COinS