Appendix E - Getting Visual Studio and the Unreal Engine

"It ain't a song until you sing it."
- Elvis Presley

Throughout this book we use the Microsoft Visual Studio / Epic's Unreal Engine / NVidia PhysX [1][2][3] toolchain; it does not require to pay a license fee at least for learning and for development as individual developer or as a small team (see the respective licenses for details). We describe the situation on a Windows10 desktop computer, but it is perfectly possible to set up this toolchain for other platforms. For serious development of especially a new simulation project, we strongly recommend to stay up to date to the latest stable releases of these tools. So if this document shows version numbers that are slightly out of date they are understood to to substituted by the most recent ones if not explicitely stated otherwise.

Getting Microsoft Visual Studio 2019:

  1. Download Microsoft Visual Studio Community 2019 installer from [1].
  2. In the installer specify the workloads: 'Desktop development with C++' and 'Game development with C++'. In the details make sure that the latest buildtools (e.g. 'MSVC v142 - VS 2019 C++-x64/x86 (v14.24)' or later), the latest Windows 10 SDK and 'C#' are activated.
  3. Install Visual Studio, preferrably on your fastest SSD drive.

Getting Epic's Unreal Engine: the Unreal Engine is an engine and editor for producing games. One can use it as binary programm, downloadable from [2], or one can download its source code from [4] and compile it by ones own. We recommend the latter. Within the editor C++ scripts can be written in C++ language (using a precompiler to expand some crucial macros). Compiling the engine gives the advantage of having debug access to the engines source files from user created scripts and to be able to compile a whole debug version of the engine for testing purposes.

To be able to compile the engine and the user projects with the latest VS2019 some tweaks have to be applied, which we will descripe in the following [5]:

  1. Download Epic's Unreal Engine from [4]. If you use GitHub for Windows as explained there, you can update the project lateron easily.
  2. Execute Setup.bat.
  3. Run GenerateProjectFiles.bat with the -2019 flag, i.e. GenerateProjectFiles.bat -2019.
  4. Open the generated UE4.sln file: VisualStudioVersion should be set to 16. Look for this:
    
                        # Visual Studio Version 16
                        VisualStudioVersion = 16.0.28315.86
                    
  5. Open the UE4.sln file in Visual Studio 2019.
  6. Set configuration to Development Editor, 64-bit, Windows.
  7. Build the engine.
  8. Run the editor and make sure that under Edit->Editor Preferences->General->Source Code it shows 'Visual Studio 2019'. Hit 'Set as Standard' button.

If Intellisense sqiggles do not work correctly, go to the traxBook - project folder and right-click on 'traxBook.uproject', hit 'Generate Visual Studio project files'. This will put all the include pathes to your project's NMake -> Include Search Path section.


References

[1] Microsoft Visual Studio, Microsoft Corporation, 2020.
[2] Unreal Engine, Epic Games, Inc., 2010.
[3] NVidia PhysX, NVIDIA Corporation, 2020
[4] Unreal Engine on GitHub.
[5] Unreal Engine 4.22 with Visual Studio 2019 David Nadaski © 2019.

<<< previous | contents | next >>>