Skip to main content

An unopinionated General-Purpose Geometry Dash framework for safe and easy level editing and scripting

Project description

Python Badge Framework License Level Editor

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gmdbuilder-0.1.0.tar.gz (33.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gmdbuilder-0.1.0-py3-none-any.whl (34.1 kB view details)

Uploaded Python 3

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

Hashes for gmdbuilder-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8f671990421e269b03f33942caf0fd71af571088bfc7349119013edeb1abac70
MD5 f0d03449f2bde85b715eb78c6f80d6f6
BLAKE2b-256 598d69841a6aba89903b2d0ccd51892474a59e3381b5179b7c493a6b2358caf7

See more details on using hashes here.

Provenance

The following attestation bundles were made for gmdbuilder-0.1.0.tar.gz:

Publisher: release.yml on LXtreme/gmdbuilder

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for gmdbuilder-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6359df8f18191edcf60511f9cd98f16c42a86668d3dded358c7eec6a75704396
MD5 92431e9e68ba62a50cd4043bb9c6d87f
BLAKE2b-256 3c53c87139cfb0de20b1a976306ac2fd4d41d838008d3ed64e338300e0217e7d

See more details on using hashes here.

Provenance

The following attestation bundles were made for gmdbuilder-0.1.0-py3-none-any.whl:

Publisher: release.yml on LXtreme/gmdbuilder

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page