@silkweaver/build 1.0.0 → 1.2.0

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.
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "Platformer",
3
+ "version": "1.0.0",
4
+ "engineVersion": "1.0.0",
5
+ "settings": {
6
+ "roomSpeed": 60,
7
+ "windowWidth": 640,
8
+ "windowHeight": 480,
9
+ "startRoom": "room_main",
10
+ "displayColor": "#10131c"
11
+ },
12
+ "resources": {
13
+ "sprites": {
14
+ "spr_player": {
15
+ "name": "spr_player"
16
+ },
17
+ "spr_platform": {
18
+ "name": "spr_platform"
19
+ }
20
+ },
21
+ "sounds": {},
22
+ "backgrounds": {},
23
+ "paths": {},
24
+ "scripts": {},
25
+ "fonts": {},
26
+ "timelines": {},
27
+ "objects": {
28
+ "obj_player": {
29
+ "name": "obj_player"
30
+ },
31
+ "_col": {
32
+ "name": "_col"
33
+ },
34
+ "obj_platform": {
35
+ "name": "obj_platform"
36
+ }
37
+ },
38
+ "rooms": {
39
+ "room_main": {
40
+ "name": "room_main"
41
+ }
42
+ }
43
+ }
44
+ }
@@ -0,0 +1,327 @@
1
+ {
2
+ "width": 640,
3
+ "height": 480,
4
+ "room_speed": 60,
5
+ "persistent": false,
6
+ "creation_code": "",
7
+ "instances": [
8
+ {
9
+ "id": 28,
10
+ "object_name": "obj_player",
11
+ "x": 96,
12
+ "y": 400,
13
+ "scale_x": 1,
14
+ "scale_y": 1,
15
+ "rotation": 0,
16
+ "creation_code": ""
17
+ },
18
+ {
19
+ "id": 37,
20
+ "object_name": "obj_platform",
21
+ "x": 0,
22
+ "y": 448,
23
+ "scale_x": 1,
24
+ "scale_y": 1,
25
+ "rotation": 0,
26
+ "creation_code": ""
27
+ },
28
+ {
29
+ "id": 38,
30
+ "object_name": "obj_platform",
31
+ "x": 32,
32
+ "y": 448,
33
+ "scale_x": 1,
34
+ "scale_y": 1,
35
+ "rotation": 0,
36
+ "creation_code": ""
37
+ },
38
+ {
39
+ "id": 39,
40
+ "object_name": "obj_platform",
41
+ "x": 64,
42
+ "y": 448,
43
+ "scale_x": 1,
44
+ "scale_y": 1,
45
+ "rotation": 0,
46
+ "creation_code": ""
47
+ },
48
+ {
49
+ "id": 40,
50
+ "object_name": "obj_platform",
51
+ "x": 96,
52
+ "y": 448,
53
+ "scale_x": 1,
54
+ "scale_y": 1,
55
+ "rotation": 0,
56
+ "creation_code": ""
57
+ },
58
+ {
59
+ "id": 41,
60
+ "object_name": "obj_platform",
61
+ "x": 128,
62
+ "y": 448,
63
+ "scale_x": 1,
64
+ "scale_y": 1,
65
+ "rotation": 0,
66
+ "creation_code": ""
67
+ },
68
+ {
69
+ "id": 42,
70
+ "object_name": "obj_platform",
71
+ "x": 160,
72
+ "y": 448,
73
+ "scale_x": 1,
74
+ "scale_y": 1,
75
+ "rotation": 0,
76
+ "creation_code": ""
77
+ },
78
+ {
79
+ "id": 43,
80
+ "object_name": "obj_platform",
81
+ "x": 192,
82
+ "y": 448,
83
+ "scale_x": 1,
84
+ "scale_y": 1,
85
+ "rotation": 0,
86
+ "creation_code": ""
87
+ },
88
+ {
89
+ "id": 44,
90
+ "object_name": "obj_platform",
91
+ "x": 224,
92
+ "y": 448,
93
+ "scale_x": 1,
94
+ "scale_y": 1,
95
+ "rotation": 0,
96
+ "creation_code": ""
97
+ },
98
+ {
99
+ "id": 45,
100
+ "object_name": "obj_platform",
101
+ "x": 256,
102
+ "y": 448,
103
+ "scale_x": 1,
104
+ "scale_y": 1,
105
+ "rotation": 0,
106
+ "creation_code": ""
107
+ },
108
+ {
109
+ "id": 46,
110
+ "object_name": "obj_platform",
111
+ "x": 288,
112
+ "y": 448,
113
+ "scale_x": 1,
114
+ "scale_y": 1,
115
+ "rotation": 0,
116
+ "creation_code": ""
117
+ },
118
+ {
119
+ "id": 47,
120
+ "object_name": "obj_platform",
121
+ "x": 320,
122
+ "y": 448,
123
+ "scale_x": 1,
124
+ "scale_y": 1,
125
+ "rotation": 0,
126
+ "creation_code": ""
127
+ },
128
+ {
129
+ "id": 48,
130
+ "object_name": "obj_platform",
131
+ "x": 352,
132
+ "y": 448,
133
+ "scale_x": 1,
134
+ "scale_y": 1,
135
+ "rotation": 0,
136
+ "creation_code": ""
137
+ },
138
+ {
139
+ "id": 49,
140
+ "object_name": "obj_platform",
141
+ "x": 384,
142
+ "y": 448,
143
+ "scale_x": 1,
144
+ "scale_y": 1,
145
+ "rotation": 0,
146
+ "creation_code": ""
147
+ },
148
+ {
149
+ "id": 50,
150
+ "object_name": "obj_platform",
151
+ "x": 416,
152
+ "y": 448,
153
+ "scale_x": 1,
154
+ "scale_y": 1,
155
+ "rotation": 0,
156
+ "creation_code": ""
157
+ },
158
+ {
159
+ "id": 51,
160
+ "object_name": "obj_platform",
161
+ "x": 448,
162
+ "y": 448,
163
+ "scale_x": 1,
164
+ "scale_y": 1,
165
+ "rotation": 0,
166
+ "creation_code": ""
167
+ },
168
+ {
169
+ "id": 52,
170
+ "object_name": "obj_platform",
171
+ "x": 480,
172
+ "y": 448,
173
+ "scale_x": 1,
174
+ "scale_y": 1,
175
+ "rotation": 0,
176
+ "creation_code": ""
177
+ },
178
+ {
179
+ "id": 53,
180
+ "object_name": "obj_platform",
181
+ "x": 512,
182
+ "y": 448,
183
+ "scale_x": 1,
184
+ "scale_y": 1,
185
+ "rotation": 0,
186
+ "creation_code": ""
187
+ },
188
+ {
189
+ "id": 54,
190
+ "object_name": "obj_platform",
191
+ "x": 544,
192
+ "y": 448,
193
+ "scale_x": 1,
194
+ "scale_y": 1,
195
+ "rotation": 0,
196
+ "creation_code": ""
197
+ },
198
+ {
199
+ "id": 55,
200
+ "object_name": "obj_platform",
201
+ "x": 576,
202
+ "y": 448,
203
+ "scale_x": 1,
204
+ "scale_y": 1,
205
+ "rotation": 0,
206
+ "creation_code": ""
207
+ },
208
+ {
209
+ "id": 56,
210
+ "object_name": "obj_platform",
211
+ "x": 608,
212
+ "y": 448,
213
+ "scale_x": 1,
214
+ "scale_y": 1,
215
+ "rotation": 0,
216
+ "creation_code": ""
217
+ },
218
+ {
219
+ "id": 59,
220
+ "object_name": "obj_platform",
221
+ "x": 224,
222
+ "y": 352,
223
+ "scale_x": 1,
224
+ "scale_y": 1,
225
+ "rotation": 0,
226
+ "creation_code": ""
227
+ },
228
+ {
229
+ "id": 60,
230
+ "object_name": "obj_platform",
231
+ "x": 256,
232
+ "y": 352,
233
+ "scale_x": 1,
234
+ "scale_y": 1,
235
+ "rotation": 0,
236
+ "creation_code": ""
237
+ },
238
+ {
239
+ "id": 62,
240
+ "object_name": "obj_platform",
241
+ "x": 192,
242
+ "y": 352,
243
+ "scale_x": 1,
244
+ "scale_y": 1,
245
+ "rotation": 0,
246
+ "creation_code": ""
247
+ },
248
+ {
249
+ "id": 63,
250
+ "object_name": "obj_platform",
251
+ "x": 352,
252
+ "y": 288,
253
+ "scale_x": 1,
254
+ "scale_y": 1,
255
+ "rotation": 0,
256
+ "creation_code": ""
257
+ },
258
+ {
259
+ "id": 64,
260
+ "object_name": "obj_platform",
261
+ "x": 384,
262
+ "y": 288,
263
+ "scale_x": 1,
264
+ "scale_y": 1,
265
+ "rotation": 0,
266
+ "creation_code": ""
267
+ },
268
+ {
269
+ "id": 65,
270
+ "object_name": "obj_platform",
271
+ "x": 416,
272
+ "y": 288,
273
+ "scale_x": 1,
274
+ "scale_y": 1,
275
+ "rotation": 0,
276
+ "creation_code": ""
277
+ },
278
+ {
279
+ "id": 66,
280
+ "object_name": "obj_platform",
281
+ "x": 448,
282
+ "y": 288,
283
+ "scale_x": 1,
284
+ "scale_y": 1,
285
+ "rotation": 0,
286
+ "creation_code": ""
287
+ },
288
+ {
289
+ "id": 67,
290
+ "object_name": "obj_platform",
291
+ "x": 544,
292
+ "y": 256,
293
+ "scale_x": 1,
294
+ "scale_y": 1,
295
+ "rotation": 0,
296
+ "creation_code": ""
297
+ },
298
+ {
299
+ "id": 68,
300
+ "object_name": "obj_platform",
301
+ "x": 576,
302
+ "y": 256,
303
+ "scale_x": 1,
304
+ "scale_y": 1,
305
+ "rotation": 0,
306
+ "creation_code": ""
307
+ },
308
+ {
309
+ "id": 69,
310
+ "object_name": "obj_platform",
311
+ "x": 608,
312
+ "y": 256,
313
+ "scale_x": 1,
314
+ "scale_y": 1,
315
+ "rotation": 0,
316
+ "creation_code": ""
317
+ }
318
+ ],
319
+ "backgrounds": [],
320
+ "views": [],
321
+ "tiles": [],
322
+ "bg_color": "#10131c",
323
+ "bg_show_color": true,
324
+ "physics_world": false,
325
+ "physics_gravity_x": 0,
326
+ "physics_gravity_y": 10
327
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "origin_x": 0,
3
+ "origin_y": 0,
4
+ "width": 32,
5
+ "height": 32,
6
+ "anim_speed": 15,
7
+ "mask_type": "rectangle",
8
+ "mask_x": 0,
9
+ "mask_y": 0,
10
+ "mask_w": 32,
11
+ "mask_h": 32,
12
+ "frames": [
13
+ {
14
+ "name": "0.png"
15
+ }
16
+ ]
17
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "origin_x": 16,
3
+ "origin_y": 16,
4
+ "width": 32,
5
+ "height": 32,
6
+ "anim_speed": 15,
7
+ "mask_type": "rectangle",
8
+ "mask_x": 0,
9
+ "mask_y": 0,
10
+ "mask_w": 32,
11
+ "mask_h": 32,
12
+ "frames": [
13
+ {
14
+ "name": "0.png"
15
+ }
16
+ ]
17
+ }
@@ -0,0 +1,2 @@
1
+ export class _col extends gm_object {
2
+ }
@@ -0,0 +1,45 @@
1
+ export class obj_player extends gm_object {
2
+
3
+ on_step(): void {
4
+ // inputs
5
+ let key_up = keyboard_check(ord("W"));
6
+ let key_down = keyboard_check(ord("S"));
7
+ let key_left = keyboard_check(ord("A"));
8
+ let key_right = keyboard_check(ord("D"));
9
+
10
+ //direction
11
+ let dir: vector2 = new vector2(0,0);
12
+ if (key_up) {
13
+ dir.y = -1;
14
+ }
15
+
16
+ if (key_down) {
17
+ dir.y = 1;
18
+ }
19
+
20
+ if (key_left) {
21
+ dir.x = -1;
22
+ }
23
+
24
+ if (key_right) {
25
+ dir.x = 1;
26
+ }
27
+
28
+ // motion
29
+ let motion_x = dir.x * this.spd;
30
+ let motion_y = dir.y * this.spd;
31
+
32
+ if (!this.place_meeting(this.x + motion_x, this.y, _col)) {
33
+ this.x += motion_x;
34
+ }
35
+
36
+ if (!this.place_meeting(this.x, this.y + motion_y, _col)) {
37
+ this.y += motion_y;
38
+ }
39
+
40
+
41
+ }
42
+
43
+ static sprite = 'spr_player'
44
+ spd = 3
45
+ }
@@ -0,0 +1,6 @@
1
+ export class obj_wall extends gm_object {
2
+
3
+
4
+ static sprite = 'spr_wall'
5
+ static parent = _col
6
+ }
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "Top-down",
3
+ "version": "1.0.0",
4
+ "engineVersion": "1.0.0",
5
+ "settings": {
6
+ "roomSpeed": 60,
7
+ "windowWidth": 640,
8
+ "windowHeight": 480,
9
+ "startRoom": "room_main",
10
+ "displayColor": "#101814"
11
+ },
12
+ "resources": {
13
+ "sprites": {
14
+ "spr_player": {
15
+ "name": "spr_player"
16
+ },
17
+ "spr_wall": {
18
+ "name": "spr_wall"
19
+ }
20
+ },
21
+ "sounds": {},
22
+ "backgrounds": {},
23
+ "paths": {},
24
+ "scripts": {},
25
+ "fonts": {},
26
+ "timelines": {},
27
+ "objects": {
28
+ "obj_player": {
29
+ "name": "obj_player"
30
+ },
31
+ "obj_wall": {
32
+ "name": "obj_wall"
33
+ },
34
+ "_col": {
35
+ "name": "_col"
36
+ }
37
+ },
38
+ "rooms": {
39
+ "room_main": {
40
+ "name": "room_main"
41
+ }
42
+ }
43
+ }
44
+ }