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 generating 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 are 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.

Technical Design Document

The Technical Design Document should include any planning materials, along with a class diagram of the code you intend to create for that day’s project. This document is a critical part of the process and one you should already be comfortable with. Planning documents serve as a way to organize your ideas, identify necessary methods, and outline needed variables. Remember, however, that they represent a preliminary plan. As General Dwight D. Eisenhower once said, “Plans are nothing; planning is everything.” Your planning documents should be seen as a starting point rather than a rigid blueprint. In addition, the Technical Design Document must contain the first two sections of your lab report: Introduction, and Mathematical and Physics Methodologies. Together, these sections provide an overview of the project’s objectives and explain the methods you will use to achieve them.

Postmortem

The Postmortem should include two main sections: Results and Conclusions. In the Results, describe the input and output of your testing scenarios, along with any insights you gained from them. In the Conclusions, summarize what you learned and guide how the work could inform future projects. There is no strict length requirement for your report. However, keep in mind Albert Einstein’s advice: “Things should be made as simple as possible, but never more so.” In practice, this means your coding solution should be explained clearly and thoroughly, without unnecessary detail. Finally, be sure to include your responses to the post-lab questions at the end of the Postmortem.

Source Code

In addition to your postmortem, you should submit a hard copy of your code with documentation.

Sample Structure

Technical Design Document (TDD)

Due on the Monday of the first week of lab (Turn In Paper Copy In Class)

  • Planning documents
    • This can be a flowchart, pseudocode or whatever method you prefer.
  • UML Class Diagram
    • Include a UML-compliant diagram of your entire Vector3D class.
    • Highlight new methods added for the current project.

Due on the Friday of the first week of lab (Turn In Digitally in Canvas)

  • 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.

Postmortem

Due on the Friday of the second week of lab (Turn In Digitally in Canvas)

  • 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.
  • Answers to the postlab questions.

Source Code

Due on the Friday of the second week of lab (Turn In Digitally in Canvas)

  • 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 34 pts 34%
Documentation 16 pts 16%
TDD
Introduction 4 pts 4%
Methodology 4 pts 4%
Flowchart 6 pts 6%
Class Diagram 4 pts 4%
Grammar and Spelling 2 pt 2%
POSTMORTEM
Results and Sample Output 10 pts 10%
Conclusions 10 pts 10%
Postlab 8 pts 8%
Grammar and Spelling 2 pts 2%
Total 100 pts 100%

Laboratory Experiments

In Production

Unit One (Vectors and Motion)

Unit Two (Energy and Collision)

Unit Three (Transformations and Rotation)

Unit Four (Quaternions)

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