Last edited December 14, 2013

Fear The Sphere: A Demonstration of Two Dimensional Elastic Collisions
        by David Prorok


The goal of this project is to create a functioning game that can graphically display elastic collisions. The design is not to discover the unknown, but to demonstrate the known. The program takes a mostly dull concept and makes it interesting through the use of a video game facade.

The Game

The idea of the game is to put the user in control of a rubber ball. The user will earn coins as he or she progresses through a number of levels. The coins can then be used to increase the mass, speed, acceleration, etc. of his or her ball. The objective of each level is to knock a number of artificially intelligent rubber balls off a platform. The collisions will be realistic in that they will exhibit a conservation of momentum. The game is written in Python with the help of the PyGame module, which can be found here.

Instructions on how to get the game running can be found in README.txt, which is in the same folder as the source code. When you first run the game, your screen should look like the image below.

Welcome to Fear The Sphere! Press "Enter" on your keyboard to begin your journey. You can control the red ball with either the arrow keys or the [W][A][S][D] keys. Level one is easy enough for you to practice the controls. In order to advance to the next level, you will need to ram your ball into the enemy ball.

At the end of each level, you are brought to the store, where you can spend your hard earned coins to upgrade your ball. Purchasing speed will increase the maximum rate at which your ball can travel across the screen. Purchasing acceleration will increase the rate at which you can reach your max speed, stop, or change directions. Purchasing mass will increase the number displayed in the center of your ball. When you have more mass moving at a higher speed, your ball will have a higher momentum and therefore be able to hit the enemies harder. Instead of upgrading yourself, you can instead choose to "invest" your coins by increasing your multiplier or purchasing a bank. Both will increase the amount of coins you earn on later levels in different ways. It might take some practice to find the right balance between investing and upgrading.

As you progress through the game, enemies will get larger, quicker, and faster. It'll take concentration, a knowledge of physics, and strategy to defeat them. How long can you survive?

You can find a complete description of the physics taking place in my documentation, or view a condensed version via my PowerPoint presentation.

You can find my contact information on my personal website.