CPSC 220 Assignment 4
Heap
Due Before Class on Wednesday, October 28th

In this assignment you will explore how using a heap to organize objects interacting in a simple 2D game affects performance as measured by the number of frames rendered per second.

Details

You should begin by modifying your game from assignment 3 by adding a fourth enum field for collision detection using heaps. When the game is set to use this collision detection method it should function the same as with the other collision detection methods. The difference is that objects should be added to a min or max heap object of a class that you create. A min heap for less-than comparisons and a max heap for greater-than comparisons. The heap should be traversed from the top down like with the search trees. Note that the heap implementation should probably use an array-based implementation.

Your game must also include original artwork or images for all objects in the game. That is, nothing downloaded from the internet. You can use Inkscape for drawings or the Gimp for images. Your game should also include the ability to switch the image drawing to bounding rectangles for testing purposes. Your game should also be playable using a usb controller with keymapping software such as JoyToKey for Windows or QJoyPad for Linux

Your game should also include something new that improves the game in addition to the above requirements. Be prepared to demo your game in class on Wednesday including an asymptotic analysis of and the number of comparisons when using the different collision detection algorithms.

Hand In: Tar and email your code to your instructor with a subject of cpsc220 assign 4 before class on Wednesday, October 28th.