T2D/TGBTutorials/WindowsSystemSetup
From TDN
Contents |
Setting up a Microsoft Windows®-based development system for Torque Game Builder
Jason “TGB Boy†Cahill
February 19, 2006
This article is designed to help you set up a Windows-based development environment to get the most out of your TGB investment. This article is also the preliminary reading material for all of the future TGB articles in this series to come, as we will assume you have at least the required elements installed and configured on your system from here on. With the exception of acquiring graphics editing software (which we don't mandate), we do not require you to spend any money to configure a powerful development environment. Throughout this article, however, we will recommend possible upgrades that will help you cut the time or frustration that can occur while building and debugging your future games.
Required Software
Torque Game Builder (if you are reading this article, you should already have this)
http://www.garagegames.com/pg/download.php?id=62
Free Tools (required)
Microsoft Visual C++ 2005 Express Edition & Microsoft Platform SDK:
http://msdn.microsoft.com/vstudio/express/visualc/download/
This is a fantastic offer! A full optimizing C++ compiler and engine development environment for free! If you plan to modify the game engine at all (such as adding support for community-released add-ons, such as the Xbox 360 Game Controller support, or building your own high-performance native code algorithms) then you will need these downloads.
If you would rather download the C++ Express compiler in a CD image format you can do so here :
http://msdn.microsoft.com/vstudio/express/support/install/
Remember to download the service pack 1 too!
Microsoft DirectX 9 SDK:
http://msdn.microsoft.com/directx/sdk/
Although the Torque game engine supports both OpenGL and DirectX for graphics, you should download the DirectX SDK to get the necessary software components to support XInput (for Xbox 360 controllers). You will also have access to a wealth of information from Microsoft’s included whitepapers to help you in thinking about building great games for the Windows platform.
Torsion – Torque Script Editor and Debugger
http://www.sickheadgames.com/torsion.php
You have two options for rich Torque Script debugging: Code Weaver and Torsion. We’ve used both and enjoy them both, but as of this writing, Torsion is the better choice for stability. In addition, Torsion supports remote script debugging, meaning you can run your game on one computer, while running the Torque Script debugger on another computer. We’ll discuss why this is important later in this article.
As of Feb. '07 Torsion is in full release meaning it is no longer free but still definitely worth it. Codeweaver has also had a final release and it has been made known that it will no longer be supported.
Recommended Hardware Upgrades (optional)
Secondary Monitor (such as a 17†CRT) (Pricewatch.com: $100)
If you can’t afford a second computer for game development and debugging, you seriously should consider purchasing a secondary monitor. Trying to run both a debugger and your game will be challenging, frustrating, and in some cases (like trying to run full screen) outright impossible without a secondary monitor. If you later decide to purchase a second computer for game development, you can reuse this monitor with that system, so there’s very little downside (other than having to spend the $100). Obviously you can spend up to $3,000 on a new monitor and I’m not recommending the “best†option, merely the most cost effective. My own personal setup has a 19-inch CRT monitor for playing my game and a 19-inch DVI-based LCD monitor (on a secondary computer) for development and debugging.
Video card supporting two monitors, for example:
- ATI Radeon 9600 AGP (Pricewatch.com $50)
- nVidia GeForce FX 6200 AGP or PCI-e (Pricewatch.com: $60)
or, if you already have a high-end video card, consider buying a secondary dirt cheap PCI video card, such as:
- nVidia GeForce MX4000 (Pricewatch.com: $45)
Recommended Commercial Tools (optional)
Adobe PhotoShop Elements 4 (Amazon.com $85, Student price: $60)
or, Adobe PhotoShop CS2 (Amazon.com: $580, Student price: $290)
Face it, at some point you are going to need to create some art—even if it’s just crappy “developer art†placeholders. You’ll be hard pressed to find a tool as rich as PhotoShop Elements for the price, particularly if you are a student. I list this as optional, because the goal of this guide is to provide you with a variety of options to keep your costs manageable. If you have a job, or the means, I strongly recommend the “real thing†over PhotoShop Elements, as you will have the same tools used by the rest of the gaming industry.
Microsoft Visual Studio 2005 Professional (Amazon.com: $725, Student price: N/A)
Ouch! For game developers, there is only one feature that matters but it will save you a bunch of time if you intend to make a lot of engine modifications: remote debugging. If you are going to be doing any serious low-level modifications to the game engine, you should consider this purchase, as there are times when remote debugging is the only way to ferret out those nasty bugs. Again, you should only consider this option if you have a secondary computer (including a laptop) that you can have close-at-hand to initiate and control the debugging. Most professional game studios have remote debugging available as an option for their game engine developers.
System Setup Options
In this section we discuss three options for setting up your system: entry-level, mid-range, and the dream development setup. Consider these setups as guidelines to be used for comparison of your development environment. Many professional game developers have at least the mid-range system, while most have the dream setup.
Entry-level setup (one computer)
- 600 MHz or faster processor
- 192 MB RAM
- OpenGL or DirectX Compatible 3D Graphics Accelerator
- 1 monitor
- DirectX compatible sound card
- Microsoft Windows XP SP2 Home Edition
- Microsoft Visual C++ Express Edition & Microsoft Platform SDK
- Microsoft DirectX SDK
- Torsion
- Adobe PhotoShop Elements
Mid-range setup (one computer)
- 1.0 GHz or faster processor
- 512 MB RAM
- Dual-head video card (can run two monitors) or 2 video cards (per the minimum recommended hardware upgrades above)
- 2 monitors
- DirectX compatible sound card
- Windows XP SP2 Home Edition
- Microsoft Visual C++ Express Edition & Microsoft Platform SDK
- Microsoft DirectX SDK
- Torsion
- Adobe PhotoShop Elements
Dream setup (two computers)
- “Gaming†system with a single-core 3 GHz or faster processor
- 1 GB RAM
- OpenGL or DirectX Compatible 3D Graphics Accelerator
- 1 monitor
- DirectX compatible sound card
- 10/100-based network card
- Windows XP SP2 Professional Edition
- Microsoft Visual C++ Remote Debugger
- Microsoft DirectX End-user Run-times
And:
- “Development†system with a 600 MHz processor or faster
- 192 MB RAM
- OpenGL or DirectX Compatible 3D Graphics Accelerator
- 1 monitor
- 10/100-based network card
- Windows XP SP2 Professional Edition
- Microsoft Visual Studio 2005 Professional Edition
- Microsoft DirectX SDK
- Torsion
- Adobe PhotoShop CS2
Software Setup
The remainder of this article is a step-by-step walkthrough of how to set up and configure all of the necessary required and free software tools listed above. When you complete this article, your development environment will be ready to go. In the next article, we will walk you through the creation of a debug build of TGB. From there, we will start creating our own game from the ground up which will teach you how TGB (and more importantly Torque Script) works.
Setting Up Torque Game Builder
If you have already downloaded and installed Torque Game Builder, you may want to “install†it again. As of this writing, TGB was version 1.1 Beta 1.1. It was distributed in a zip file named Beta1_1_T2D_SDK_1_1.zip, whose top-level folder was named Beta1_1_T2D-SDK_1_1. My recommendation is to create a folder: C:\TGB. Then, to create not one, but two copies of TGB: The first copy will be C:\TGB\Beta1_1_T2D-SDK_1_1\ and the second will be C:\TGB\Latest\. The reason for this is simple: with this setup, you have a pure, archival copy of TGB as you downloaded it and you will have a copy where you can play to your heart’s delight creating your own modifications to the engine and sample games.
Note: The remainder of these articles will assume that you have the folder structure as described above. From here forward we will refer to C:\TGB\Latest as the source location for TGB.
Setting Up the DirectX SDK
This is the most trivial of all of the required components. Simply navigate your web browser to: http://msdn.microsoft.com/directx/sdk/ and download the first link: DirectX SDK. This is a large package (approximately 350 MB) so it may take a while to download. When the download is complete, double-click the setup package and follow the on-screen instructions.
Setting Up Visual C++ Express 2005 & Platform SDK
Start by navigating to: http://msdn.microsoft.com/vstudio/express/visualc/download/
From this page, there are three steps you need to follow (assuming you don’t have any prior beta version installed). Start by clicking the Download link and saving it to your computer. When it’s finished, you should have a file called vcsetup.exe. Run it:
Here, you can choose to send your setup experience to Microsoft. I always choose to. It can’t hurt, right? When you’ve made your decision, click Next.
Accept the license agreement, then click Next.
For building Torque-based games, you really only need the Graphical IDE. If you want additional help, above and beyond what http://msdn.microsoft.com/ provides, select Microsoft MSDN 2005 Express Edition. You do not need SQL Server Express Edition, as any online game you build will use whatever database engine your ISP provides (like mySQL or MS Access). Click Next.
I recommend the default install path. Go ahead and click Next to begin the download and install process. This will take a while, depending on whether you selected MSDN Express Edition and the speed of your internet connection…
…zzzZZZzzz… Almost there!
At the completion of the install you will see this screen:
You must register within 30 days. Once you register, the software is free to use forever after, so register now to get that hurdle out of the way (Click Register Now and follow the instructions). When you are done registering, click Exit.
Now it’s time to set up the Microsoft Platform SDK. Go back to your browser, or renavigate to: http://msdn.microsoft.com/vstudio/express/visualc/download/
This time, we are going to click the link entitled install the Microsoft Platform Software Development Kit in step 4. This will navigate you to another page of instructions:
Click on the link to the Platform SDK which will take you to the download page for the SDK:
Notice the note that the 2005 version of the Platform SDK has been superceded by the Windows SDK for Windows Server 2008 and .NET Framework 3.5. The links for the old version are no longer available. As of this writing the only two options for installing the SDK are direct web installl or if you prefer you can download a DVD image, burn it to a disk, and install it from there. To install from the web click the Web Install link which will take you to the Windows SDK for Windows Server 2008 download page.
Click Download and either Run the file or Save the file to a temporary folder on your computer. If you save the file, when complete, you should have a file called setup.exe on your machine at the location you saved it, run it now. When you run the file either directly from the web or from the downloaded file the setup program will start:</p>
Click Next.
Accept the license agreement, then click Next.
I always accept the default location, but you may alter it if you like. There is no need to install the samples unless you really want to. They have nothing to do with TGB development. You can leave the folder as is, and in the next screen tell it not to install samples if you don't want them. When you are done, click Next.
You really don't need anything installed except for the Developer Tools branch of the tree but you may install what ever components you want. Click the settings you want, then click Next.
One last speed bump. Click Next.
…zzzZZZzzz… Get ready to take a big break. This process can take 15 minutes to several hours depending on your system and which options you choose to install. Your mileage may vary. When it’s finally complete, you should see this:
OK, now that the setup is complete, let’s do the additional configuration steps recommended by Microsoft:
Since this is the first time that Visual C++ has been started, it will take a couple of minutes to get ready. Then you should see a screen like this:
Select the Tools menus, then Options:
The Options dialog will appear. Now for a little tedium…
Expand the Projects and Solutions item in the left-hand panel. Then select VC++ Directories as shown above. Now, click the on the new folder icon above the right-hand list box. A blank text edit control will appear. Into it, type: C:\Program Files\Microsoft SDKs\Windows\v6.1\bin.
Then press Enter. Now, drop down the Show directories for and select Include files as shown below:
Now, all of the entries in the right-hand list box will change. Click the new folder icon and type: C:\Program Files\Microsoft SDKs\Windows\v6.1\Include.
Then, press Enter. Once again, drop the Show directories for and this time select Library files as shown below:
And, lastly, click the new folder icon and type: C:\Program Files\Microsoft SDKs\Windows\v6.1\Lib.
When done, press Enter, then click OK.
Congratulations! Visual C++ Express is set up and configured. In the next article, we will walk you through the process of building a debug version of TGB. For now, close Visual C++ Express Edition.
Setting Your Path
For whatever reason, Microsoft's installer for the Platform SDK does not update your Windows search path to include all of the useful tools and programs that ship with the SDK. It's not hard, and doing this will allow us to easily run programs like windiff from the Run... dialog or from a command prompt window.
Click on your Start button, then right-click on the My Computer icon, then left-click on Properties, as shown below:
The System Properties dialog will appear. Select the Advanced tab, then click on the Environment Variables button, as shown:
Now, the Environment Variables dialog will appear. Scroll through the list of System Variables list until you see Path. Double-click it.
Now, the Edit System Variable dialog appears. Click in the Variable Value: edit control and scroll all the way to the far right by pressing your End key. At the very end of the text, type: ;C:\Program Files\Microsoft SDKs\Windows\v6.1\bin<b> (please note the <b>; character at the start of the string to separate it from what is already included in this string).
When you are finished, click OK until all of the dialogs are gone.
Setting Up Torsion
Still with me? OK! We have one more tool to install for this article: Torsion. As of this writing, Torsion was version 1.0.357. As you read this, a newer version may be available. Start by navigating your web browser to: http://www.sickheadgames.com/torsion.php. From here you should see a link to download this fine tool. Do so and save the download to your computer. When you are done, you should have a file entitled torsion_setup.exe. Run it.
The install process is extremely straight forward. Basically, just click Next all the way until you are finished. There are no custom settings to consider. When you are done, Torsion will launch as shown below:
Conclusion
OK, that’s it for system setup! If you’ve made it this far, pat yourself on the back! It’s all fun and playtime from here on out. (*Update for VC++ 2008: See the guide located at TDN/TGB Home/Tutorials/Reference Guides/Source Code/Setting up MS VC++ 2008 Compiler and take note of the fix for the header file.) Next stop: Building a Debug Version of Torque Game Builder with Microsoft Visual C++ 2005 Express Edition.



































