Skip to main content

Building on Windows


Title: Building Game Pencil for Windows Step Two: Installing dependencies.


Supported Versions: Windows 7 and above

Game Pencil Engine is edited and modified via git( a powerful tool used for code versioning).

Our current preferred IDE for working on Game Pencil Engine is CodeBlocks. Please note, we will add a guide for other IDEs such as Visual Studio, Clion and Visual Studio Code.

You need to have the following tools downloaded and installed on your local device

  • Download the file codeblocks-20.03mingw-32bit-setup.exe
    • We are defaulting to 32Bit version for backward capability and for weaker hardware devices. -It is recommended to use CodeBlocks to compile Game Pencil although other IDEs should compile the editor just as fine. We do provide our CodeBlocks project file alongside the source so one does not have to worry about makefiles and you see exactly what we see when we code updates for the editor.
  • Git for Windows - Download here "Backend module of choice" - currently defaulted to SDL2 Installation Guide

  • C++ 11 or higher(We do not currently do C++17 based operations in Game Pencil in base or SDL2 module).

Supported Backend Modules

SDL Logo

Build via SDL2 modules

Our quickstart guide to including and building from the cross-platform king that is known as SDL2.

Github repository: Download source from github

Can I use C++17 or C++20 instead?

Yes you can for your own local builds, but we do not currently have C++17 code in our repo. Certain modules such as raylib do utilize C++17, but for the main version of GPE we stick to C++11 for the time being.


Guide for CodeBlocks Setup on Windows

You will find a Folder titled Game-Pencil-Engine-Editor-master

  • Open the file titled Game_Pencil_Engine_IDE.cbp using CodeBlocks.

1

  • Choose a compiler of your choice. The steps below works the same for 64-bit compiler as for the 32-bit build. REMEMBER: For building, using 64-bit Compiler, you need the SDL2 x86_64-w64-mingw32(64-bit) and i686-w64-mingw32 for 32-bit

2

  • Right Click on the Project and Hit build.You will probably get a bunch of Errors.This is because the project and compiler has no idea of where to find the include and lib files required for your project.

3

  • In order to tell the compiler where to find those. We must set the correct path to them. Right click on the project and click on Build options. Go to the Search Directories tab and click on the add button at the bottom and choose wherever the include folder for SDL2 modules are present. If you are having SDL2 sub-modules in different directories add all of their include paths. Further more, we need to include the headers of GPE. Again click on the add button and this time add the path to Game-Pencil-Engine-Editor-master\src folder.

4

5

  • Now click on the Linker Sub-Tab and browse the lib folder(s) and add their paths similar to what we did for the include directories/folders.

  • Next, Go to the Linker Settings tab and paste the below text in the Other Linker Options:-

-lmingw32 -lSDL2main -lSDL2 -lSDL2_image -lSDL2_mixer -lSDL2_ttf -lComdlg32

6

The above step tells the compiler that which libs (libraries) need to be linked against GPE.

  • Click OK

  • Set the Build Targets to Win32-Release and Build the Project Again.

7

Hopefully, Your Build will be started and You'll observe creation of a bin folder in Game-Pencil-Engine-Editor-master folder. Since we selected Build Targets to Win32-Release, You will observe a Release Folder within it with the .exe file.

Running it directly will throw a bunch of Errors as the program is depended on DLL files which has to be dynamically loaded at the runtime of application.

  • So, copy all the SDL2 DLL files (with the extension .dll) to the Release Folder and finally, copy the resources folder from Game-Pencil-Engine-Editor-master to the Release Folder. All the Errors encountered can be found in th game_errors.txt.

8

If you've followed all the steps as mentioned you are probably good to go!


Coming Soon...

Raylib Logo

Build via raylib modules