Skip to content

Building and running the engine for Windows (using Msys2)

Karlo Licudine edited this page May 12, 2020 · 5 revisions

For this example, we'll be using the Msys2 building platform to build and run our engine.

There are other ways of going about this but this is the one that I managed to get working. In the future, I will try to make a Visual Studio solution approach. -Karlo

Make sure that msys2is installed. If you are unfamiliar with it, there are three types of msys2 terminals when you search for it via the Start button.

  • Msys2 Msys
  • Msys2 MinGW 32bit
  • Msys2 MinGW 64bit

Use the first one Msys2 Msys, for this whole setup process.

Download the chicken-scheme v5.2.0 source code found here. Chicken-scheme is used to allow scripting for the engine.

Place this anywhere and extract it using the following code inside the terminal:

$ tar -xf chicken-5.2.0.tar.gz
$ cd chicken-5.2.0/

Install the needed packages:

$ pacman -S make gcc

Then start make with:

$ make PLATFORM=cygwin install

This will compile chicken and install it to C:\msys64\usr\local\bin\csi.exe.

Chicken requires additional code dependencies for scripting. Install them with:

# chicken-install -v bind

Clone the repository and enter the directory:

$ git clone git@github.com:accidentalrebel/rebel-game-engine.git 
$ cd rebel-game-engine/

Build the engine as a library:

$ make build

Before we could run the engine we need to install glfw. This is in charge of graphics, events, and input for the engine.

$ pacman -S mingw64/mingw-w64-x86_64-glfw  

Run the engine (Runs whatever code is in scripts/game.scm):

$ make PLATFORM=windows

Congratulations, you are now ready to start working!