打造免费的游戏开发环境

来源:互联网 发布:金蝶进销存软件破解版 编辑:程序博客网 时间:2024/04/28 19:48
打造免费的游戏开发环境
 
目前,Windows用户占了全大多数,因此开发的游戏运行环境,就肯定是Windows了。而在windows开发中,开发工具的选择,肯定是微软的比较好。而游戏开发平台,最好的又是C++了,因为Windows和DirectX组件的开发,就是基于C和C++的。好了,现在就教你打造一个使用免费的微软VS2005中的VC++。
 
第一步:下载Visual C++ 2005 Express Edition
到微软的网站下载,它的大小有400多M。
http://go.microsoft.com/fwlink/?linkid=57034
然后再去看这个网页,它详细地指导你怎么样安装平台SDK,然后怎么样修改VC2005 E的配置文件,让它可以开发Win32的原生程序。
http://msdn.microsoft.com/vstudio/express/support/install/
 
第二步: 下载平台SDK
在这里下载的是Windows® Server 2003 SP1 Platform SDK ,它的下载连接是
http://download.microsoft.com/download/9/7/a/97a5ac16-69ae-4672-b93e-40d66d77b278/5.2.3790.2075.51.PlatformSDK_Svr2003R2_rtm.img
这个文件也不小,所以上面所有的连接建议采用FlashGet来下载,但有一点要注意的,就是FlashGet里要取消那个可以从镜像网下载,否则就下载不了。
 
第三步:下载DX SDK
要开发游戏,刚刚有上面的东西还不行。那只是能开发一般的Windows程序,要开发游戏,就得下载Direct X SDK,才能使用里面的Direct3D。
到下面的连接下载SDK,当然也可以下载更新的SDK。
http://download.microsoft.com/download/6/4/4/6444ce7d-0703-4835-8d0d-df8d891bee5d/dxsdk_apr2006.exe
 
第四步:安装Visual C++ 2005 Express Edition
下载完成之后,就是安装VC++2005了,而下载的文件是ISO文件,就是光盘映像文件。这个要么烧成光盘,然后再安装,或者使用虚拟光驱软件。但使用虚拟光驱软件是最方便的了,又省了很多功夫。最好的虚拟光驱软件就是daemon,它安装之后,要重新启动,就可以打开很多种虚拟光盘文件了。
 
第五点:安装platform SDK
安装平台SDK是没有什么可说的。
 
第六步:安装DX SDK
这个SDK安装也是很简单的。
 
第七步:修改Visual C++ 2005 Express Edition配置文件
主要看下面的文章来修改。
 
蔡军生 于深圳 2006921星期四
 
http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/
Using Visual C++ 2005 Express Edition with the Microsoft Platform SDK
By Brian Johnson,
Microsoft Corporation
You can use Visual C++ Express to build powerful .NET Framework applications immediately after installation. In order to use Visual C++ Express to build Win32 applications, you'll need to take just a few more steps. I'll list the steps necessary for building Win32 applications using Visual C++ Express.
Step 1: Install Visual C++ Express.
If you haven't done so already, install Visual C++ Express.
 
Step 2: Install the Microsoft Platform SDK.
Install the Platform SDK over the Web from the Download Center. Follow the instructions and install the SDK for the x86 platform.
 
Step 3: Update the Visual C++ directories in the Projects and Solutions section in the Options dialog box.
Add the paths to the appropriate subsection:
Executable files: C:/Program Files/Microsoft Platform SDK for Windows Server 2003 R2/Bin
Include files: C:/Program Files/Microsoft Platform SDK for Windows Server 2003 R2/Include
Library files: C:/Program Files/Microsoft Platform SDK for Windows Server 2003 R2/Lib
Note: Alternatively, you can update the Visual C++ Directories by modifying the VCProjectEngine.dll.express.config file located in the /vc/vcpackages subdirectory of the Visual C++ Express install location. Please make sure that you also delete the file "vccomponents.dat" located in the "%USERPROFILE%/Local Settings/Application Data/Microsoft/VCExpress/8.0" if it exists before restarting Visual C++ Express Edition.
 
Step 4: Update the corewin_express.vsprops file.
One more step is needed to make the Win32 template work in Visual C++ Express. You need to edit the corewin_express.vsprops file (found in C:/Program Files/Microsoft Visual Studio 8/VC/VCProjectDefaults) and
Change the string that reads:
AdditionalDependencies="kernel32.lib" to
AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib"
 
Step 5: Generate and build a Win32 application to test your paths.
In Visual C++ Express, the Win32 Windows Application type is disabled in the Win32 Application Wizard. To enable that type, you need to edit the file AppSettings.htm file located in the folder “%ProgramFiles%/Microsoft Visual Studio 8/VC/VCWizards/AppWiz/Generic/Application/html/1033/".
In a text editor comment out lines 441 - 444 by putting a // in front of them as shown here:
// WIN_APP.disabled = true;
// WIN_APP_LABEL.disabled = true;
// DLL_APP.disabled = true;
// DLL_APP_LABEL.disabled = true;
Save and close the file and open Visual C++ Express.
From the File menu, click New Project. In the New Project dialog box, expand the Visual C++ node in the Product Types tree and then click Win32. Click on the Win32 Console Application template and then give your project a name and click OK. In the Win32 Application Wizard dialog box, make sure that Windows application is selected as the Application type and the ATL is not selected. Click the Finish button to generate the project.
As a final step, test your project by clicking the Start button in the IDE or by pressing F5. Your Win32 application should build and run.
 
 
原创粉丝点击