Mpg Labs

Introduction

The laboratory aspect of the Math and Physics for Games I course differs significantly from most other beginning physics labs in that no physical experiment is performed. Instead, students will take the lessons learned from lecture and apply them to typical programming challenges. Each lab is designed to build competency in developing and implementing algorithms for the modeling of basic mechanics and vector and linear algebra. One thing that is not done in these labs is on-screen rendering. Our focus is on the generation of correct position, orientation, and momentum vectors for objects. Interpreting an object's position vector relative to a camera and rendering an on-screen image is a task for Game Programming I and II. The labs are ordered in such a way as build upon one another. Each lab will rely to a greater or lesser extent on the successful completion of the previous lab.

These labs and this course is still a work in progress. If you have any questions about the material contained here, or notice any inconsistencies, typographical errors, or material errors, please contact us and let us know. We'll work as quickly as possible to answer your questions or address any problems.

Dr. J. Douglas Patterson
Professor of Astronomy and Physics
ude.cccj|rettapd#ude.cccj|rettapd
http://blogs.jccc.edu/dpatter/

Prof. Rob Grondahl
Professor of Mathematics
ude.cccj|lhadnorgr#ude.cccj|lhadnorgr

Johnson County Community College
12345 College Blvd.
Overland Park, KS 66210

Laboratory Report Format

The write-up that you will submit should be thought of as a hybrid of a traditional science lab report and a software design document. As with a traditional lab report, you will want to include a discussion of your problem, the methods you used to solve the problem, and an analysis of the effectiveness of your methods and quality of your solution. As with a traditional design document, you'll need to include a discussion of your data design, the architecture, the interface design (strictly console for us), and procedural design. From your well-written report, any other programmer should be able to replicate your code.

At the beginning of each lab period, you will be required to submit a preliminary technical design document including a flowchart and class diagram of the code you propose to create for that day's project. This is an essential part of any project and a task with which you should already be familiar and skilled. While the flowchart you create will help you organize your thoughts, and help you begin to determine what tasks and variables you will need, keep in mind that it is a preliminary plan. As General Dwight D. Eisenhower said, "Plans are nothing; planning is everything." Your flowchart is a beginning point, not a rigid blueprint.

By the end of each lab period, you should have displayed working code. The previously mentioned flowchart will be a crucial piece in your preparation for meeting this deadline.

There is no required minimum or maximum length for your reports, but we do encourage you to embrace the wisdom of Albert Einstein who said, “Things should be made as simple as possible, but never more so.” In other words, be sure that you describe your coding solution clearly and fully, but don't feel the need to be overly verbose.

In addition to your prose, be sure to include at the end of your report your post-lab answers and a hard-copy of your code.

Sample Structure:

  • Technical Design Document (TDD) due the day of lab
    • Introduction
      • Give a brief description of the goals of the lab.
      • Connect these goals to game development.
    • Mathematical/Physics Methodologies
      • Explain how you accomplished the various goals of the lab.
      • Include and explain any mathematical formulas need to accomplish the goals of the lab.
      • This section should be a combination of prose and formulas. It should not include code snippets. Be language agnostic.
    • Flowchart
      • Include a flowchart of the main driver program.
      • Include a flowchart of each new method for your Vector3D class.
    • UML Class Diagram
      • Include a UML-compliant diagram of your entire Vector3D class.
      • Highlight new methods added for the current project.
  • Postmortem due the week after lab
    • Results (What did your project produce?)
      • Include input and output for all relevant test cases.
      • Explain why those cases were used.
      • Comment on how your results did or did not conform to expected results.
    • Conclusion (What went well, what went wrong, what lessons were learned?)
      • Summarize what you accomplished and failed to accomplish.
      • Discuss what you learned in the process.
      • Discuss possible improvements in the future.
    • Code
      • Be sure to include a comment header with your name and other general information
      • Document the code
        • Someone should be able to tell what your code is doing by only reading the comments.
        • Whenever variables are declared that represent quantities be sure to indicate the units used if applicable

Here's a sample of an Example Lab Report.

Lab grading rubric:

CODE Points Percentage
Working Program 17 pts 34%
Documentation 8 pts 16%
TDD
Introduction 2 pts 4%
Methodology 2 pts 4%
Flowchart 3 pts 6%
Class Diagram 2 pts 4%
Grammar and Spelling 1 pt 2%
POSTMORTEM
Results and Sample Output 5 pts 10%
Conclusions 5 pts 10%
Postlab 4 pts 8%
Grammar and Spelling 1 pt 2%
Total 50 pts 100%

Laboratory Experiments

Unit One (Vectors and 1D Motion)

Unit Two (Vectors and 2D/3D Motion)

Unit Three (Collisions)

Unit Four (Rotation)

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License