dashcode 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dashcode-1.0.0/PKG-INFO +33 -0
- dashcode-1.0.0/README.md +16 -0
- dashcode-1.0.0/dashcode/__init__.py +1 -0
- dashcode-1.0.0/dashcode/core.py +73 -0
- dashcode-1.0.0/dashcode.egg-info/PKG-INFO +33 -0
- dashcode-1.0.0/dashcode.egg-info/SOURCES.txt +8 -0
- dashcode-1.0.0/dashcode.egg-info/dependency_links.txt +1 -0
- dashcode-1.0.0/dashcode.egg-info/top_level.txt +1 -0
- dashcode-1.0.0/setup.cfg +4 -0
- dashcode-1.0.0/setup.py +24 -0
dashcode-1.0.0/PKG-INFO
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dashcode
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: A library for Geometry Dash level generation using .gmd files
|
|
5
|
+
Author: IWiterI
|
|
6
|
+
Classifier: Programming Language :: Python :: 3
|
|
7
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
8
|
+
Classifier: Operating System :: OS Independent
|
|
9
|
+
Requires-Python: >=3.6
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
Dynamic: author
|
|
12
|
+
Dynamic: classifier
|
|
13
|
+
Dynamic: description
|
|
14
|
+
Dynamic: description-content-type
|
|
15
|
+
Dynamic: requires-python
|
|
16
|
+
Dynamic: summary
|
|
17
|
+
|
|
18
|
+
# Dashcode
|
|
19
|
+
|
|
20
|
+
Dashcode is a specialized Python library for the programmatic generation of Geometry Dash levels (compatible with version 2.2+). It allows developers to build complex level structures, triggers, and gameplay mechanics entirely through code.
|
|
21
|
+
|
|
22
|
+
## Key Features
|
|
23
|
+
|
|
24
|
+
* **Class-Based Architecture**: All functionality is encapsulated within the `Dashcode` class for a clean developer experience.
|
|
25
|
+
* **Full Trigger Support**: Easily manage Group IDs, Alpha, Toggle, Rotate, and Camera Zoom parameters.
|
|
26
|
+
* **Verified Mapping**: Includes corrected IDs for critical items like the Checkpoint (2063) and TouchTrigger logic.
|
|
27
|
+
* **Extensible Logic**: Fully customizable object and parameter dictionaries via `setobjects()` and `setparams()`.
|
|
28
|
+
* **Direct GMD Export**: Encode and package your level data into a ready-to-import .gmd file format.
|
|
29
|
+
|
|
30
|
+
## Installation
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
pip install dashcode
|
dashcode-1.0.0/README.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Dashcode
|
|
2
|
+
|
|
3
|
+
Dashcode is a specialized Python library for the programmatic generation of Geometry Dash levels (compatible with version 2.2+). It allows developers to build complex level structures, triggers, and gameplay mechanics entirely through code.
|
|
4
|
+
|
|
5
|
+
## Key Features
|
|
6
|
+
|
|
7
|
+
* **Class-Based Architecture**: All functionality is encapsulated within the `Dashcode` class for a clean developer experience.
|
|
8
|
+
* **Full Trigger Support**: Easily manage Group IDs, Alpha, Toggle, Rotate, and Camera Zoom parameters.
|
|
9
|
+
* **Verified Mapping**: Includes corrected IDs for critical items like the Checkpoint (2063) and TouchTrigger logic.
|
|
10
|
+
* **Extensible Logic**: Fully customizable object and parameter dictionaries via `setobjects()` and `setparams()`.
|
|
11
|
+
* **Direct GMD Export**: Encode and package your level data into a ready-to-import .gmd file format.
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pip install dashcode
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from .core import Dashcode
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import base64
|
|
2
|
+
import gzip
|
|
3
|
+
|
|
4
|
+
objects = []
|
|
5
|
+
obj_string = ""
|
|
6
|
+
lvlname = ""
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Dashcode:
|
|
11
|
+
def __init__(self):
|
|
12
|
+
global objects
|
|
13
|
+
self.params = {
|
|
14
|
+
"NoTouch": 13,
|
|
15
|
+
"Hide": 11,
|
|
16
|
+
"Group": 57,
|
|
17
|
+
"TGroup": 51,
|
|
18
|
+
"Duration": 10,
|
|
19
|
+
"Alpha": 11,
|
|
20
|
+
"TouchTrigger": 11, # Твой ID из GMD
|
|
21
|
+
"ActivateGroup": 56,
|
|
22
|
+
"ScaleX": 128,
|
|
23
|
+
"ScaleY": 129,
|
|
24
|
+
"Zoom": 107,
|
|
25
|
+
"RotateDegrees": 68,
|
|
26
|
+
"Times360": 69,
|
|
27
|
+
"LockRot": 70,
|
|
28
|
+
}
|
|
29
|
+
self.objects = {
|
|
30
|
+
"block": 1, "spike": 8, "yorb": 36, "coin": 1329,
|
|
31
|
+
"monster": 918, "bush": 128, "cloud": 129,
|
|
32
|
+
"alpha": 1007, "toggle": 1049, "rotate": 1346,
|
|
33
|
+
"zoom": 1913, "reverse": 1912,
|
|
34
|
+
"checkpoint": 2063,
|
|
35
|
+
"end": 3600,
|
|
36
|
+
"p_blue": 10, "p_yellow": 11, "p_green": 2926,
|
|
37
|
+
"p_cube": 12, "p_ship": 13, "p_ball": 47, "p_ufo": 111,
|
|
38
|
+
"p_wave": 660, "p_robot": 745, "p_spider": 1331, "p_swing": 1933
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
def setobjects(self, objs:dict):
|
|
42
|
+
self.objects = objs
|
|
43
|
+
|
|
44
|
+
def setparams(self, params:dict):
|
|
45
|
+
self.params = params
|
|
46
|
+
|
|
47
|
+
def addobject(self, obj: str, params: dict):
|
|
48
|
+
extraparams = ""
|
|
49
|
+
for param, value in params.items():
|
|
50
|
+
if self.params.get(param) is not None:
|
|
51
|
+
pid = self.params[param]
|
|
52
|
+
extraparams += f",{str(pid)},{value}"
|
|
53
|
+
|
|
54
|
+
oid = self.objects.get(obj, 1)
|
|
55
|
+
if oid:
|
|
56
|
+
objects.append(
|
|
57
|
+
f"1,{str(oid)},2,{str(params.get('X') * 30 + 15)},3,{str(params.get('Y') * 30 + 15)}{extraparams}")
|
|
58
|
+
else:
|
|
59
|
+
objects.append(
|
|
60
|
+
f"1,{str(obj)},2,{str(params.get('X') * 30 + 15)},3,{str(params.get('Y') * 30 + 15)}{extraparams}")
|
|
61
|
+
|
|
62
|
+
def create_gmd_file(self, level_name, author_name, objects_string):
|
|
63
|
+
global lvlname
|
|
64
|
+
lvlname = level_name
|
|
65
|
+
final_string_to_pack = objects_string
|
|
66
|
+
gzipped = gzip.compress(final_string_to_pack.encode('utf-8'))
|
|
67
|
+
b64_objects = base64.b64encode(gzipped).decode('utf-8').replace('/', '_').replace('+', '-')
|
|
68
|
+
return f'''<?xml version="1.0"?><plist version="1.0" gjver="2.0"><dict><k>kCEK</k><i>4</i><k>k2</k><s>{level_name}</s><k>k4</k><s>{b64_objects}</s><k>k5</k><s>{author_name}</s><k>k11</k><i>1091</i><k>k16</k><i>1</i><k>k80</k><i>56</i></dict></plist>'''
|
|
69
|
+
|
|
70
|
+
def decode_objects(self):
|
|
71
|
+
global obj_string
|
|
72
|
+
obj_string = ";".join(objects) + ";"
|
|
73
|
+
return obj_string
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dashcode
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: A library for Geometry Dash level generation using .gmd files
|
|
5
|
+
Author: IWiterI
|
|
6
|
+
Classifier: Programming Language :: Python :: 3
|
|
7
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
8
|
+
Classifier: Operating System :: OS Independent
|
|
9
|
+
Requires-Python: >=3.6
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
Dynamic: author
|
|
12
|
+
Dynamic: classifier
|
|
13
|
+
Dynamic: description
|
|
14
|
+
Dynamic: description-content-type
|
|
15
|
+
Dynamic: requires-python
|
|
16
|
+
Dynamic: summary
|
|
17
|
+
|
|
18
|
+
# Dashcode
|
|
19
|
+
|
|
20
|
+
Dashcode is a specialized Python library for the programmatic generation of Geometry Dash levels (compatible with version 2.2+). It allows developers to build complex level structures, triggers, and gameplay mechanics entirely through code.
|
|
21
|
+
|
|
22
|
+
## Key Features
|
|
23
|
+
|
|
24
|
+
* **Class-Based Architecture**: All functionality is encapsulated within the `Dashcode` class for a clean developer experience.
|
|
25
|
+
* **Full Trigger Support**: Easily manage Group IDs, Alpha, Toggle, Rotate, and Camera Zoom parameters.
|
|
26
|
+
* **Verified Mapping**: Includes corrected IDs for critical items like the Checkpoint (2063) and TouchTrigger logic.
|
|
27
|
+
* **Extensible Logic**: Fully customizable object and parameter dictionaries via `setobjects()` and `setparams()`.
|
|
28
|
+
* **Direct GMD Export**: Encode and package your level data into a ready-to-import .gmd file format.
|
|
29
|
+
|
|
30
|
+
## Installation
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
pip install dashcode
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
dashcode
|
dashcode-1.0.0/setup.cfg
ADDED
dashcode-1.0.0/setup.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from setuptools import setup, find_packages
|
|
2
|
+
import os
|
|
3
|
+
|
|
4
|
+
# Считываем описание из README.md
|
|
5
|
+
long_description = ""
|
|
6
|
+
if os.path.exists("README.md"):
|
|
7
|
+
with open("README.md", "r", encoding="utf-8") as f:
|
|
8
|
+
long_description = f.read()
|
|
9
|
+
|
|
10
|
+
setup(
|
|
11
|
+
name="dashcode",
|
|
12
|
+
version="1.0.0",
|
|
13
|
+
packages=find_packages(),
|
|
14
|
+
author="IWiterI",
|
|
15
|
+
description="A library for Geometry Dash level generation using .gmd files",
|
|
16
|
+
long_description=long_description,
|
|
17
|
+
long_description_content_type="text/markdown",
|
|
18
|
+
python_requires=">=3.6",
|
|
19
|
+
classifiers=[
|
|
20
|
+
"Programming Language :: Python :: 3",
|
|
21
|
+
"License :: OSI Approved :: MIT License",
|
|
22
|
+
"Operating System :: OS Independent",
|
|
23
|
+
],
|
|
24
|
+
)
|