Skip to content

⚠️ This custom game engine is under early development and should not be used.

License

Notifications You must be signed in to change notification settings

HandcrankEngine/HandcrankEngine

Repository files navigation

Warning

This custom game engine is under early development and should not be used.

Handcrank Engine

Made With SDL2 Build Lint Tests

Demo

handcrank-demo.mp4

Quick Start

#include "Handcrank/Handcrank.hpp"

using namespace Handcrank;

auto game = std::make_unique<Game>();

auto main() -> int
{
    game->SetTitle("Handcrank Engine");

    return game->Run();
}

Documentation

  1. Basics

    1. Animations
    2. Keyboard Input
    3. Mouse Input
    4. Update Loop
  2. Building

    1. macOS
    2. Windows
  3. Examples

    1. FPS
  4. RenderObjects

    1. Custom RenderObject
    2. ImageRenderObject
    3. RectRenderObject
    4. SpriteRenderObject
    5. TextRenderObject

Dependencies

macOS

CMake

brew install cmake
brew install SDL2
brew install SDL2_image
brew install SDL2_ttf

clang-format

brew install llvm
ln -s "$(brew --prefix llvm)/bin/clang-format" "/usr/local/bin/clang-format"

clang-tidy

brew install llvm
ln -s "$(brew --prefix llvm)/bin/clang-tidy" "/usr/local/bin/clang-tidy"

Windows

CMake

Via installer https://cmake.org/download/

Build

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

Documentation

doxygen

Format

clang-format -i src/*.cpp include/**/*.hpp tests/**/*.cpp

Tidy

clang-tidy include/**/*.hpp

Editor Setup

Note: Make sure to to run cmake .. and cmake --build . to generate the compile_commands.json and other necessary header files.

VS Code

Install recommended extensions found in .vscode/extensions.json.

zed

Install plugins recommended by the editor when opening cpp files.

Sublime Text

Via Package Control, install LSP and LSP-clangd.

About

⚠️ This custom game engine is under early development and should not be used.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published