Lab: Video Game Physics Analysis
The research question is: does your video game follow physics phact or phiction? You and a partner will need to play about 10-20 seconds of an online video game that involves some type of collision, and then analyze the motion to determine speeds, accelerations, and whether energy and momentum are conserved.
Students will need a computer with Internet access. Students also need an analysis program such as Logger Pro or Tracker, which will be used to better analyze features of the game being played. A screencast video of the student playing the game will be made using the online program called Screencast-o-matic.
Using video technologies of all kinds have opened up new ways of making connections between the physics we study and any phenomenon that can be captured on video, including video games. Any game that has moving objects, interactions between objects, projectiles, orbits, collisions, and any other physical event, can be analyzed to see if our real laws of physics are being used to create the video game environment, or if the game is simply, for lack of a better word, being ruled by nonsense as far as the physics is concerned.
By measuring distances, times and paths, and estimating masses, and scaling them by some appropriate scaling factors to better match them to real object and events, you will be able to see if those measurements and results are realistic, or if your game is being played in some other world or parallel universe, with different laws of physics. You will be able to calculate speeds, accelerations, forces, momentum, and so on.
Pre-Lab: What do you need?
You will need to make sure you have Internet access on your computer. This will allow you to use Screencast-o-matic (found at http://screencast-o-matic.com/), as well as access an online video game.
It is possible to analyze a video game without additional software, just by using the screencast video directly and playing it frame-by-frame. You would need a small ruler and possibly a protractor for 2-D interactions to make measurements directly on the computer monitor.
However, a more accurate analysis can be done with other software, such as Vernier’s Logger Pro or Tracker, which is a free, open source piece of software off the Internet. You can download Tracker at http://www.cabrillo.edu/~dbrown/tracker/, if you choose to use it for your lab.
I. Set up Screencast-o-matic:
Go to the Screencast-o-matic site, http://screencast-o-matic.com/, and simply click on Start Recording. There is nothing to download. When you get a small setup window, the default is to record the whole screen, which will be fine.
To start recording, all you will need to do is type ALT-P (press these two buttons at the same time), and you will get a countdown to recording. That’s it!
II. Before typing ALT-P, use a different tab/window in your Internet browser (this should work well in either Chrome or Firefox) to go to a site of a favorite video game. Be sure the video game has motion and interactions between multiple objects, because that makes for a more interesting and useful analysis and discussion of how realistic the game is. For example, one of my favorites is a game I grew up with, Asteroids. There is a free online version at http://www.play.vg/games/4-Asteroids.html, if you are interested.
III. Start Recording! All you need to do at this point is type ALT-P, wait for the countdown, and then when Screencastomatic tells you it is recording start playing the game. All you want to record is about 30 seconds – that will be more than enough for an analysis sample. When you have what you want, type ALT-P again to pause Screencastomatic.
IV. To complete the screencast video, after pausing Screencast-o-matic, you should get a window with an option to be Done with the screencast. Click on Done.
This will take you to a screen to publish the video. It is best to choose Publish to Video File. This will then give you some options. First is the type of file you want. It is recommended to use the default option, a QuickTime MP4 file. This will work with other analysis software if you have it. Keep the size Full Size (the default setting). Then click on Save Video.
You will be asked where to save the file and to name the file. It might be easiest to save on your Desktop, or start a folder for video files – that is all your choice. Choose an appropriate name for the file, and then save it! Congratulations, you just made a screencast video, and hopefully this entire process took no more than about 5 minutes!
I. Play and Analyze the video. Double-click the video file to make sure it works and that you captured the action you wanted. You can always go back through this procedure as many times as you want, with any and all video games you enjoy playing.
KEY GOAL: Determine with your partner if energy and momentum are conserved? Is your game following physics phact or phiction??
If you want to do a ‘quick and dirty’ analysis and have no access to other analysis software, then by pausing the video you can scroll it frame-by-frame. Each frame will be one-tenth of a second of time, so this is the time step we will use for your analysis. Use a small ruler and set a reasonable distance scale for your video game.
For example, on my Asteroids video, I assumed the spaceship was a one-person ship that was 10 meters in length (about 30 feet seemed a reasonable, realistic size – this is 1/5th the length of a full space shuttle, and I assumed a single, small fighter spacecraft for the game. See Wikipedia.). Below is how one would analyze the Asteroids video:
Measure the length of the ship with your ruler. Let’s say the ship is 1 cm on your monitor. So the scale is 1 cm of the video = 10 meters in reality; this is no different than a scale on a map, where 1 inch = 10 miles, for example. The large asteroids flying around might be 2.5 cm on the monitor, so this would make them large rocks of about 25 meters in diameter. You’ll need to set a scale for any video game, to find lengths, distances, masses, speeds, etc.
I need the masses for each object. Here we may need to do some research. I looked up the mass of the space shuttle on Wikipedia, and it is listed as about 2000 tonnes = 2 x 106 kg. One-fifth of this would be 4 x 105 kg, which is the mass of the spaceship I would use.
For a large asteroid in the game, I wanted a good, realistic estimate for the mass of a 25 meter asteroid. I looked up 'Asteroid' on Wikipedia and found that this is a reasonable size, as the vast majority of asteroids are under a 100 meter diameter. The data for density of some asteroids averaged around 3 g/cm3 = 3000 kg/m3, so assuming a 25 meter diameter (volume of a sphere is (4/3)πR3) spherical asteroid, this gives a mass of around 2.5 x 107 kg.
We would need to do a similar estimate of mass for smaller asteroids, when they are blasted apart in the game. The diameters would need to be measured, and then scaled in a similar way to get the masses.
Now, think about the physical quantities that can be measured/calculated. Speed = d/t, so suppose you run move the paused screencast video 10 time steps. This would be one second of real time. You measure one of the asteroids moving 1 cm on the monitor in that time. This means the asteroid moved 10 meters in one second, and its speed is 10 m/s. You can measure the speed of the bullets the spaceship shoots in a similar manner, or the speed of the ship if you have it drifting around. Or suppose the ship is at rest on the screen, and you accelerate in a straight line. You can measure how many cm it moves in a certain number of time steps, and then calculate the acceleration (assume a constant acceleration) with d = ½ at2. You could also calculate its final speed once the acceleration ends.
When you blast an asteroid, if you know its initial speed and direction (you can measure angles with a protractor on the monitor or with the analysis software), you can measure the final speeds and directions of the smaller chunks of rock – determine if momentum was indeed conserved.
With the masses and speeds, calculate the momenta of each object, and the kinetic energy of each object. Is momentum conserved when you shoot an asteroid? Is energy conserved? If not, is the change in kinetic energy negative or positive?
Calculate the gravitational forces between different objects. Are those forces relevant? That is, are they strong enough to affect each other’s motions?
How much would you weigh if you stood on one of the asteroids?
Would you be able to jump off the asteroid by exceeding the escape velocity with your jump?
What would the acceleration of gravity be on one of the asteroids?
How does the mass and speed of one of the alien spaceships compare to your spaceship?
Do all of these calculations and see what the results are!
Summarize your results: how realistic are they?
Does the video game seem to follow more closely to phact or phiction?
For teachers, you may want to specify a game, or at least a type of game, and have students focus on figuring out if one or two physical quantities are realistic or not, such as is energy conserved, or are speeds and accelerations reasonable, rather than having students look at numerous quantities.
Have phun!! J