Pixel Engine is an open-source 2D game engine library for C++ and the Windows platform. Pixel Engine also comes with a level editor (coming soon) to create 2D levels that can be loaded by the engine's API. This is one of my first attempts at creating a game engine and this is mostly just a learning experience for me.
Pixel Engine utilizes the following third-party libraries:
- OpenGL (Open Graphics Library)
- SDL (Simple DirectMedia Layer)
- wxWidgets (wxWidgets GUI Library)
- FMOD (FMOD Sound System)
- gainput (gainput Input Library)
- libcurl (The Curl Library)
- RakNet (RakNet Networking Middleware)
- GLUT (OpenGL Utility Toolkit)
- GLEW (OpenGL Extension Wrangler)
- GLM (OpenGL Mathematics)
- SOIL (Simple OpenGL Image Library)
- Boost (Boost C++ Libraries)
- Download the latest available SDK from here.
- Unzip and extract the SDK and place the PixelEngine folder in the base directory of your project where your
.vcxproj
file is located. - Open your project settings and add in order:
$(ProjectDir)PixelEngine
,$(ProjectDir)PixelEngine\Include
,$(ProjectDir)PixelEngine\Include\Dependencies
,$(ProjectDir)PixelEngine\Include\Dependencies\wxWidgets\msvc
, and$(ProjectDir)PixelEngine\Include\Dependencies\wxWidgets
to your Additional Include Directories in C/C++ > General - Add
$(ProjectDir)PixelEngine
and$(ProjectDir)PixelEngine\wxWidgets
to your Additional Library Directories in Linker > General - Add
PixelEngine.lib
andglut32.lib
to your Additional Dependencies in Linker > Input - Change your C++ Language Standard to
ISO C++17 Standard
in C/C++ > Language - Make sure your project is set to unicode mode by setting your Character Set to
Use Unicode Character Set
in General as well as addingUNICODE
to Preprocessor Definitions in C/C++ > Preprocessor - Compile the code example below. It should build successfully in both release and debug.
- Add all the contents in PixelEngine/Bin/ to wherever your built program is running from.
The following code is the most basic Pixel Engine application and should compile and run successfully if everything was setup properly.
#include <PixelEngine.h>
void Main()
{
Pixel::App* app = new Pixel::App();
app->CreateWindow("Hello World!", 800, 600);
Pixel::RenderService::Singleton()->Initialize();
app->SetWindowVisible(true);
app->StartGameLoop();
delete app;
}
PixelMain(Main);