Shadowrun: Awakened Forums Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
  Site Forums   Wiki   Bugs Tasks Code FAQ Docs Help Register  
    Page   Discussion         View source History  

Game Engine User's Manual

From Shadowrun: Awakened

Jump to: navigation, search

This document describes the structure and use of code used to construct each of our Game Applications. Before reading this document, it is best to have the code downloaded. Information on getting started can be found amongst our tutorials. For a more low-level description of classes in-game, and to cross-reference with class names appearing in this document, check out the Doxygen documentation of game engine.

Contents

Understanding SVN Structure

The three main code branches are described below. Most developers need only concern themselves with SRA_UDK_Development since it's the dynamically growing code. All other branches are utilized in the release process.

  • SRA_UDK_Development - The active development branch where new changes and patches are applied, representing the ever growing snowball of features in C++, C#, SQL, and UnrealScript, plus all supporting libraries.
  • SRA_UDK_Beta - A snapshot of the development branch after an internal release, representing the current version undergoing testing.
  • SRA_UDK_Release - A snapshot of Beta at the time of release, enabling developers to reference code out in the world when analyzing problems.

Directory Structure

Each branch listed above has a similar file structure. It include all of the code directories, plus some other important directories that support it. There is a Visual Studio solution in the root directory that opens all relevant C++ and C# code for the project. Other directories containing material that supports this code or is part some other component includes:

  • Include - This directory holds all of the C++ Header files for third-party technology in the game engine. For instance, all of the headers for the MySQL C++ connector are in here. They are grouped by the product to which they pertain. The Visual Studio projects reference this location under their "C/C++" options.
  • Lib - Holds all of the .lib and .dll files for third-party technology in the game engine. For instance, the .Net Assembly fro the MySQL .Net connector is in here. They are grouped by the product to which they pertain. The Visual Studio projects reference this location and files within it under their "Linker" options.
  • SQL - This directory contains all of the SQL code for the project, most importantly the database schema for the MySQL database. To create a local instance of the SRA database, install MySQL, then use a tool to run this SQL code on the database.
  • UDK - This directory holds a copy of all UDK files that have been changed by the project to turn a standard UDK installation into an install of SRA. This includes all of the UnrealScript, the SRA splash screen, and changed config files. This directory's hierarchy mirrors a standard UDK installation, enabling developers to easily determine where files need to be copied from this directory into their local UDK installations.

Legacy Code

The project has gone through three previous iterations in game engine. Two of the previous version were noteworthy achievements in design that may need to be revisited for insight, particularly the SRA_OGRE line since it include some generally useful C++ functionality.

  • SRA_XNA - The second prototype game engine developed in C# that integrated Microsoft XNA, Castle Active Record, and Nvidia PhysX (back when it was owned by AGEIA).
  • SRA_OGRE - The third prototype game engine developed in C++ integrating OGRE, Nvidia PhysX, Boost, and Qt.

Visual Studio Code

Our C++ and C# code is broken up amongst many libraries to more easily test our code and share it amongst numerous applications. All of this code is written and built in Visual Studio. Some libraries add features to the UDK, some are utilized by standalone applications that are part of SRA's tools or tools, and some libraries serve both purposes.

  • Routine Analyzer.exe - A small WinForms tool written in C# that connects to MySQL databases. It generates C++ and UnrealScript code for calling into the database's stored procedures. The code it generates appears in the SraData library and the UnrealScript code.
  • SraData.dll - Implements calling from C++ into MySQL stored procedures. Its intended to support manipulating the database from both C++ libraries and UnrealScript via DllBind. In the post-build events for this library, it copies the DLL into \UDK\Binaries\Win32\UserCode in both the SVN directory and the latest UDK installation's directory.
    • SraData Unit Test.exe - Calls the C++ version of data features in SraData, exercising their functionality and ensuring it runs. Please run this after making changes to SraData.
  • Support.lib - A library of supporting C++ classes that implement reusable features, including the Singleton, Object Pool, and Command design patterns, plus threading and custom collections. Code unrelated to game features that can be used by more than one library should be implemented in here.

Third Party Technologies

Our game engine integrates many other third-party technologies. The Third party technology overview will help developers grasp the underlying libraries of the engine.