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.
Demo
handcrank-demo.mp4Social
- Star this repo on GitHub for updates
- Follow me on Bluesky
- Join the Discord
- Follow me on GitHub
Platforms
| Platform | SDL Version | Tested | Stable |
|---|---|---|---|
| Windows | 3.4.14 | ✅ | ❌ |
| macOS | 3.4.14 | ✅ | ❌ |
| Web | 3.4.14 | ✅ | ❌ |
Install
If you are on macOS, you can use brew to install.
$ brew tap handcrankengine/handcrankengine $ brew install handcrankengine
Quick Start Guide
// documentation/Getting Started/QuickStart.cpp #include "HandcrankEngine/HandcrankEngine.hpp" using namespace HandcrankEngine; auto main(int argc, char *argv[]) -> int { auto game = std::make_unique<Game>(); game->SetTitle("Handcrank Engine"); return game->Run(); }
Documentation
Getting Started
Draw Rectangle
// documentation/Getting Started/DrawRectangle.cpp #include "HandcrankEngine/HandcrankEngine.hpp" #include "HandcrankEngine/RectRenderObject.hpp" using namespace HandcrankEngine; auto main(int argc, char *argv[]) -> int { auto game = std::make_unique<Game>(); 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(); }
Draw Image
// documentation/Getting Started/DrawImage.cpp #include "../images/sdl_logo.h" #include "HandcrankEngine/HandcrankEngine.hpp" #include "HandcrankEngine/ImageRenderObject.hpp" using namespace HandcrankEngine; auto main(int argc, char *argv[]) -> int { auto game = std::make_unique<Game>(); 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(); }
CMake (Recommended)
Note: Builds on Windows require Microsoft Visual C++ Redistributable to run.
Debug Build
mkdir build/ cd build/ cmake .. cmake --build .
Release 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
g++
./bin/build.sh
Demos
| Name | Link | Source Included? |
|---|---|---|
| Template | https://github.com/HandcrankEngine/template | ✅ |
| Pong Demo | https://github.com/HandcrankEngine/pong-demo | ✅ |
Contributing
Be sure to review the Contributing Guidelines before logging an issue or making a pull request.
Community Roadmap
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 👍.