Video games today are very detailed and very realistic. It is amazing how far video games have come in the last 30 years. Now you have new games like Gears of War 3 that is so graphically intense that there is plenty of coding involved. But just basic programming isn’t enough for these video games, you need algorithms. The more advanced the video game is, the more advanced the algorithm is as well. Algorithm in video games was not created recently. In fact, it has been placed in video games for a long time. In the following essay, I will discuss the methodologies for analyzing algorithms. I will also discuss the game that I chose, the original Pac-man. Then I will explain what algorithms were used in the game Pac-man. Finally, I will use Big-O notation to predict the effectiveness of each of the three algorithms that I have selected, and then I will discuss the impact, to the quality of the game, if these algorithms are not used. Knowing the methodologies for analyzing algorithms is very important. When you look at an algorithm, there are certain things you need to know. First there are two main ways that we can analyze algorithms. The two ways are experimentally and analytically. When analyzing algorithms experimentally, we must run our algorithm many times with different sized inputs, tracking the running time for each different sized input. (The goal is to repeat each of these many times to get average values for run-times.)
Once we have a graph of run-time versus input size, we would like to find a function (within a constant factor) that best fits the given data. This can be done by analyzing the fraction t(n)/f(n), where t(n) is the experimental run time, and f(n) is a function you are testing to see if it is the actual runtime. In order to analyze algorithms analytically you must look at the steps of the algorithm and determine how many "simple instructions" an algorithm will execute in terms of
Cited: 1. "GameInternals - Understanding Pac-Man Ghost Behavior." GameInternals. N.p., n.d. Web. 13 May 2012. <http://gameinternals.com/post/2072558330/understanding-pac-man-ghost-behavior>. 2. "Pac-Man miscellaneous page.." Brainbug 's hideout at TRIPOD !. N.p., n.d. Web. 13 May 2012. <http://brainbug.tripod.com/pac-misc.htm>. 3. Goodrich, Michael T., and Roberto Tamassia. Algorithm design: foundations, analysis, and Internet examples. New York: Wiley, 2002. Print.