Presentation is loading. Please wait.

Presentation is loading. Please wait.

LaMothe DirectX Game in Visual Studio 2008 Matthew Sable.

Similar presentations


Presentation on theme: "LaMothe DirectX Game in Visual Studio 2008 Matthew Sable."— Presentation transcript:

1 LaMothe DirectX Game in Visual Studio 2008 Matthew Sable

2 Step 1 Install Visual Studio 2008 with Visual C++ support or Visual C++ Express. Install DirectX SDK August 2007. (LaMothe’s code has poor support for future versions.) http://www.microsoft.com/downloads/detail s.aspx?FamilyID=529f03be-1339-48c4- bd5a-8506e5acf571 The following process is also applicable to Visual Studio 2005 as well.

3 Step 2 Open Visual Studio & go to File->New->Project->Other Languages->Visual C++->Win32->Win32 Project Check “Create directory for solution” & click “ok”.

4 Step 2 Continued Click “Next”, “Windows Application,” & check “Empty Project.” After clicking “Finish”, you should now have a new empty game project

5 Step 3: Linking to DirectX Go to Tools->Options->Projects and Solutions->VC++ Directories “Show directories for” Library files Double click on a blank slot underneath the other “Lib” references Navigate to the folder containing the library files (where you installed the DirectX SDK.) Move this entry to the top of the list. Repeat this process for Include files

6 Step 3

7 Step 4: Configuration In the Solution Explorer, right click on the project and choose “Properties.” For “Configuration”, choose “All Configurations” In this same window, go to Configuration Properties->General Under “Project Defaults,” change the character set to “Multibyte Character Set”

8 Step 4

9 Step 4 Continued: Additional Dependencies In this same window, navigate the tree menu to Linker->Input In the “Additional Dependencies” box, add dinput8.lib, dsound.lib, ddraw.lib, and winmm.lib WITHOUT the commas

10 Additional Dependencies

11 Step 4 Continued: SubSystem In this same window, navigate the tree menu to Linker->System Change the “SubSystem” to Windows.

12 SubSystem

13 Building your game Make sure your screen color is set to 16-bit. (Many of the samples will not work otherwise.) LaMothe’s header files need to be added into the “Header Files” folder in the project and t3lib files need to be added into the “Source Files” folder. LaMothe’s pre-made headers and t3lib files MAY have minor typos that MAY prevent Visual Studio from properly running the games. These are often easily fixed. The most common is changing “iostream.h” to “iostream.” My samples have fixed many of these problems for you! (Tested on Windows 7 x64 Professional.)

14 Build Your Game


Download ppt "LaMothe DirectX Game in Visual Studio 2008 Matthew Sable."

Similar presentations


Ads by Google