-
Notifications
You must be signed in to change notification settings - Fork 56
How To Compile and Test Your GameGuru Build
Overview and Prerequisites
GameGuru Dev Kit requires a Windows PC (7 or above) with a dedicated graphics card (DX11 2GB) and sufficient storage (ideally SSD) and at least 4GB of system memory. It also requires a Steam account with access to the latest release version of GameGuru on Steam. The computer will need to be connected to the internet for access to the online repositories and submissions.
In addition, the following free software is required:
- Visual Studio Community Edition 2015
- Windows Kits 8.1 and 10.0 SDK Installed
- SourceTree for GitHub Client (uses Git LFS)
- Ensure the above items have been installed on your system before you start the downloading of the repositories in the Installations section.
Installation
From a fresh install of Windows (Windows 7 (or 10) will need the latest service pack installed), you can proceed to set up the system for regular Steam gaming, which means installing the Steam client and downloading and running GameGuru, which will install some dependencies automatically (such as Win32 and DirectX runtime dependencies). Once the above prerequisites have also been installed, you can proceed to clone this GitHub repository (use the F:\GameGuruRepo if possible):
GameGuruRepo = https://github.com/LeeBamberTGC/GameGuruRepo
You will require collaborator access to be able to change the above repository, which you can get by emailing the owner of the GitHub account ([email protected]) having first created your own GitHub account and created an account username. If you are a freelancer, send this username to the above email address to get collaborator access permissions.
Once you have been invited and have accepted access to the repository, you can click the green CLONE button to obtain the URL required by the GitHub client tool of your choice (SourceTree is a good GitHub client IDE) which makes the administration of pulling and pushing commits to the repository much easier.
With the installation of the repository completed as described above, you should have a directory structure that looks similar to this:
_F:\GameGuruRepo_
GameGuru
GameGuru Core
GameGuru IDE
Internal Docs
Drive F is chosen as it allows you to configure an SSD drive letter dedicated to fast compiling and allows projects that may contain absolute paths for debugging purposes to continue to work even if another user has not restored use of absolute paths back to relate.
Compiling and Testing Release Versions
Before you proceed to compile, you need to make some manual changes to the files you checked out (to get around the issue of SourceTree hiding BIN, DEBUG and RELEASE folders). Navigate to the following folders and rename them by removing the '(renameinsteadofbuild)' portion of the folder name. This means you do not have to compile the LIBs manually:
GameGuruRepo\GameGuru Core\SDK\DirectXTex\DirectXTex\Bin(renameinsteadofbuild)
GameGuruRepo\GameGuru Core\SDK\DirectXTex\DirectXTex\Bin\Desktop_2015\Win32\Debug(renameinsteadofbuild)
GameGuruRepo\GameGuru Core\SDK\DirectXTex\DirectXTex\Bin\Desktop_2015\Win32\Release(renameinsteadofbuild)
With the above dev kit folder created, you can proceed to perform the following tasks:
Compiling Guru-MapEditor.exe (found in the root GameGuruRepo\GameGuru folder):
- Open GameGuru.sln via Visual Studio (from GameGuruRepo\GameGuru Core folder)
- Ensure the RELEASE profile is selected in Solution Configurations
- Right-click Guru-MapEditor and select REBUILD
- All associated LIBs will be compiled, then the Guru-MapEditor.exe will be compiled and created
Compiling Guru-Lightmapper.exe (found in the root GameGuruRepo\GameGuru folder):
- Open GameGuru.sln via Visual Studio (from GameGuruRepo\GameGuru Core folder)
- Ensure the RELEASE profile is selected in Solution Configurations
- Right-click Guru-Lightmapper and select REBUILD
- All associated LIBs will be compiled, then the Guru-Lightmapper.exe will be compiled and created
- Compiling GameGuru.exe (found in the root GameGuruRepo\GameGuru folder)
Open GameGuru IDE.sln via Visual Studio (from GameGuruRepo\GameGuru IDE folder):
- Ensure the RELEASE profile is selected in Solution Configurations
- Right-click GameGuru and select REBUILD
- The IDE element GameGuru.exe will be created in the root folder (as above)
Testing the GameGuru Dev Build (found in the root GameGuruRepo\GameGuru folder):
- Double-click GameGuru.exe in the root folder and wait for the IDE to finish booting
- Drop in any static entity from the library then press Test Game
- When in Test Game, press F2 to cause the lightmapping process to start
- If the entity has been lightmapped, the main software executables are functioning normally
Compiling for Debug Mode
Ensure you have successfully built all your RELEASE mode binaries first (GameGuru.exe, Guru-MapEditor.exe, Guru-Lightmapper.exe) to ensure all the release LIBS are built and also to confirm that everything up to this point has been set up correctly. Follow these steps to compile and step through GameGuru in debug mode:
- Open GameGuru.sln via Visual Studio (from GameGuruRepo\GameGuru Core folder)
- Ensure the DEBUG BUILD ALL profile is selected in Solution Configurations
- Right-click Guru-MapEditor and select CLEAN, there should 30 cleaned projects reported
- Right-click Guru-MapEditor and select REBUILD
- All LIBs will be recompiled, you will notice GameGuruRepo\GameGuru Core\Lib folder is much larger
- Notice the Guru-MapEditor.exe will be compiled and created, again a much larger file size
Once you have successfully created the Guru-MapEditor.exe you can press F5 or select 'Start Debugging' from the Debug menu which will launch the GameGuru.exe binary which in turn will launch the Guru-MapEditor.exe. Because you are launching a different executable under F5 than the one you created the debug symbols for, you will need to 'attach' your debugging session to the Guru-MapEditor.exe that is now running in the background (though associated with GameGuru.exe).
You can do this in one of two ways:
-
You can find the WinMain function in DarkEXE.cpp and comment back in the MessageBox line, and the next time you run debug mode with F5, you will be presented with a message box. At this point, switch to Visual Studio, and go to the Debug Menu > Attach to process and then select the Guru-MapEditor.exe process listed in the dialog, and click OK. You have now associated your debug session with the correct project and any breakpoints you inserted into the project will now work.
-
A better way is to automate this process and buy ENTRIAN (http://entrian.com/attach/download.html) which allows you to detect for the launching of a specific process name and automatically attach the debug process for you. It's something Visual Studio 2015 cannot do and is a huge timesaver if you spend a lot of time running and testing in debug mode!
A great place to put your first break-point for actual GameGuru debugging is in the function called 'common_init' inside the file called Common.cpp. This breakpoint skips the mundane setting up of the engine (primarily based on the old Dark Basic Pro game engine) and gets you to what was the first line of DBP code (before we converted everything to C++). For old-school DBPro coders, you may find many of the command names strangely and comfortably familiar.
It is also important when running debug (or release) that your StartUp project is set correctly. If it is not set up properly, you might experience an error such as "Unable to start program...Animation.lib". As you can see, the debugger is trying to run a LIB, which is simply not possible. To correct this, from your GameGuru Core solution (GameGuru.sln), right click on the Guru-MapEditor project on the left and select 'Set as Startup Project'. This will make the project title go Bold and when you next press the Debug button, it will execute the correct project.
Compiling Notes
You may encounter some issues compiling from a fresh Windows installation, and some of these have been captured here to provide guidance should you encounter them.
-
If you find the compile is asking for the specific F:\TGCSHARED\GameGuru\GameGuru, this path is specified in the Guru-MapEditor project properties, under Linker > Debugging > Database file. Just delete this path and it will use the default location for VS compiles.
-
When attempting to run using F5 from the VS IDE, the Mapeditor component may run instead of the main GameGuru IDE. To resolve this, go to Guru-MapEditor project, and under properties, Debugging change the Release profile for the Command to "$(ProjectDir)....\GameGuru\GameGuru.exe" and the Working Directory to "$(ProjectDir)....\GameGuru". This will launch the correct executable and assign the correct current working folder on debug launch. Remember to compile the lightmapper project and the IDE executable before attempting to compile and run the Release build of GameGuru.
More Media
For existing GameGuru users, you will notice that the repository is lacking most of the entities from the library. To restore them, simply copy them from your Steam installation. For freelancers, make sure you don't check these files into the repository unless they have been fixed or improved. The cleanest option is to create a copy of the GameGuru folder outside of the repository local copy for media and level testing.
Permitted Usage
It should be made clear that this is NOT an open source project and all material is copyright The Game Creators, and any work submitted to the repository is automatically given over to TGC to use for any purpose and all I.P and copyright transferred over to TGC. You may use this repository to help improve GameGuru, to work on freelance contracts from TGC and also to modify and improve GameGuru for your own game. It is expressly forbidden to use this source code to create any kind of maker product (i.e. game maker, app maker, level maker). If there are any doubts about the usage rights, you can contact us directly at [email protected]
Reporting Issues
This repository is very new and there will be many issues to resolve before it runs smoothly. Please report issues directly to Lee at [email protected] (while this notice is in effect) so we can resolve them quickly.