Skip to content

matcool/gd-mod-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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
  1. Configure (you only need to do this when editing the cmake file, or adding new cpp files)
cmake -B build -A win32
  1. Build
# config can also be RelWithDebInfo or MinSizeRel
# however avoid using Debug as that breaks gd.h ;)
cmake --build build --config Release

Resources

  • Ghidra - A free reverse engineering tool, which is almost mandatory for GD modding
  • GD Programming - A discord server where you can ask a lot of questions :D
  • function address dump - A big list of function addresses for windows
  • gd-addresses - A list of publicly known function offsets
  • Cheat Engine - An awesome tool that lets you find values in memory, explore memory in a hex view and debug functions.
  • x32dbg - An advanced debugger