Visual Studio Project Wizards
Delta3D has a little known set of Visual Studio Wizards which can help develop the start of new projects quickly and easily. This tutorial will explain what the Wizards are and how to use them.
Note: The Delta3D Visual Studio Wizards are known to work with Visual Studio 2005 and Visual Studio 2008 Professional, but should work with just about any of the modern Visual Studio versions.
Console Application The most simple of the Wizards, this one will generate a dtABC::Application derivative, with all the important virtual methods pre-generated and available for user. The project will link the required Delta3D libraries and generate an executable file.
EntryPoint Wizard One of the newer Wizards, the EntryPoint Wizard will create a new dtGame::GameEntryPoint derivative project that compiles to a dynamic library which can be used with the GameStart utility or any other GameEntryPoint application.
EntryPoint Launcher Wizard A simple executable that will load and start a GameEntryPoint library, similar to the Delta3D GameStart utiliity.
The Visual Studio Wizards are not automatically installed and require a some file copying to allow Visual Studio to load the wizards.
Copy the Wizards
First, copy the contents of %DELTA_ROOT%/VisualStudio/utilities/vcWizard/VCWizards to the Visual Studio folder (e.g., C:\Program Files\Microsoft Visual Studio 9.0\VC\VCWizards)
Copy the Projects
Then copy the contents of %DELTA_ROOT%/VisualStudio/utilities/vcWizard/vcprojects to the Visual Studio folder (e.g., C:\Program Files\Microsoft Visual Studio 9.0\VC\vcprojects)
Start Visual Studio
The Wizards should be available from File->New->Project under the Visual C++ heading.
To create a new GameEntryPoint library:
- Start Visual Studio.
- Select the Delta3D EntryPoint Wizard (File->New->Project->Visual C++).
- Enter a name and location for the project in the supplied entry boxes and select "OK".
- Choose the options you desire
- Use Default Message Processor - required to send Messages through the GameManager
- Create InputComponent - creates a GMComponent which can be used to catch keyboard and mouse events
- Use Default Network Publishing Component - required for networking two or more Delta3D applications together.
- Click "Finish" to generate the files.
- The generated GameEntryPoint is a dynamic library, it is not executable and therefor needs something to load it (e.g., GameStart.exe, EntryPoint Launcher project)
To add a new EntryPoint launcher to the existing Solution (assuming a GameEntryPoint project already exists in the Solution):
- Select the Delta3D EntryPoint Launcher Wizard (File->Add->New Project->Visual C++)
- Enter a name and location for the project and select "OK".
- Supply the GameEntryPoint's library name as the Launcher's command arguments
- Select the launcher's project, then Project->Properties->Debugging->Command Arguments).
- Enter the path and root name of the GameEntryPoint's filename (e.g., "../../EntryPoint1/Debug/EntryPoint1").
- Note: supply the path to the Debug folder for the Debug configuration and Release for the Release configuration.
- Make the EntryPoint Launcher project depend on the GameEntryPoint library project (select the Launcher's project, then Project->Project Dependencies).
- Now set the EntryPoint Launcher project as the Startup Project and run it.
- Note: The stock generated project should show a Delta3D window that is rendered blue. Hitting the escape key should exit the application.