You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,14 @@
1
1
# Geode Docs
2
2
3
-
### [Visit the Docs site](https://docs.geode-sdk.org)
3
+
### [Visit the Docs site](https://docs.geode-sdk.org/)
4
4
5
5
This is the source code for Geode's docs, containing all the hand-written tutorials.
6
6
7
7
Class & function documentation is built automatically from [the Geode source code](https://github.com/geode-sdk/geode).
8
8
9
9
## Building
10
10
11
-
The docs are built using [Flash](https://github.com/geode-sdk/flash). To build the docs, you need Flash, along with [CMake](https://cmake.org/install/) and [Clang](https://clang.llvm.org/).
11
+
The docs are built using [Flash](https://github.com/geode-sdk/flash). To build the docs, you need Flash, along with [CMake](https://cmake.org/install) and [Clang](https://clang.llvm.org/).
12
12
13
13
To build the docs, you first need to clone Geode, and then clone the docs inside the Geode root, for a folder structure like this:
Copy file name to clipboardExpand all lines: getting-started/cpp-stuff.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,8 +7,8 @@ order: 2
7
7
8
8
To be able to use the Geode SDK, you **will** need at least the following:
9
9
*[A C++ compiler](#compiler)
10
-
*[CMake](https://cmake.org/download/) - Version 3.29+ is required - make sure to add to PATH when installing on Windows.
11
-
*[Git](https://git-scm.com/downloads) - Hey you. Yes, you! I know a lot of people skip this step **but you will need it**. Don't come at us asking for why you "could not find git for clone of json-populate".
10
+
*[CMake](https://cmake.org/resources/) - Version 3.29+ is required - make sure to add to PATH when installing on Windows.
11
+
*[Git](https://git-scm.com/install/) - Hey you. Yes, you! I know a lot of people skip this step **but you will need it**. Don't come at us asking for why you "could not find git for clone of json-populate".
12
12
13
13
## Compiler
14
14
@@ -30,7 +30,7 @@ LLVM itself does not come with Windows SDK and CRT libraries, so you will need a
30
30
31
31
Please note that Visual Studio **2022** or higher is required. If you have an older version already installed, you should upgrade to the latest available.
32
32
33
-
Unless you want to install Visual Studio (the editor) itself, we recommend installing just the build tools. Open the VS [download page](https://visualstudio.microsoft.com/downloads), scroll to the bottom, and under "Tools for Visual Studio" download **Build Tools for Visual Studio**.
33
+
Unless you want to install Visual Studio (the editor) itself, we recommend installing just the build tools. Open the VS [download page](https://visualstudio.microsoft.com/downloads/), scroll to the bottom, and under "Tools for Visual Studio" download **Build Tools for Visual Studio**.
34
34
35
35
After launching the installer, select **Desktop development with C++** and optionally deselect all features except for **MSVC Build Tools** and **Windows SDK**, like on the screenshot below. Click Install and wait for it to finish.
36
36
@@ -86,4 +86,4 @@ After installing the CLI, run this command to install all the needed tools:
86
86
geode sdk install-linux
87
87
```
88
88
89
-
Now you can proceed to [setting up Geode CLI](/getting-started/geode-cli.md).
89
+
Now you can proceed to [setting up Geode CLI](/getting-started/geode-cli).
Copy file name to clipboardExpand all lines: getting-started/what-next.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,18 +5,18 @@ order: 7
5
5
6
6
# What next?
7
7
8
-
You should now be set on your journey to develope GD mods! If you are completely new to GD modding, a good place to start is [the Handbook](/handbook/chap0.md), which covers all of the basics of creating a Hello World.
8
+
You should now be set on your journey to develope GD mods! If you are completely new to GD modding, a good place to start is [the Handbook](/handbook/chap0), which covers all of the basics of creating a Hello World.
9
9
10
10
## Geode Features
11
11
12
12
Here are a list of Geode-specific concepts you might like to familiarize yourself with:
13
13
14
-
*[Hooking with `$modify`](/tutorials/modify.md) and [adding fields](/tutorials/fields.md)
15
-
*[Using sprites and other resources](/mods/resources.md)
16
-
*[Settings](/mods/settings.md) and [saving data](/mods/savedata.md)
17
-
*[String IDs](/tutorials/nodetree.md) and [Layouts](/tutorials/layouts.md)
18
-
*[Events](/tutorials/events.md)
19
-
*[Using dependencies](/mods/dependencies.md)
20
-
*[Publishing mods](/mods/publishing.md)
14
+
*[Hooking with `$modify`](/tutorials/modify) and [adding fields](/tutorials/fields)
15
+
*[Using sprites and other resources](/mods/resources)
16
+
*[Settings](/mods/settings) and [saving data](/mods/savedata)
17
+
*[String IDs](/tutorials/nodetree) and [Layouts](/tutorials/layouts)
18
+
*[Events](/tutorials/events)
19
+
*[Using dependencies](/mods/dependencies)
20
+
*[Publishing mods](/mods/publishing)
21
21
22
22
The [Tutorials](/tutorials) category in general is a great source for information about working with Geode mods.
Copy file name to clipboardExpand all lines: handbook/vol1/chap1_1.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,22 +10,22 @@ But how exactly does a mod work? The actual executable file for Geometry Dash th
10
10
11
11
Modifying binary code is a bit difficult, however, as it is not meant to be for humans; binary code is strictly for computers, and as such it is unreadable and unmodifiable for a human. Binary code is also **platform-specific**: a mod written purely in binary would only work on one platform, and could not be ported over to others without fully rewriting the entire mod from the ground up.
12
12
13
-
As a historical curiosity, it should be noted that mods used to be written fully in binary. Or, more accurately, they were written in **assembly**, which is a (somewhat) human-readable form of binary. However, to make it very clear, **no sane person does this anymore**. Working with binary code directly is nowadays only done in rare cases, which will be explained in [Chapter 1.2](/handbook/vol1/chap1_2.md).
13
+
As a historical curiosity, it should be noted that mods used to be written fully in binary. Or, more accurately, they were written in **assembly**, which is a (somewhat) human-readable form of binary. However, to make it very clear, **no sane person does this anymore**. Working with binary code directly is nowadays only done in rare cases, which will be explained in [Chapter 1.2](/handbook/vol1/chap1_2).
14
14
15
15
But what's the alternative? We can make modding much easier by knowing two facts:
16
16
17
17
- Binary code is produced through **compilation**.
18
18
- Geometry Dash is written in **C++**.
19
19
20
-
**Compilation is the process of turning source code into binary code**. While we can't modify GD's binary code easily, we can write our own source code in C++ and compile it into compatible binary code. Knowing what language GD was made in is vitally important, as not all binary code is equal. Some programming languages such as [Rust](https://www.rust-lang.org/) produce wildly different binary code from C++, and while it is technically compatible, it is much easier to work with a C++ game using C++. (Some modders, however, are working on making Rust usable for modding!) Writing our mods in a higher-level language like C++ also makes porting much easier; **C++ can be compiled to compatible machine code on all the platforms GD is available on**. This does come with multiple caveats though, however those are left for a later chapter.
20
+
**Compilation is the process of turning source code into binary code**. While we can't modify GD's binary code easily, we can write our own source code in C++ and compile it into compatible binary code. Knowing what language GD was made in is vitally important, as not all binary code is equal. Some programming languages such as [Rust](https://rust-lang.org/) produce wildly different binary code from C++, and while it is technically compatible, it is much easier to work with a C++ game using C++. (Some modders, however, are working on making Rust usable for modding!) Writing our mods in a higher-level language like C++ also makes porting much easier; **C++ can be compiled to compatible machine code on all the platforms GD is available on**. This does come with multiple caveats though, however those are left for a later chapter.
21
21
22
22
What all of this means is if we write our mod in C++ and then find some way to make GD run the compiled binary code of it, then we have unlocked a path to modding! And luckily, we know how to make GD load extra code: **binary injection**.
23
23
24
24
Almost every platform GD is on has some sort of **dynamic library support**. On Windows, these are known as **.DLL files**; on Mac, they're **.DYLIBs**; on Android, they're **.SO files**. A dynamic library is like a binary executable, but they have one special property: other executables can load them. This is usually done through address tables and the such; these are much too complicated for the purposes of this tutorial, and the specifics are also platform-dependant and modern modloaders use proxy DLLs instead. As such, how binary injection works in detail will not be explained here. All you have to take away is that we have methods to make GD load a dynamic library, and that acts as our entry point to modding the game.
25
25
26
-
> :information_source: There is one platform that doesn't have dynamic library support: iOS (unless jailbroken). Modding on iOS without jailbreaking requires basically baking all the mods you want into a premodified game, like [iCreate](https://icreate.pro/) has done, but a general mod loader like Geode will likely never see iOS support unless some major changes to the OS happen first.
26
+
> :information_source: There is one platform that doesn't have dynamic library support: iOS (unless jailbroken). Modding on iOS without jailbreaking requires basically baking all the mods you want into a premodified binary, like [iCreate](https://icreate.pro/) has done. This is done by the iOS loader!
27
27
28
-
> :green_book: If you are interested in **learning more about binary injection**, [the Wikipedia article on DLL injection](https://en.wikipedia.org/wiki/DLL_injection) is a pretty good place to start.
28
+
> :green_book: If you are interested in **learning more about binary injection**, [the Wikipedia article on DLL injection](https://en.wikipedia.org/wiki/DLL_injection) is a pretty good place to start.
29
29
30
30
Usually, the first custom dynamic library we make GD load is a mod loader; that is, a mod whose purpose is to load other mods. This is because the methods we use for injection are not easily scalable, but once we have our one library running, we can invent much simpler ways of loading more of them. For example, on Windows, loading a library from another library that you control is as simple as calling the `LoadLibrary` function. This can also be done an arbitary number of times within our initial library, so we can for example automatically find all the .DLL files in some directory and load them. This is how old 2.1 mod loaders such as **Mega Hack v7** used to work: they would search for all of the `.dll` files in a predefined folder like `extensions` and call `LoadLibrary` on them.
0 commit comments