The ultimate Geometry Dash modding framework
Find a file
HJfod 8bf28ac686
Merge pull request #35 from plooshi/main
Fix the windows PlayLayer::markCheckpoint address
2022-08-28 21:22:40 +00:00
.github/workflows lets remove the secondary folder take 2 2022-05-25 17:32:51 +03:00
bindings Merge pull request #35 from plooshi/main 2022-08-28 21:22:40 +00:00
cmake work better 2022-06-10 16:24:33 -05:00
codegen remove unnecessary memset from dtor 2022-07-06 12:09:12 +03:00
docs restructured everything & renamed directories + added Geode.cmake file 2022-02-03 22:43:39 +02:00
include Merge branch 'main' of https://github.com/geode-sdk/sdk into main 2022-07-21 13:31:18 -05:00
link remove libcurl def + exp; Err template type fix; CCMouseDispatcher stuff 2022-05-22 17:24:54 +03:00
.gitattributes Update .gitattributes 2022-02-04 15:01:20 -03:00
.gitignore move codegen into its own project 2022-05-25 16:44:54 +03:00
.gitmodules no more bin 2022-05-01 10:46:30 -05:00
entry.cpp crash log stuff 2022-07-13 22:45:48 +03:00
EULA added EULA 2022-03-17 12:35:08 +02:00
Geode.cmake build multiple mod using codegen at once 2022-06-10 18:19:45 -05:00
README.md update README 2022-03-14 19:07:21 +02:00

Geode SDK

Geode is a revolutionary Geometry Dash modding framework. Documentation on using the Geode SDK can be found on the Geode Documentation.

SDK

The SDK repo contains headers for Geometry Dash, Cocos2d-x, and the Geode framework itself. The Geometry Dash headers are generated using codegen, although pre-genned headers can be found through the bin submodule.

Basic Usage

While traditional modding techniques involve convoluted setups using hooking libraries and calling conventions, Geode simplifies the development of mods to a single macro: $modify. Using it, you can hook functions in any class as long as the addresses of those functions is defined in the codegenned bindings.

For example, to alter the behaviour of the "More Games" button in GD, all you have to do is this:

class $modify(MenuLayer) {
    void onMoreGames(CCObject*) {
		FLAlertLayer::create(
            "Geode",
            "Hello World from my Custom Mod!",´
            "OK"
        )->show(); 
    }
};

⚠️ Make sure that your overridden funcion's signature matches the original's. Emitting parameters / the virtual keyword may cause issues.

If you want to call the original function, all you need to do is the base class name and the function name, in the same way you would call the base of a virtual function.

class $modify(MenuLayer) {
    bool init() {
        if (!MenuLayer::init())
            return false;

        auto label = CCLabelBMFont::create("Hello world!", "bigFont.fnt");
        label->setPosition(100, 100);
        this->addChild(label);

        return true;
    }
};

If you to give a name to your modified class, specify it as the first parameter to $modify:

class $modify(CustomMenuLayer, MenuLayer) {
    void onMoreGames(CCObject*) {
		FLAlertLayer::create(
            "Geode",
            "Hello World from my Custom Mod!",´
            "OK"
        )->show(); 
    }
};

Documentation

Documentation on using the Geode SDK can be found on the Geode Documentation.