Difference between revisions of "GAM666/DPS901 Student Resources"

From CDOT Wiki
Jump to: navigation, search
(A Note on Visual Studio Includes: Added A Note on Visual Studio Includes.)
Line 1: Line 1:
{{GAM666/DPS901 Index | 20103}}
+
{{GAM666/DPS901 Index | 20113}}
 
=Student Resources=
 
=Student Resources=
The purpose of this page is to provide a space for students to share useful information that can help groups with their game projects.
+
The purpose of this page is to share useful information that can help groups with their game projects.
  
 
==A Note on Visual Studio Includes==
 
==A Note on Visual Studio Includes==

Revision as of 17:16, 27 September 2011


GAM666/DPS901 | Weekly Schedule | Student List | Project Requirements | Teams and their Projects | Student Resources


Student Resources

The purpose of this page is to share useful information that can help groups with their game projects.

A Note on Visual Studio Includes

A problem that we ran into here at Team Mutalisk was that our vcxproj file was being committed into the repository along with the committing user's include information. The problem with this was that other members had different include paths to the DX SDK and so when they updated after that user had committed, their vcxproj file would be updated and the project would not compile for them.

We've come up with a solution to this problem:

  1. Set the header include path (Solution->Right-Click Project->Properties->Configuration Properties->VC++ Directories->Include Directories) for the project to: $(IncludePath);%INCLUDE%;
  2. Set the library include path (Solution->Right-Click Project->Properties->Configuration Properties->VC++ Directories->Library Directories) for the project to: $(LibraryPath);%LIB%;
  3. Do this for all configurations (Solution->Right-Click Project->Properties->Configuration(top of box))
  4. Create/Set the environmental variables INCLUDE and LIB on your system. Do this through the Environment Variables dialog box.
    • (Win7/Vista: Start Menu->Right-Click Computer->Properties->Advanced system settings->Advanced tab->Environment Variables)
    • (WinXP: Start Menu->Right-Click My Computer->Properties->Advanced tab->Environment Variables)
  5. You can add the environment variables to either only your account, at which point the project will only compile when you are logged into your own account, or to the entire system, at which point the project will compile will compile on any account on your machine. Make a decision and then click New under the appropriate list (top is user, bottom is system).
    • Please note that in order to modify system environmental variables, your account must possess admin privileges or you must know the admin credentials (win 7) or must be logged into the admin account (Vista or older).
  6. First create the variable INCLUDE. Enter INCLUDE in the Variable name box. Enter the path to your DX SDK/Include in the Variable value box; eg if my DX SDK is located at C:\Program Files\Microsoft DirectX SDK (August 2007) then the value of my INCLUDE variable would be: C:\Program Files\Microsoft DirectX SDK (August 2007)\Include;
  7. Second create the variable LIB. Enter LIB in the Variable name box. Enter the path to your DX SDK/Lib/x86 in the Variable value box; eg if my DX SDK is located at C:\Program Files\Microsoft DirectX SDK (August 2007) then the value of my LIB variable would be: C:\Program Files\Microsoft DirectX SDK (August 2007)\Lib\x86;
    • Please note that if either of the two variables already exists on your system, simply edit its value and concatenate the relevant path to its current value. Ensure that all paths are separated by semicolons. Eg: C:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib;C:\Program Files\Microsoft DirectX SDK (August 2007)\Lib\x86;
  8. Logout then login to refresh the windows environmental variable cache.
  9. Attempt to compile the project. Assuming that you have no syntax errors or other unrelated problems, the project should compile. If it does, then it's time commit the vcxproj file to your repository. Now that it's up there, others can modify it (add/remove files) without worrying about breaking other group members' dependencies.

This concludes the vcxproj tutorial, cheers!

-northWind

Useful diagrams

Useful links around the web

Useful code snippets

   foo("Hello World");