Project Ideas Project Guide Ask An Expert Blog Science Careers Teachers Parents Students

Making It Real: Incorporating Physics in Video Games

Difficulty
Time Required Very Long (1+ months)
Prerequisites Some programming experience is recommended since this is an advanced project.
Material Availability Readily available
Cost Low ($20 - $50)
Safety No issues

Abstract

Have you ever played a video game and gotten so involved that you felt as if you were living inside the game? What were the characteristics of the game that made you feel part of the action? One component of an absorbing video game is an onscreen world that makes sense—a world that takes physics into account. A game in which the player feels the effect of trudging through mud, slipping on ice, or catapulting a bird is more fun than one with no environmental interaction. In this science project, you will create a game or animation including the effects of physical principles. Have fun, because the sky's the limit.

Objective

To incorporate physical principles into a video game or animation for a more realistic experience.

Share your story with Science Buddies!

I did this project Yes, I Did This Project! Please log in (or create a free account) to let us know how things went.

Credits

Michelle Maranowski, PhD, Science Buddies

Thanks to Steve Johnson, Senior Director of Design and Web Development at LinkedIn, for valuable input on physics, animation, and video gaming.

  • Half-Life is a registered trademark of Valve Corporation.
  • Havok is a registered trademark of Telekinesys Research Ltd.
  • PhysX is a registered trademark of NVIDIA Corporation.
  • Portal is a registered trademark of Valve Corporation.

Cite This Page

General citation information is provided here. Be sure to check the formatting, including capitalization, for the method you are using and update your citation, as needed.

MLA Style

Science Buddies Staff. "Making It Real: Incorporating Physics in Video Games." Science Buddies, 6 Jan. 2018, https://www.sciencebuddies.org/science-fair-projects/project-ideas/Games_p031/video-computer-games/physics-in-video-games. Accessed 21 Oct. 2018.

APA Style

Science Buddies Staff. (2018, January 6). Making It Real: Incorporating Physics in Video Games. Retrieved from https://www.sciencebuddies.org/science-fair-projects/project-ideas/Games_p031/video-computer-games/physics-in-video-games


Last edit date: 2018-01-06

Introduction

Have you ever heard of the video game Pong? It was built and marketed back in 1972 as an electronic version of a ping-pong game. On either side of the screen are two white lines that act as the "paddles" and can be moved up and down vertically. The players use their paddles to bounce a moving circle, which acts as a ping-pong "ball," back and forth, with the object of somehow getting the ball past their opponent's paddle to score points and win the game. How the ball bounces, and the angles and trajectories involved, are all based on physical principles. This video game was among the first to use physics in its design.

The use of physics in video games has improved a lot since Pong. Physics is now playing a greater role in video game design. In 2004, the game Half-Life® 2 ushered in extremely realistic physics to video games. Today, players can immerse themselves in a game and feel as if they are playing in a real world. In fact, when the physics in a game world doesn't make sense, the player's immersion in the game can be easily broken.

But how do game developers incorporate physics into their designs? Do they struggle writing mathematical formulas in the programming language that they use to create the game? What are some common techniques used to simulate action?

First of all, game developers don't usually write complex physics formulas in their games. They rely on pre-made physics engines, or extensions, for the software package that they are using, to supply the physics for the game. An engine or extension is essentially a library of commands and functions that a developer adds to the software to accomplish different kinds of action. Two kinds of engines are used: high-precision engines and real-time engines. Scientists and developers designing computer-animated movies use high-precision physics engines because these projects need lots of processing power and time to perform the detailed calculations. Game developers use real-time physics engines because they don't require extremely detailed calculations; they need quick calculations to make a game look real for the player. Examples of physics engines that game developers use are HavokTM and PhysXTM.

Game developers have to use physics when dealing with the effects of gravity, elasticity, sound, and the interaction of light with objects. Typical physics engines and extensions employ the following techniques to address a variety of situations that depend on physical laws:

  • Collision detection. Checks for collisions and then responds to collisions.
  • Ragdoll physics. Creates animations that depict a character's death or when a character picks up a limp object.
  • Deformable bodies. Gives objects the ability to deform and shatter.
  • Soft-body physics. Allows for the simulation of hair, water, clothes, etc. The calculations here are very complex.
  • Particle physics. Allows for the simulation of phenomena like snow, rain, dust, and explosions.

Each of these techniques uses a variety of algorithms, or a list of coded instructions, to perform calculations, based on physical laws and modeling methods, to perform the simulations.

In this science project you will add a physics engine to a game-oriented programming environment like GameMaker, and use it to incorporate actions based on physical principles into a simple video game or animation of your own design.

Terms and Concepts

  • Physics
  • Physics engines
  • High-precision engines
  • Real-time engines
  • Collision detection
  • Ragdoll physics
  • Deformable bodies
  • Soft-body physics
  • Particle physics
  • Algorithms
  • ZIP file
  • Catapult physics
  • Flow chart

Questions

  • Have you played any video games that seemed unreal to you or defied physics? How did that affect your game play?
  • Can you determine the physical principle or law behind the effects that you see in the video games you play?
  • What is a graphics processing unit (GPU), and how do GPUs contribute to game play?
  • What is Newtonian physics?
  • What kinds of algorithms and modeling methods are used in the physics techniques mentioned in the Introduction?

Bibliography

The following articles discuss different techniques employed by typical physics engines:

The following article investigates the physics of the popular Angry Birds game. It may give you some ideas that you can use in formulating your own game. At the bottom of the article are some other links related to physics and gaming that you can check out:

This article discusses physics as it is applied in the PortalTM 2 video game:

This page will help you get started with a programming language you can use to make a video game:

News Feed on This Topic

 
, ,
Note: A computerized matching algorithm suggests the above articles. It's not as smart as you are, and it may occasionally give humorous, ridiculous, or even annoying results! Learn more about the News Feed

Materials and Equipment

  • Computer with internet connection
  • Programming language of your choice. See the Kid-Friendly Programming Languages and Resources page for some ideas, although this project is better suited for more advanced languages like GameMaker that include physics engine capabilities or add-ons.

Remember Your Display Board Supplies

Artskills materials poster making kit

Poster Making Kit

ArtSkills buy now button
ArtSkills supplies trifold

ArtSkills Trifold with Header

ArtSkills buy now button
ArtSkills supplies poster lights

Poster Lights

ArtSkills buy now button


Making It Real: Incorporating Physics in Video Games

www.sciencebuddies.org/science-fair-projects/project-ideas/Games_p031/video-computer-games/physics-in-video-games

Experimental Procedure

Note: This engineering project is best described by the engineering design process, as opposed to the scientific method. You might want to ask your teacher whether it's acceptable to follow the engineering design process for your project before you begin. You can learn more about the engineering design process in the Science Buddies Engineering Design Process Guide.

Preparing to Design Your Game or Animation

The goal of this project is to design a video game or animation that incorporates the laws of physics to make it realistic for the player or viewer. To do this, you will need to do some background research on available programming languages and physics engines that you can use. The Kid-Friendly Programming Languages and Resources provides some information about programming langauges, but you will need to do your own research about physics engines. GameMaker is a good language to start with because it contains some built-in physics capabilities and there are third-party add-ons available.

Designing Your Game or Animation

  1. As noted at the beginning of this procedure, this project follows the Engineering Design Process. If you run into trouble making your game or animation, or if you feel you want more practice before starting this project, check out the home page for your programming language. It should contain tutorials, help documentation, and forums where you can ask questions.
  2. Define the problem. In this case, you will create a simple video game or animation that incorporates physics for a more realistic gaming, or viewing, experience for the player. Refer to the Science Buddies Define the Problem page to help you set the boundaries for the project.
  3. Do background research. Read about the history of physics in gaming and think about how physics can be used to make a game or animation better.
    1. Read the article "Evolution of Physics in Video Games" and other references in the bibliography to develop an understanding of how physics was used in games and how it is used now, and the various techniques employed for realistic simulations.
    2. Also start thinking about the goals of building a successful video game.
  4. Specify requirements. The project requirements are the characteristics that your video game or animation must have to be successful. In this case, to be successful, your game or animation must incorporate physical principles, resulting in a more realistic experience for the player. Refer to the Science Buddies Specify Requirements section for tips on how to formulate your game's design requirements. Here are some ideas to consider when formulating the requirements:
    1. Will you be designing a game or animation?
    2. What is the overarching concept of your game or animation? For instance, will you bounce a ball in a room? Create a bowling game? Throw bombs at a castle wall in a medieval game? Or ride a car through an obstacle course?
    3. What kinds of physical principles will you demonstrate? Bounce a ball against a wall and experiment with momentum? At what angles will the ball bounce off the wall? Roll balls on various surfaces and take friction into account? How will mud differ from grass? Or will you play with catapult physics and experiment with beam angles?
    4. What kinds of sprites (that is, images or animation) will you be using in your game or animation, and where will you get them?
    5. What are the physical actions that you wish to demonstrate throughout the game or animation? Does the physics engine you are using support these physical actions? How will you use the physics engine to enhance your game or animation idea?
    6. How much time can you spend on writing the game or animation? You need to write the game or animation and then test it. Try to manage your time wisely.
    7. How long will the game or animation last?
    8. What will be the player's goal and how will the game or animation end?

Building Your Game or Animation

  1. Create alternative solutions. Keeping your project requirements in mind, think about different ways that you could build your game or animation. Take a look at this Science Buddies document Create Alternative Solutions to guide your efforts.
    1. Think about different ways you could accomplish something in your game or animation. Is one simpler and still just as good? Would one solution change your original game or animation idea a little, but might end up making it better in the long run?
    2. Once you have developed a few solutions, analyze the solutions by making rough sketches and flow charts for each one. Refer to the Science Buddies Choose the Best Solution document to help you pick a working solution.
  2. Develop the solution Once you have created a set of requirements and a possible solution, it is time to open your programming environment and start working on building a sample video game or animation. After you are satisfied with the sample you create, move on to the actual programming.
    1. Build a character or object and have it operate in a simple version of your game or animation. Remember to review your requirements so that you keep yourself focused on the task. For guidance, review the Science Buddies Prototyping document.
    2. Program your video game or animation and keep testing it as you work. When you have fulfilled a requirement or task, run the game or animation and test it out.
      1. Break the programming up into smaller tasks, so that the project is not overwhelming.
      2. Test the game or animation along the way so that you can fix small issues as they come up. This will prevent your having a long set of events at the end that don't work.
      3. Once you have finished your game or animation, check to see that all of the project requirements are fulfilled.
  3. Test and redesign. Review the Science Buddies Test and Redesign document to help organize your work. Test your game or animation out on your family, your friends, and yourself. Take notes on what your players enjoyed and didn't enjoy about it. Use the feedback to improve your game or animation.

The Final Product: Presenting Your Game or Animation

  1. When presenting your game or animation at your science fair, try to bring in a computer. If you are not able to do so, take screenshots of your work, print them out, and mount them to a poster board.
  2. You should include the following items in your presentation:
    1. A list of your project requirements that guided your building of the video game or animation.
    2. The rough sketches or flow chart that describes how the game or animation works.
    3. An explanation of what you learned from your research and from ceating a realistic video game or animation based on physics.
  3. If you would like to publish your game or animation for a wider audience to play, check the home page for your programming language. Many of them have options to upload your program or game and share it online.

If you like this project, you might enjoy exploring these related careers:

NASA flight software engineer

Computer Software Engineer

Are you interested in developing cool video game software for computers? Would you like to learn how to make software run faster and more reliably on different kinds of computers and operating systems? Do you like to apply your computer science skills to solve problems? If so, then you might be interested in the career of a computer software engineer. Read more
artist drawing at computer

Multimedia Artist or Animator

If you've ever watched a cartoon, played a video game, or seen an animated movie, you've seen the work of multimedia artists and animators. People in these careers use computers to create the series of pictures that form the animated images or special effects seen in movies, television programs, and computer games. Read more
Female physicist working

Physicist

Physicists have a big goal in mind—to understand the nature of the entire universe and everything in it! To reach that goal, they observe and measure natural events seen on Earth and in the universe, and then develop theories, using mathematics, to explain why those phenomena occur. Physicists take on the challenge of explaining events that happen on the grandest scale imaginable to those that happen at the level of the smallest atomic particles. Their theories are then applied to human-scale projects to bring people new technologies, like computers, lasers, and fusion energy. Read more
Computer programmer typing on a keyboard

Computer Programmer

Computers are essential tools in the modern world, handling everything from traffic control, car welding, movie animation, shipping, aircraft design, and social networking to book publishing, business management, music mixing, health care, agriculture, and online shopping. Computer programmers are the people who write the instructions that tell computers what to do. Read more


Variations

  • Delve deeper into the physics. Instead of using a physics engine or extension, can you write any of your own physics functions from scratch?
  • If the right physics are not in a game or animation, the game world may seem unreal. To demonstrate and test this out, you can make a different version of your game or animation where the physics is not included in one or two features. How will this affect game play? Will your players notice the difference?
  • If you know another programming language, try incorporating what you learned about using physics engines into a game or animation created with that language.

Share your story with Science Buddies!

I did this project Yes, I Did This Project! Please log in (or create a free account) to let us know how things went.

Ask an Expert

The Ask an Expert Forum is intended to be a place where students can go to find answers to science questions that they have been unable to find using other resources. If you have specific questions about your science fair project or science fair, our team of volunteer scientists can help. Our Experts won't do the work for you, but they will make suggestions, offer guidance, and help you troubleshoot.

Ask an Expert

Related Links

News Feed on This Topic

 
, ,
Note: A computerized matching algorithm suggests the above articles. It's not as smart as you are, and it may occasionally give humorous, ridiculous, or even annoying results! Learn more about the News Feed

Looking for more science fun?

Try one of our science activities for quick, anytime science explorations. The perfect thing to liven up a rainy day, school vacation, or moment of boredom.

Find an Activity