Warning
This custom game engine is under early development and should not be used in production.
Handcrank Engine is an easy-to-use game engine based on simple principles that are quick to understand and build with.
handcrank-demo.mp4
- Star this repo on GitHub for updates
- Follow me on Bluesky
- Join the Discord
- Follow me on GitHub
| Platform | SDL Version | Tested | Stable |
|---|---|---|---|
| Windows | 2.32.8 | ✅ | ❌ |
| macOS | 2.32.8 | ✅ | ❌ |
| Web | 2.32.8 | ✅ | ❌ |
If you are on macOS, you can use brew to install.
$ brew tap handcrankengine/handcrankengine
$ brew install handcrankengine// documentation/Getting Started/QuickStart.cpp
#include "HandcrankEngine/HandcrankEngine.hpp"
using namespace HandcrankEngine;
auto game = std::make_unique<Game>();
auto main(int argc, char *argv[]) -> int
{
game->SetTitle("Handcrank Engine");
return game->Run();
}// documentation/Getting Started/DrawRectangle.cpp
#include "HandcrankEngine/HandcrankEngine.hpp"
#include "HandcrankEngine/RectRenderObject.hpp"
using namespace HandcrankEngine;
auto game = std::make_unique<Game>();
auto main(int argc, char *argv[]) -> int
{
game->SetTitle("Handcrank Engine");
auto rect = std::make_shared<RectRenderObject>();
rect->SetRect(0, 0, 250, 250);
rect->SetFillColor(255, 0, 0, 255);
game->AddChildObject(rect);
return game->Run();
}// documentation/Getting Started/DrawImage.cpp
#include "../images/sdl_logo.h"
#include "HandcrankEngine/HandcrankEngine.hpp"
#include "HandcrankEngine/ImageRenderObject.hpp"
using namespace HandcrankEngine;
auto game = std::make_unique<Game>();
auto main(int argc, char *argv[]) -> int
{
game->SetTitle("Handcrank Engine");
auto image = std::make_shared<ImageRenderObject>();
image->LoadTexture(game->GetRenderer(), images_sdl_logo_png,
images_sdl_logo_png_len);
game->AddChildObject(image);
return game->Run();
}Note: Builds on Windows require Microsoft Visual C++ Redistributable to run.
mkdir build/
cd build/
cmake ..
cmake --build .Note: To generate DMG files on macOS, first build with cmake, then run
cpack.
mkdir build/
cd build/
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release./bin/build.sh| Name | Link | Source Included? |
|---|---|---|
| Template | https://github.com/HandcrankEngine/template | ✅ |
| Pong Demo | https://github.com/HandcrankEngine/pong-demo | ✅ |
Be sure to review the Contributing Guidelines before logging an issue or making a pull request.
The goal of this project is to keep the features it offers to a minimum, allowing you, the developer, to forge your own path. If you have feature requests or bugs, please create an issue and tag them with the appropriate tag. If an issue already exists, vote for it with 👍.