matcool / gd-mod-example

cmake
MIT License
36 stars 2 forks source link
example geometry-dash mod template

gd-mod-example

Basic Geometry Dash mod example meant for beginners, or as a template for people who want to use CMake + MinHook + gd.h + cocos2d.

screenshot screenshot

For a simpler and easier to setup/use template check out gd-mod-cpm-template

Usage

Clone the repo and make sure to use the --recursive option. If you dont have git you can download a zip of the repo in releases.

Make sure to change the project name on the CMakeLists.txt file

set(PROJECT_NAME template-project) # change this

To build this project you'll need CMake, which you can download here, and a C++ compiler, such as MSVC, which you can get with Visual Studio

Make sure you're building in 32 bit mode, as gd (atleast the windows version) is 32 bit, meaning your dll has to be too.

All the source files contain a lot of comments which you should definitely read if you're just starting out :) (i recommend starting from dllmain.cpp)

Manual setup

You can compile this project entirely in the terminal, as long as you have CMake and MSVC already

  1. Clone
    git clone --recursive https://github.com/matcool/gd-mod-example my-awesome-mod
    cd my-awesome-mod
  2. Configure (you only need to do this when editing the cmake file, or adding new cpp files)
    cmake -B build -A win32
  3. Build
    # config can also be RelWithDebInfo or MinSizeRel
    # however avoid using Debug as that breaks gd.h ;)
    cmake --build build --config Release

Resources