Skip to content

Commit 75549ef

Browse files
committed
Update main.blocks, main.ts, images.g.jres, images.g.ts, main.py
1 parent 1a99706 commit 75549ef

7 files changed

Lines changed: 207 additions & 28 deletions

File tree

.github/makecode/blocks.png

54.7 KB
Loading

.github/makecode/blocksdiff.png

-84.5 KB
Loading

images.g.jres

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,20 @@
2424
"mimeType": "image/x-mkcd-f4",
2525
"displayName": "image7"
2626
},
27-
"image6": {
28-
"data": "hwQaABEAAAD//////////w8AAAAPAAAAAAAAAA8AAAAP8P//AAAAAA8AAAAP8PDwAAAAAA8AAAAP8P//AAAAAA8AAAAPAAAAAAAAAA8AAAAP8P//AP//Dw8AAAAP8PAAAAAADw8AAAAP8PD/AAAADw8AAAAP8P/wAP//Dw8AAAAPAAAAAAAAAA8AAAAP8P//AP//Dw8AAAAP8PDwAA8PAA8AAAAP8PDwAA8PAA8AAAAPAAAAAP8PAA8AAAAP8P//AAAAAA8AAAAP8PAAAAAAAA8AAAAP8PAAAAAAAA8AAAAP8P//AAAAAA8AAAAPAAAAAAAAAA8AAAAP8P//AAAAAA8AAAAPAPAAAAAAAA8AAAAPAA8PAAAAAA8AAAAP8ADwAAAAAA8AAAAPAAAAAAAAAA8AAAD//////////w8AAAA=",
29-
"mimeType": "image/x-mkcd-f4",
30-
"displayName": "image8"
31-
},
3227
"image7": {
3328
"data": "hwQeAB4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//w///w8AAAAAAAAAAAAADw8ADw8PAAAAAAAAAAAAAA8PAA8PDwAAAAAAAAAAAAAPDwAPDw8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP//DwAAAAAAAAAAAAAAAAAPDwAADwAAAAAAAAAAAAAADw8A8AAAAAAAAAAAAAAAAP//Dw8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA//8PAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD//w8AAAAAAAAAAAAAAAAAAAAPAAAAAAAAAAAAAAAAAAAADwAAAAAAAAAAAAAAAAAAAA8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
3429
"mimeType": "image/x-mkcd-f4",
3530
"displayName": "image9"
3631
},
32+
"image10": "hwQPAA8AAAAiIiIiIiIiAiIiIiIiIiICIiIiIiIiIgIiIiIiIiIiAiIiIiIiIiICIiIiIiIiIgIiIiIiIiIiAiIiIiIiIiICIiIiIiIiIgIiIiIiIiIiAiIiIiIiIiICIiIiIiIiIgIiIiIiIiIiAiIiIiIiIiICIiIiIiIiIgI=",
33+
"image11": "hwQeAA8AAAAAcHd3d3cAAABwAAAAcAAAAHAQERBwAAAAcBAQEHAAAABwEBARcAAAAHAAAABwAAAAcBAREXAAAABwEBAAcAAAAHAQEQBwAAAAcAAAAHAAAABwEBERcAAAAHAQAAFwAAAAcBAAAXAAAABwEBERcAAAAHAAAABwAAAAcBAREXAAAABwEAAQcAAAAHAQABBwAAAAcAAAAHAAAABwEBERcAAAAHAQEBBwAAAAcBAQEHAAAABwAAAAcAAAAHB3d3d3AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
34+
"image6": {
35+
"data": "hwQaAA8AAAD/////////Dw8AAAAAAAAPD///DwAAAA8PDw8PAAAADw///w8AAAAPDwAAAAAAAA8P//8PAAAADw8PDwAAAAAPDw//D///Dw8P/w8PAAAPDw8AAAAAAA8PD///D///Dw8PDw8PAAAADw8PDw///w8PDwAAAA8PAA8P//8PDw8ADw8PDwD/DwAPDw8PAAAAAA8P//8PAAAADw8AAAAAAAAPD///DwAAAA8PAA8AAAAADw/w8AAAAAAPDw8ADwAAAA8PAAAAAAAAD/////////8P",
36+
"mimeType": "image/x-mkcd-f4",
37+
"displayName": "image8"
38+
},
39+
"image8": "hwQPAA8AAAAiIiIiIiIiAiIiIiIiIiICIiIiIiIiIgIiIiIiIiIiAiIiIiIiIiICIiIiIiIiIgIiIiIiIiIiAiIiIiIiIiICIiIiIiIiIgIiIiIiIiIiAiIiIiIiIiICIiIiIiIiIgIiIiIiIiIiAiIiIiIiIiICIiIiIiIiIgI=",
40+
"image9": "hwQeAA8AAAAAcHd3d3cAAABwAAAAcAAAAHAQERBwAAAAcBAQEHAAAABwEBARcAAAAHAAAABwAAAAcBAREXAAAABwEBAAcAAAAHAQEQBwAAAAcAAAAHAAAABwEBERcAAAAHAQAAFwAAAAcBAAAXAAAABwEBERcAAAAHAAAABwAAAAcBAREXAAAABwEAAQcAAAAHAQABBwAAAAcAAAAHAAAABwEBERcAAAAHAQEBBwAAAAcBAQEHAAAABwAAAAcAAAAHB3d3d3AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=",
3741
"anim4": {
3842
"namespace": "myAnimations",
3943
"id": "anim4",

images.g.ts

Lines changed: 86 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -193,26 +193,6 @@ dddd....555555ddd.............
193193
......fff..fff...fff..fff.....
194194
..............................
195195
..............................
196-
`;
197-
case "image6":
198-
case "image8":return img`
199-
ffffffffffffffffffffffffff
200-
f........................f
201-
f........................f
202-
f.fff.ffff.fff.ffff.f..f.f
203-
f.f.f.f..f.f...f..f.f.f..f
204-
f.fff.ffff.fff.ffff.ff...f
205-
f.f.f.f.f..f...f..f.f.f..f
206-
f.fff.f.ff.fff.f..f.f..f.f
207-
f........................f
208-
f........................f
209-
f.....f..f.ffff..........f
210-
f.....f..f.f..f..........f
211-
f.....f..f.ffff..........f
212-
f.....f..f.f.............f
213-
f.....ffff.f.............f
214-
f........................f
215-
ffffffffffffffffffffffffff
216196
`;
217197
case "image7":
218198
case "image9":return img`
@@ -246,6 +226,92 @@ ffffffffffffffffffffffffff
246226
..............................
247227
..............................
248228
..............................
229+
`;
230+
case "image10":return img`
231+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
232+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
233+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
234+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
235+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
236+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
237+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
238+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
239+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
240+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
241+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
242+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
243+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
244+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
245+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
246+
`;
247+
case "image11":return img`
248+
..............................
249+
..............................
250+
..............................
251+
777777777777777777777777......
252+
7......................7......
253+
7.111.111.1111.111.111.7......
254+
7.1...1.1.1..1.1...1...7......
255+
7.111.111.1..1.1...111.7......
256+
7...1.1...1111.1...1...7......
257+
7.111.1...1..1.111.111.7......
258+
7......................7......
259+
777777777777777777777777......
260+
..............................
261+
..............................
262+
..............................
263+
`;
264+
case "image6":
265+
case "image8":return img`
266+
ffffffffffffffffffffffffff
267+
f........................f
268+
f.fff.ffff.fff.ffff.f..f.f
269+
f.f.f.f..f.f...f..f.f.f..f
270+
f.fff.ffff.fff.ffff.ff...f
271+
f.f.f.f.f..f...f..f.f.f..f
272+
f.fff.f.ff.fff.f..f.f..f.f
273+
f........................f
274+
f.......f..f.ffff........f
275+
f.......f..f.f..f........f
276+
f.......f..f.ffff........f
277+
f.......f..f.f...........f
278+
f.......ffff.f...........f
279+
f........................f
280+
ffffffffffffffffffffffffff
281+
`;
282+
case "image8":return img`
283+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
284+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
285+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
286+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
287+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
288+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
289+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
290+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
291+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
292+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
293+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
294+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
295+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
296+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
297+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
298+
`;
299+
case "image9":return img`
300+
..............................
301+
..............................
302+
..............................
303+
777777777777777777777777......
304+
7......................7......
305+
7.111.111.1111.111.111.7......
306+
7.1...1.1.1..1.1...1...7......
307+
7.111.111.1..1.1...111.7......
308+
7...1.1...1111.1...1...7......
309+
7.111.1...1..1.111.111.7......
310+
7......................7......
311+
777777777777777777777777......
312+
..............................
313+
..............................
314+
..............................
249315
`;
250316
}
251317
return null;

main.blocks

Lines changed: 33 additions & 1 deletion
Large diffs are not rendered by default.

main.py

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ def on_up_pressed():
1111
def on_on_overlap(sprite, coll1):
1212
coll1.destroy()
1313
info.change_life_by(-1)
14+
statusbar.value += -30
1415
sprites.on_overlap(SpriteKind.player, SpriteKind.projectile, on_on_overlap)
1516

1617
def on_overlap_tile(sprite, location):
@@ -28,7 +29,45 @@ def on_hit_wall(sprite, location):
2829

2930
coll1: Sprite = None
3031
jumpcount = 0
32+
statusbar: StatusBarSprite = None
3133
jack: Sprite = None
34+
game.set_dialog_frame(img("""
35+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
36+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
37+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
38+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
39+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
40+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
41+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
42+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
43+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
44+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
45+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
46+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
47+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
48+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
49+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
50+
"""))
51+
game.set_dialog_text_color(5)
52+
game.set_dialog_cursor(img("""
53+
..............................
54+
..............................
55+
..............................
56+
777777777777777777777777......
57+
7......................7......
58+
7.111.111.1111.111.111.7......
59+
7.1...1.1.1..1.1...1...7......
60+
7.111.111.1..1.1...111.7......
61+
7...1.1...1111.1...1...7......
62+
7.111.1...1..1.111.111.7......
63+
7......................7......
64+
777777777777777777777777......
65+
..............................
66+
..............................
67+
..............................
68+
"""))
69+
game.show_long_text("Welcome To The world of retro.\\n Try to win as fast as possible.\\n press space to START GAME",
70+
DialogLayout.CENTER)
3271
scene.set_background_color(9)
3372
tiles.set_tilemap(tilemap("""
3473
level4
@@ -42,7 +81,7 @@ def on_hit_wall(sprite, location):
4281
jack.ay = 250
4382
scene.camera_follow_sprite(jack)
4483
statusbar = statusbars.create(20, 4, StatusBarKind.energy)
45-
statusbar.value = 10
84+
statusbar.max = 100
4685
statusbar.position_direction(CollisionDirection.LEFT)
4786
statusbar.set_offset_padding(-40, 0)
4887
test = sprites.all_of_kind(SpriteKind.player)
@@ -63,7 +102,7 @@ def on_update_interval():
63102
global coll1
64103
if game.runtime() > 3000:
65104
coll1 = sprites.create_projectile_from_side(assets.image("""
66-
image5
105+
image8
67106
"""), -39, 50)
68107
coll1.set_position(jack.x + 50, jack.y - 50)
69108
game.on_update_interval(2000, on_update_interval)

main.ts

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,44 @@ sprites.onOverlap(SpriteKind.Player, SpriteKind.Projectile, function (sprite, co
1212
info.changeLifeBy(-1)
1313
statusbar.value += -30
1414
})
15+
controller.A.onEvent(ControllerButtonEvent.Pressed, function () {
16+
game.setDialogFrame(img`
17+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
18+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
19+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
20+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
21+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
22+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
23+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
24+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
25+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
26+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
27+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
28+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
29+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
30+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
31+
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
32+
`)
33+
game.setDialogTextColor(5)
34+
game.setDialogCursor(img`
35+
..............................
36+
..............................
37+
..............................
38+
777777777777777777777777......
39+
7......................7......
40+
7.111.111.1111.111.111.7......
41+
7.1...1.1.1..1.1...1...7......
42+
7.111.111.1..1.1...111.7......
43+
7...1.1...1111.1...1...7......
44+
7.111.1...1..1.111.111.7......
45+
7......................7......
46+
777777777777777777777777......
47+
..............................
48+
..............................
49+
..............................
50+
`)
51+
game.showLongText("Welcome To The world of retro.\\n Try to win as fast as possible.\\n press space to START GAME", DialogLayout.Center)
52+
})
1553
scene.onOverlapTile(SpriteKind.Player, sprites.builtin.brick, function (sprite, location) {
1654
game.over(true)
1755
})

0 commit comments

Comments
 (0)