An unopinionated General-Purpose Geometry Dash framework for safe and easy level editing and scripting
Project description
gmdbuilder
A type-safe general-purpose Python framework for pragmatic Geometry Dash level editing and scripting.
gmdbuilder lets you:
- Read & write Geometry Dash levels
- Automatically scan and protect against bugs (property types/ranges, spawn limit, etc.)
- Work directly with triggers, groups, and objects - and choose your own abstractions
- Use pre-built systems and templates to accelerate development
gmdbuilder is developed in collaboration with HDanke, the creator of gmdkit (a dependency of this framework) and his unofficial GD Editor Docs.
(No overengineered language was made in the making of this project)
Why Python?
Python fits surprisingly well as a language for GD scripting:
- Exceptionally good at building/verifying dictionaries (which all GD objects are)
- Operator overloading for counters and other special logic
- Any programming paradigm that you want is well supported
- Reliable type system with good debugger/type-checker tooling
- Huge package ecosystem
Installation
Install the latest release from PyPI (i didnt set this up yet):
pip install gmdkit
Install the latest development version from GitHub:
pip install git+https://github.com/UHDanke/gmdkit.git
Getting Started
from gmdbuilder import level
# This group gets deleted at level-load and automatically added to new objects at level-export
level.tag_group = 9999 # Set to 9999 by default
# From .gmd file, supports full object editing/deleting
level.from_file("example.gmd")
# From WSLiveEditor, only supports adidng objects
level.from_live_editor()
obj_list = level.objects # mutations are validated
# Object properties are in the form { "a<key number>": value }
repr(obj_list[1])
# Object ID and Property enums (all values are Literal)
from gmdbuilder.mappings.obj_prop import ObjProp
from gmdbuilder.mappings.obj_id import ObjId
for obj in obj_list:
if obj[ObjProp.ID] == ObjID.Trigger.MOVE:
obj[ObjProp.GROUPS] = {}
elif obj[ObjProp.ID] == ObjID.Trigger.COUNT:
obj_list.remove(obj)
# Translates to { a1: 1 }
block = from_raw_object({1: 1})
obj_list.delete_where(block)
obj_list.delete_where(lambda obj: obj[ObjProp.ID] == 1)
# Translates to { a1: 1611, a2: 50, a3: 45 }
object = from_object_string("1,1611,2,50,3,45;", obj_type=CountType)
object[ObjProp.Trigger.Count.ACTIVATE_GROUP] = True
# Export object edits, deletions and additions
level.export_to_file(file_path="example_updated.gmd")
# Export added objects to WSLiveEditor
level.export_to_live_editor()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gmdbuilder-0.1.0.tar.gz.
File metadata
- Download URL: gmdbuilder-0.1.0.tar.gz
- Upload date:
- Size: 33.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f671990421e269b03f33942caf0fd71af571088bfc7349119013edeb1abac70
|
|
| MD5 |
f0d03449f2bde85b715eb78c6f80d6f6
|
|
| BLAKE2b-256 |
598d69841a6aba89903b2d0ccd51892474a59e3381b5179b7c493a6b2358caf7
|
Provenance
The following attestation bundles were made for gmdbuilder-0.1.0.tar.gz:
Publisher:
release.yml on LXtreme/gmdbuilder
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gmdbuilder-0.1.0.tar.gz -
Subject digest:
8f671990421e269b03f33942caf0fd71af571088bfc7349119013edeb1abac70 - Sigstore transparency entry: 976051596
- Sigstore integration time:
-
Permalink:
LXtreme/gmdbuilder@b3e2baedd2ea0ebce96cdfff35e45c0ad303d620 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/LXtreme
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b3e2baedd2ea0ebce96cdfff35e45c0ad303d620 -
Trigger Event:
push
-
Statement type:
File details
Details for the file gmdbuilder-0.1.0-py3-none-any.whl.
File metadata
- Download URL: gmdbuilder-0.1.0-py3-none-any.whl
- Upload date:
- Size: 34.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6359df8f18191edcf60511f9cd98f16c42a86668d3dded358c7eec6a75704396
|
|
| MD5 |
92431e9e68ba62a50cd4043bb9c6d87f
|
|
| BLAKE2b-256 |
3c53c87139cfb0de20b1a976306ac2fd4d41d838008d3ed64e338300e0217e7d
|
Provenance
The following attestation bundles were made for gmdbuilder-0.1.0-py3-none-any.whl:
Publisher:
release.yml on LXtreme/gmdbuilder
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gmdbuilder-0.1.0-py3-none-any.whl -
Subject digest:
6359df8f18191edcf60511f9cd98f16c42a86668d3dded358c7eec6a75704396 - Sigstore transparency entry: 976051598
- Sigstore integration time:
-
Permalink:
LXtreme/gmdbuilder@b3e2baedd2ea0ebce96cdfff35e45c0ad303d620 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/LXtreme
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b3e2baedd2ea0ebce96cdfff35e45c0ad303d620 -
Trigger Event:
push
-
Statement type: