op2_sdk:projectcreation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
op2_sdk:projectcreation [2016/10/06 03:14] – [Create a New Scenario from Scratch] vagabondop2_sdk:projectcreation [2021/03/06 21:25] (current) – [Download the Outpost 2 SDK from the Outpost Repository] vagabond
Line 13: Line 13:
 Once you have an IDE project compiling DLLs for Outpost 2, review the [[op2_sdk:projectsettings|Outpost 2 Project Settings Wiki Page]] for more optional IDE settings that will streamline the scenario development process. Once you have an IDE project compiling DLLs for Outpost 2, review the [[op2_sdk:projectsettings|Outpost 2 Project Settings Wiki Page]] for more optional IDE settings that will streamline the scenario development process.
  
-===== Download the Outpost 2 SDK from the Outpost Repository =====+===== Pull the Outpost 2 SDK from the Outpost Repository =====
  
-First, you will need a copy of the Outpost 2 SDK. The most up to date version of the Outpost 2 SDK is stored in the Outpost 2 Subversion (SVN) repositoryThe repository also contains example scenario templates and other completed scenarios that should be reviewed. To download the SDK and other example projects, see the [[opu:repository|Outpost Universe Repository page]].  +First, you will need a copy of the Outpost 2 SDK. The most up to date version of the Outpost 2 SDK is stored on the Outpost Universe GitHub pageExample scenarios and and a mission template are also on GitHub. For more information on how to access GitHub, see the [[opu:repository|Outpost Universe Repository page]]. 
- +
-A scenario template hooked into a standalone copy of the SDK is also kept on Redmine to simplify development if you are not ready to download the repository. If interested in accessing Redmine, see the [[opu:project_management|Outpost Universe Project Management Wiki Page]].+
  
 ===== Create a New Project through SVN Copy ===== ===== Create a New Project through SVN Copy =====
- 
-The recommended way to start a new Outpost 2 scenario is by using Subversion (SVN) copy to create a copy of an existing template. Starting templates of scenarios can be found on the repository at [[https://svn.outpostuniverse.org:8443/!/#outpost2/view/head/LevelsAndMods/trunk/LevelTemplates]].  
  
 The benefits of using SVN copy is that a link between the original template and the new scenario is maintained in the repository. The majority (if not all) the project and solution properties will already be preset to the correct values. SVN copy will also be faster then creating a new blank project and setting all the values manually.  The benefits of using SVN copy is that a link between the original template and the new scenario is maintained in the repository. The majority (if not all) the project and solution properties will already be preset to the correct values. SVN copy will also be faster then creating a new blank project and setting all the values manually. 
Line 53: Line 49:
  
 Whether a scenario is created through SVN copy or from a blank Visual Studio project, it is best to work within a local copy of the Outpost 2 repository. New scenarios should be placed under Outpost2SVN\LevelsAndMods\trunk\Levels. Create a sub directory under Levels for your new scenario.  Whether a scenario is created through SVN copy or from a blank Visual Studio project, it is best to work within a local copy of the Outpost 2 repository. New scenarios should be placed under Outpost2SVN\LevelsAndMods\trunk\Levels. Create a sub directory under Levels for your new scenario. 
-r L+
 **Creating a new Project** **Creating a new Project**
  
Line 63: Line 59:
  
 **Note:** //Creating a new project also creates a solution. A solution is a group of related projects. At this point, you will only have the 1 project you created in your solution.// **Note:** //Creating a new project also creates a solution. A solution is a group of related projects. At this point, you will only have the 1 project you created in your solution.//
 +
 +===== Setting Project Properties =====
 +
 +Visual Studio defaults to compiling a project into an executable. Outpost 2 scenarios are compiled as Dynamic Link Libraries (DLL), and this must be set in the project properties.
 +
 +  - Right click on your scenario's project from the Solution Explorer.
 +  - Set Configuration to All Configurations
 +  - Set Platform to All Platforms
 +  - Click Properties -> Configuration Properties -> General.
 +  - Set Configuration Type to Dynamic Library (.dll).
  
 ===== Including Other Projects in Solution ===== ===== Including Other Projects in Solution =====
Line 86: Line 92:
  
   - Ensure the project is included in the scenario (see above).   - Ensure the project is included in the scenario (see above).
-  - In the Solution Explorer, expand your custom mission DLL.+  - In the Solution Explorer, expand your custom mission project.
   - Right Click on References -> Add Reference.   - Right Click on References -> Add Reference.
   - Select all projects your scenario will depend on, usually Outpost2DLL and OP2Helper.    - Select all projects your scenario will depend on, usually Outpost2DLL and OP2Helper. 
Line 112: Line 118:
  
 After adding references to the other projects that your scenario will depend on, you usually also need to add an additional include directory to your main project that locates the referenced projects. This helps Visual Studio locate source code from the other projects. After adding references to the other projects that your scenario will depend on, you usually also need to add an additional include directory to your main project that locates the referenced projects. This helps Visual Studio locate source code from the other projects.
 +
 +**Note:** //Visual Studio does not show the C/C++ compiler options folder in the project properties until a .cpp file is contained within the project. If your project does not yet contain a .cpp file, ensure you add one before continuing (typically named main.cpp).//
  
 **Adding Additional Include Directories** **Adding Additional Include Directories**
Line 127: Line 135:
 When a new project is created in Visual Studio, a solution is also created. Within the solution, 2 default configurations are available, Debug and Release. While more custom configurations can be created, these 2 configurations are typically adequate for creating Outpost 2 scenarios. When a new project is created in Visual Studio, a solution is also created. Within the solution, 2 default configurations are available, Debug and Release. While more custom configurations can be created, these 2 configurations are typically adequate for creating Outpost 2 scenarios.
  
-If you plan on using Visual Studio's debug tools or other debug tools, you will usually want to build using the Debug configuration. The debug configuration will compile the code with full symbolic debug information and no optimization. Release optimizations will often apply optimizations that remove variables, inline functions, unroll loops or other optimizations that complicate debugging.+If you plan on using Visual Studio's debug tools or other debug tools, you will usually want to build using the Debug configuration. The debug configuration will compile the code with full symbolic debug information and no optimization. Compiling the scenario's source code in release configuration will often apply optimizations that remove variables, inline functions, unroll loops or other optimizations that complicate debugging.
  
 If debug tools are unnecessary in a scenario's development, the code may be compiled in release mode for testing. If later testing is required of release mode code and the associated PDB file is available, the release code may still be debugged. In this situation, applied release optimizations may complicate the process. If debug tools are unnecessary in a scenario's development, the code may be compiled in release mode for testing. If later testing is required of release mode code and the associated PDB file is available, the release code may still be debugged. In this situation, applied release optimizations may complicate the process.
Line 166: Line 174:
  
   - From Visual Studio, right click on your project in the Solution Explorer.    - From Visual Studio, right click on your project in the Solution Explorer. 
 +  - Set Configuration to All Configurations.
 +  - Set Platform to All Platforms.
   - Select Properties -> Linker -> Advanced.   - Select Properties -> Linker -> Advanced.
  
Line 200: Line 210:
  
 ----  ---- 
- - //Go Back to [[op2_sdk:software_development_kit_sdk|Outpost 2 Mapmaking]]//\\+ - //Go Back to [[op2_sdk:software_development_kit_sdk|Outpost 2 Software Development Kit]]//\\
  - //Go Back to [[outpost_2:outpost_2|Outpost 2 Main page]]//\\  - //Go Back to [[outpost_2:outpost_2|Outpost 2 Main page]]//\\
- - //Go Back to [[http://wiki.outpostuniverse.org/doku.php?id=start|Wiki Home Page]]//+ - //Go Back to [[http://wiki.outpost2.net/doku.php?id=start|Wiki Home Page]]//
  • op2_sdk/projectcreation.1475723654.txt.gz
  • Last modified: 2016/10/06 03:14
  • by vagabond