Skip to main content

Kevgine (Win32)

This is the Win32 engine created by Kevin, with a strong emphasis on its Win32 backend. There are multiple ways to use this engine.

WINE

Using LLVM, you can cross-compile the engine as provided to a Windows .exe file, and run it inside of WINE. You should always do this at least once before hand-in! The teachers will grade your code based on how it runs for them on Windows!

There are two ways to run your code on WINE:

Solution-Runner (recommended)

TODO: make this its own page

Dependencies:

For Arch Linux, you will need the following packages:

sudo pacman -S python clang wine mingw-w64-crt mingw-w64-binutils mingw-w64-gcc mingw-w64-headers mingw-w64-winpthreads

Compile and run:

  1. Clone the Solution-Runner project to your computer.
  2. Navigate to your Kevgine directory, and run the run.py script. It will parse the Visual Studio (.sln and .vcxproj) project and attempt to compile it.
  3. If it succeeds, it will proceed to run the .exe file via WINE.

Usage with IDEs

If your IDE can use the clangd language server, it will pick up the compile-flags.txt file created by Solution-Runner, which will allow it to provide errors and diagnostics as if you were on Windows. Magic!

Manually cross-compile (not recommended)

See this in-depth blog post explaining the process for Kevin's engine: Cross Compiling a Windows Game Engine

Natively

There is a student-maintained version of this framework that has a switchable backend, meaning you can seamlessly switch between Win32 and SDL2. Using the SDL2 backend, the engine can run natively on Linux (and Windows, of course). This is available in the Solution-Runner Templates directory.

NOTE: This backend is provided as best-effort and will not perfectly match what the Win32 version will look like. Most parts of the engine are faithfully recreated, including the Win32 quirks that come with it, but it is not perfect. Please make sure to always test a Win32 build with WINE before hand-in!

To use this backend, simply open the Kevgine template from the Solution-Runner repository in a CMake-enabled IDE.

NOTE: KDevelop is the recommended IDE for C++ on Linux. It has great CMake support and is tested with these projects. Simply open the folder, and press Execute to run it. The first time, you will have to add a Launch Configuration. Simply select game from the Add dropdown. (TODO: make this a page)

Please make sure you have CMake, fontconfig, and base development tools installed. On Arch Linux, you can use this command:

sudo pacman -S base-devel cmake fontconfig

The game should run natively on Linux, and you can use any usual development tools like gdb as usual.