CPSC 220 Assignment 1
The Effect of Complexity on Game Performance
Due Before Class on Friday, September 4th

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


Before you begin planning what type of game that you would like to create. There are a few requirements that restrict the type of game you can create:

  1. The game should contain an active run loop without sleeping.
  2. The game should depend on collision detection as part of its play mechanics.
  3. The game should include the ability to scale the number of interacting objects by large amounts.

Create a plan for what type of game you would like to create. I would recommend being modest with your plans. Try to envision a game that you can implement completely in one week. You will have the rest of the semester to make improvements to it. In particular the graphics do not need to be sophisticated; it is sufficient for the visuals to consist of ovals and rectangles.

Before you begin coding your game you should think about how to best structure your code. This includes thinking about what classes will make up the program as well as what instance variables and methods will make up the classes. You should also create a class that stores the interacting objects of the game. The implementation of this can be either array-based or link-based, but should not utilize any of the Java library classes such as ArrayList.

Your game should include a display of the average number of frames per second that it is rendering. You should determine what effect changing the number of interacting objects will have on the frame rate. Be prepared to demo your game in class on Friday including a comparison between a big O analysis of and the actual relation between the number of objects and the frame rate.

Hand In: Tar and email your code to your instructor with a subject of cpsc220 assign 1 before class on Friday, September 4th.