pxt-arcade 1.7.3 → 1.7.7
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.
- package/built/common-sim.d.ts +2 -0
- package/built/common-sim.js +4 -0
- package/built/target.js +1788 -236
- package/built/target.json +1788 -236
- package/built/targetlight.json +5 -5
- package/built/theme.json +3 -2
- package/docs/gamejam/global-2021.html +459 -0
- package/docs/hour-of-code/all.md +27 -0
- package/docs/hour-of-code/{educators.html → educators-2020.html} +25 -25
- package/docs/hour-of-code/educators-2021.html +625 -0
- package/docs/{hour-of-code.html → hour-of-code-2020.html} +37 -37
- package/docs/hour-of-code-2021.html +438 -183
- package/docs/hour-of-code-ref.json +3 -0
- package/docs/index-ref.json +1 -1
- package/docs/multipart-tutorials.md +0 -8
- package/docs/projects/SUMMARY.md +3 -2
- package/docs/recipes.md +0 -7
- package/docs/skillmap/clicker/clicker1.md +7 -7
- package/docs/skillmap/clicker/clicker2.md +9 -9
- package/docs/skillmap/clicker/clicker3.md +8 -8
- package/docs/skillmap/clicker/clicker4.md +8 -8
- package/docs/skillmap/clicker/clicker4a.md +7 -7
- package/docs/skillmap/clicker/clicker5.md +3 -3
- package/docs/skillmap/clicker-themed/clickert1.md +66 -38
- package/docs/skillmap/clicker-themed/clickert2.md +77 -58
- package/docs/skillmap/clicker-themed/clickert3.md +75 -55
- package/docs/skillmap/clicker-themed/clickert4.md +105 -118
- package/docs/skillmap/collector/collector1.md +11 -11
- package/docs/skillmap/collector/collector1a.md +8 -8
- package/docs/skillmap/collector/collector2.md +8 -8
- package/docs/skillmap/collector/collector3.md +8 -8
- package/docs/skillmap/collector/collector3a.md +7 -7
- package/docs/skillmap/collector/collector4.md +8 -8
- package/docs/skillmap/collector/collector5.md +2 -2
- package/docs/skillmap/collector-themed/collectort1.md +107 -88
- package/docs/skillmap/collector-themed/collectort2.md +109 -87
- package/docs/skillmap/collector-themed/collectort3.md +138 -115
- package/docs/skillmap/collector-themed/collectort4.md +130 -118
- package/docs/skillmap/collector-themed/collectort4old.md +23 -23
- package/docs/skillmap/collector-themed/collectort5.md +2 -2
- package/docs/skillmap/educator-info/forest-map-info.md +34 -25
- package/docs/skillmap/educator-info/pongo-map-info.md +55 -0
- package/docs/skillmap/educator-info/racer-map-info.md +105 -0
- package/docs/skillmap/educator-info/rockstar-map-info.md +1 -1
- package/docs/skillmap/educator-info/simple-shark-map-info.md +101 -0
- package/docs/skillmap/forest/forest1.md +1 -69
- package/docs/skillmap/forest/forest2.md +5 -65
- package/docs/skillmap/forest/forest3.md +1 -174
- package/docs/skillmap/forest/forest4.md +2 -336
- package/docs/skillmap/forest/forest5.md +1 -396
- package/docs/skillmap/forest/forest6.md +6 -372
- package/docs/skillmap/forest-old.md +92 -0
- package/docs/skillmap/forest.md +9 -9
- package/docs/skillmap/forest_new/forest1.md +191 -0
- package/docs/skillmap/forest_new/forest2.md +217 -0
- package/docs/skillmap/forest_new/forest3.md +333 -0
- package/docs/skillmap/forest_new/forest4.md +196 -0
- package/docs/skillmap/forest_new/forest5.md +291 -0
- package/docs/skillmap/forest_new/forest6.md +272 -0
- package/docs/skillmap/interface/activity1.md +41 -49
- package/docs/skillmap/jungle/jungle1.md +48 -28
- package/docs/skillmap/jungle/jungle2.md +50 -26
- package/docs/skillmap/jungle/jungle3.md +48 -27
- package/docs/skillmap/jungle/jungle4.md +76 -58
- package/docs/skillmap/jungle/jungle5.md +31 -25
- package/docs/skillmap/jungle/jungle6.md +34 -28
- package/docs/skillmap/jungle/jungle7.md +36 -24
- package/docs/skillmap/jungle/jungle8.md +27 -25
- package/docs/skillmap/jungle.md +7 -3
- package/docs/skillmap/long-shark.md +119 -0
- package/docs/skillmap/pongo/pongo1.md +256 -0
- package/docs/skillmap/pongo/pongo2.md +179 -0
- package/docs/skillmap/pongo/pongo3.md +177 -0
- package/docs/skillmap/pongo.md +59 -0
- package/docs/skillmap/racer.md +7 -7
- package/docs/skillmap/rockstar/rockstar1.md +32 -41
- package/docs/skillmap/rockstar/rockstar2.md +45 -27
- package/docs/skillmap/rockstar/rockstar3.md +45 -27
- package/docs/skillmap/rockstar.md +3 -1
- package/docs/skillmap/shark/shark1-simple.md +151 -0
- package/docs/skillmap/shark/shark2-simple.md +203 -0
- package/docs/skillmap/shark/shark3-simple.md +204 -0
- package/docs/skillmap/shark/shark4-simple.md +246 -0
- package/docs/skillmap/shark/shark4a-simple.md +244 -0
- package/docs/skillmap/shark.md +25 -58
- package/docs/skillmap/space/space1.md +63 -29
- package/docs/skillmap/space/space2.md +34 -25
- package/docs/skillmap/space/space3.md +86 -69
- package/docs/skillmap/space/space4.md +96 -65
- package/docs/skillmap/space/space4a.md +34 -25
- package/docs/skillmap/space/space5.md +81 -45
- package/docs/skillmap/space/space6.md +59 -81
- package/docs/skillmap/space.md +8 -5
- package/docs/skillmap/story/card.md +6 -6
- package/docs/skillmap/story/card2.md +6 -6
- package/docs/skillmap/story/story1.md +60 -175
- package/docs/skillmap/story/story2.md +89 -327
- package/docs/skillmap/story/story3.md +238 -228
- package/docs/skillmap/story/story4.md +23 -23
- package/docs/skillmap/zoo/zoo1.md +31 -16
- package/docs/skillmap/zoo/zoo2.md +45 -30
- package/docs/skillmap/zoo/zoo2a.md +51 -36
- package/docs/skillmap/zoo/zoo3.md +8 -7
- package/docs/skillmap/zoo/zoo4.md +61 -32
- package/docs/skillmap/zoo/zoo5.md +41 -31
- package/docs/skillmap/zoo.md +2 -2
- package/docs/skillmaps.md +20 -4
- package/docs/static/experiments/accessibleblocks.png +0 -0
- package/docs/static/experiments/blockserrorlist.png +0 -0
- package/docs/static/gamejam/jams/global-2021/assets/banner.png +0 -0
- package/docs/static/gamejam/jams/global-2021/info.json +10 -0
- package/docs/static/gamejam/jams/global-2021/rules.md +22 -0
- package/docs/static/gamejam/jams/global-2021/style.css +141 -0
- package/docs/static/gamejam/lib/gamejam.d.ts +1 -0
- package/docs/static/gamejam/lib/gamejam.js +34 -24
- package/docs/static/gamejam/lib/gamejam.ts +35 -24
- package/docs/static/hero-gallery/stream.png +0 -0
- package/docs/static/hour-of-code/{apple.png → 2020/apple.png} +0 -0
- package/docs/static/hour-of-code/{arcade.png → 2020/arcade.png} +0 -0
- package/docs/static/hour-of-code/{asphodel.png → 2020/asphodel.png} +0 -0
- package/docs/static/hour-of-code/{card.png → 2020/card.png} +0 -0
- package/docs/static/hour-of-code/{chase-the-pizza.png → 2020/chase-the-pizza.png} +0 -0
- package/docs/static/hour-of-code/{clovers.png → 2020/clovers.png} +0 -0
- package/docs/static/hour-of-code/{design.png → 2020/design.png} +0 -0
- package/docs/static/hour-of-code/{educators → 2020/educators}/asphodel-level1.png +0 -0
- package/docs/static/hour-of-code/{educators → 2020/educators}/asphodel-level4.png +0 -0
- package/docs/static/hour-of-code/{educators → 2020/educators}/asphodel-level6.png +0 -0
- package/docs/static/hour-of-code/{educators → 2020/educators}/asphodel-level7.png +0 -0
- package/docs/static/hour-of-code/{educators → 2020/educators}/asphodel-level9.png +0 -0
- package/docs/static/hour-of-code/{educators → 2020/educators}/clover-design.gif +0 -0
- package/docs/static/hour-of-code/{educators → 2020/educators}/shark-attack-tutorial.png +0 -0
- package/docs/static/hour-of-code/{galga.png → 2020/galga.png} +0 -0
- package/docs/static/hour-of-code/{lemon-leak.png → 2020/lemon-leak.png} +0 -0
- package/docs/static/hour-of-code/{micro-bit.png → 2020/micro-bit.png} +0 -0
- package/docs/static/hour-of-code/{minecraft.png → 2020/minecraft.png} +0 -0
- package/docs/static/hour-of-code/{nfl.png → 2020/nfl.png} +0 -0
- package/docs/static/hour-of-code/{ocean-jam.png → 2020/ocean-jam.png} +0 -0
- package/docs/static/hour-of-code/{pixel-background-primary.png → 2020/pixel-background-primary.png} +0 -0
- package/docs/static/hour-of-code/{pixel-background-secondary.png → 2020/pixel-background-secondary.png} +0 -0
- package/docs/static/hour-of-code/{shadowed-aside-frame.png → 2020/shadowed-aside-frame.png} +0 -0
- package/docs/static/hour-of-code/{shadowed-button-frame.png → 2020/shadowed-button-frame.png} +0 -0
- package/docs/static/hour-of-code/{shadowed-primary-frame.png → 2020/shadowed-primary-frame.png} +0 -0
- package/docs/static/hour-of-code/{shark-attack.png → 2020/shark-attack.png} +0 -0
- package/docs/static/hour-of-code/{simulator.gif → 2020/simulator.gif} +0 -0
- package/docs/static/hour-of-code/{simulator.png → 2020/simulator.png} +0 -0
- package/docs/static/hour-of-code/{styles.css → 2020/styles.css} +1 -1
- package/docs/static/hour-of-code/2021/Rowdies/OFL.txt +93 -0
- package/docs/static/hour-of-code/2021/Rowdies/Rowdies-Bold.ttf +0 -0
- package/docs/static/hour-of-code/2021/Rowdies/Rowdies-Regular.ttf +0 -0
- package/docs/static/hour-of-code/2021/beginner-skillmap.png +0 -0
- package/docs/static/hour-of-code/2021/favicon.png +0 -0
- package/docs/static/hour-of-code/2021/forest-skillmap-game.gif +0 -0
- package/docs/static/hour-of-code/2021/game-jam-hero.png +0 -0
- package/docs/static/hour-of-code/2021/hoc-2020.png +0 -0
- package/docs/static/hour-of-code/2021/hoc-card.png +0 -0
- package/docs/static/hour-of-code/2021/hoc-header-educators.png +0 -0
- package/docs/static/hour-of-code/2021/hoc-header-plane.gif +0 -0
- package/docs/static/hour-of-code/2021/hoc-header-scene.gif +0 -0
- package/docs/static/hour-of-code/2021/jungle-skillmap.png +0 -0
- package/docs/static/hour-of-code/2021/makecode-example.png +0 -0
- package/docs/static/hour-of-code/2021/microbit.png +0 -0
- package/docs/static/hour-of-code/2021/minecraft.png +0 -0
- package/docs/static/hour-of-code/2021/rockstar-skillmap.png +0 -0
- package/docs/static/hour-of-code/2021/styles.css +660 -62
- package/docs/static/logo.png +0 -0
- package/docs/static/skillmap/assets/my-assets-three.png +0 -0
- package/docs/static/skillmap/assets/sprite-from-container.gif +0 -0
- package/docs/static/skillmap/backgrounds/jungle-bg.png +0 -0
- package/docs/static/skillmap/backgrounds/jungle-map.png +0 -0
- package/docs/static/skillmap/backgrounds/rock-map.png +0 -0
- package/docs/static/skillmap/backgrounds/rockstar-card.gif +0 -0
- package/docs/static/skillmap/backgrounds/space-comp.png +0 -0
- package/docs/static/skillmap/backgrounds/space.png +0 -0
- package/docs/static/skillmap/certificates/forest-cert.pdf +0 -0
- package/docs/static/skillmap/certificates/forest-cert.png +0 -0
- package/docs/static/skillmap/certificates/jungle-cert.pdf +0 -0
- package/docs/static/skillmap/certificates/jungle-cert.png +0 -0
- package/docs/static/skillmap/certificates/rockstar-cert.pdf +0 -0
- package/docs/static/skillmap/certificates/rockstar-cert.png +0 -0
- package/docs/static/skillmap/certificates/shark-cert.pdf +0 -0
- package/docs/static/skillmap/certificates/shark-cert.png +0 -0
- package/docs/static/skillmap/certificates/space-cert.pdf +0 -0
- package/docs/static/skillmap/certificates/space-cert.png +0 -0
- package/docs/static/skillmap/pongo/pongo1.gif +0 -0
- package/docs/static/skillmap/pongo/pongo2gif +0 -0
- package/docs/static/skillmap/pongo/pongo3.gif +0 -0
- package/docs/static/skillmap/racer/racer1.gif +0 -0
- package/docs/static/skillmap/racer/racer2.gif +0 -0
- package/docs/static/skillmap/racer/racer3.gif +0 -0
- package/docs/static/skillmap/rockstar/rockstar1.gif +0 -0
- package/docs/static/skillmap/rockstar/rockstar2.gif +0 -0
- package/docs/static/skillmap/rockstar/rockstar3.gif +0 -0
- package/docs/static/skillmap/shark/shark1-simple.gif +0 -0
- package/docs/static/skillmap/shark/shark4a-simple.gif +0 -0
- package/docs/static/skillmap/zoo/overlaps-food-sprite.gif +0 -0
- package/docs/tutorials/barrel-dodger.md +4 -4
- package/docs/tutorials/collect-the-clovers.md +2 -2
- package/docs/tutorials/froggy.md +105 -90
- package/docs/tutorials/hundred.md +400 -0
- package/package.json +3 -3
- package/pxtarget.json +3 -2
- package/targetconfig.json +4 -1
- package/docs/recipes/wonder-woman-1984/01-maze.md +0 -291
- package/docs/recipes/wonder-woman-1984/02-artifact.md +0 -70
- package/docs/recipes/wonder-woman-1984/03-enemies.md +0 -65
- package/docs/skillmap/forest/forest9.md +0 -714
- package/docs/static/hour-of-code/2021/placeholder.png +0 -0
- package/docs/static/hour-of-code/ww-maze.png +0 -0
- package/docs/static/recipes/wonder-woman-1984/artifact-preview.png +0 -0
- package/docs/static/recipes/wonder-woman-1984/artifacts-location.gif +0 -0
- package/docs/static/recipes/wonder-woman-1984/draw-maze-backup.png +0 -0
- package/docs/static/recipes/wonder-woman-1984/draw-walls-backup.png +0 -0
- package/docs/static/recipes/wonder-woman-1984/end-position.png +0 -0
- package/docs/static/recipes/wonder-woman-1984/enemies-location.gif +0 -0
- package/docs/static/recipes/wonder-woman-1984/enemies-preview.png +0 -0
- package/docs/static/recipes/wonder-woman-1984/fill-maze.gif +0 -0
- package/docs/static/recipes/wonder-woman-1984/fill-walls.gif +0 -0
- package/docs/static/recipes/wonder-woman-1984/wonder-woman3.png +0 -0
- package/docs/static/recipes/wonder-woman-1984/ww-splash3.gif +0 -0
- package/docs/static/recipes/wonder-woman-1984/ww-splash3.mp4 +0 -0
- package/docs/static/ww84-background.png +0 -0
- package/docs/static/ww84-header.png +0 -0
- package/docs/ww84.html +0 -276
- package/sim/public/locales/zh-CN/bundled-strings.json +0 -1800
- package/sim/public/locales/zh-CN/target-strings.json +0 -13
- package/sim/public/locales/zh-TW/bundled-strings.json +0 -1903
- package/sim/public/locales/zh-TW/target-strings.json +0 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Moving Monkey
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
## Welcome @showdialog
|
|
@@ -15,19 +15,19 @@ This kind of game peeks in on the action from the side, and relies on a [__*tile
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
##
|
|
18
|
+
## 2. See the Scene
|
|
19
19
|
|
|
20
20
|
**Your scene has already been set!**
|
|
21
21
|
|
|
22
22
|
---
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
- :binoculars: Look at your workspace to see that the **background image** and **tilemap** have already been set for the scene in this activity.
|
|
25
25
|
|
|
26
|
-
💡 Both blocks have been added to the ``||loops: on start||`` container so they load as soon as the game starts.
|
|
26
|
+
_💡 Both blocks have been added to the ``||loops: on start||`` container so they load as soon as the game starts.)_
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
##
|
|
30
|
+
## 3. We need a HERO
|
|
31
31
|
|
|
32
32
|
**🐒 We need a hero 🐒**
|
|
33
33
|
|
|
@@ -35,9 +35,13 @@ Our moving characters are called [__*sprites*__](#sprote "2-D images that move o
|
|
|
35
35
|
|
|
36
36
|
---
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
- :paper plane: From the ``||sprites:Sprites||`` category, drag ``||variables:set [mySprite] to sprite [ ] of kind [Player]||`` to **the end** of the ``||loops:on start||`` container.
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
_💡 Having trouble finding the block you need? Look to the left of the instructions for the icon of the toolbox category where your block lives!_
|
|
41
|
+
|
|
42
|
+
- :paint brush: To choose a standing monkey, click the empty grey box, then toggle to **My Assets** and click the monkey named **stand**.
|
|
43
|
+
|
|
44
|
+

|
|
41
45
|
|
|
42
46
|
|
|
43
47
|
```blocks
|
|
@@ -48,16 +52,18 @@ let mySprite = sprites.create(assets.image`stand`, SpriteKind.Player)
|
|
|
48
52
|
```
|
|
49
53
|
|
|
50
54
|
|
|
51
|
-
##
|
|
55
|
+
## 4. Control the Player
|
|
52
56
|
|
|
53
57
|
**↔️ Time to get the player moving ↔️**
|
|
54
58
|
|
|
55
59
|
---
|
|
56
60
|
|
|
57
|
-
|
|
61
|
+
- :game: Drag ``||controller:move [mySprite] with buttons ➕||``
|
|
58
62
|
to **the end** of the ``||loops:on start||`` container.
|
|
59
63
|
|
|
60
|
-
|
|
64
|
+
_💡 Remember, the icon to the left of the instructions shows the same icon as the toolbox category for the block you need._
|
|
65
|
+
|
|
66
|
+
- :mouse pointer: Press the ➕ button to the right of the block and change the [__*vy*__](#whatVY "vertical velocity") (up/down speed)
|
|
61
67
|
argument to **0** so that the player won't hover up or down when you use the joypad.
|
|
62
68
|
|
|
63
69
|
|
|
@@ -70,16 +76,18 @@ controller.moveSprite(mySprite, 100, 0)
|
|
|
70
76
|
```
|
|
71
77
|
|
|
72
78
|
|
|
73
|
-
##
|
|
79
|
+
## 5. Try It
|
|
74
80
|
|
|
75
|
-
|
|
81
|
+
**Click the Game Window Tab (Above)**
|
|
82
|
+
|
|
83
|
+

|
|
76
84
|
|
|
77
85
|
---
|
|
78
86
|
|
|
79
87
|
How do you like it? Feel like making a few more changes?
|
|
80
88
|
|
|
81
89
|
|
|
82
|
-
##
|
|
90
|
+
## 6. Add gravity
|
|
83
91
|
|
|
84
92
|
**To make the game feel more realistic, it needs gravity.**
|
|
85
93
|
|
|
@@ -88,11 +96,14 @@ to "pull down" on the sprite.
|
|
|
88
96
|
|
|
89
97
|
---
|
|
90
98
|
|
|
91
|
-
|
|
99
|
+
- :paper plane: Drag
|
|
100
|
+
``||sprites:set [mySprite] [x] to [0]||``
|
|
101
|
+
to **the end** of the
|
|
102
|
+
``||loops:on start||`` container.
|
|
92
103
|
|
|
93
|
-
|
|
104
|
+
- :mouse pointer: Click the dropdown to change **x** to **ay (acceleration y)**.
|
|
94
105
|
|
|
95
|
-
|
|
106
|
+
- :mouse pointer: To pull the sprite toward the ground, replace **0** with **500**.
|
|
96
107
|
|
|
97
108
|
```blocks
|
|
98
109
|
scene.setBackgroundImage(assets.image`background`)
|
|
@@ -103,14 +114,16 @@ controller.moveSprite(mySprite, 100, 0)
|
|
|
103
114
|
mySprite.ay = 500
|
|
104
115
|
```
|
|
105
116
|
|
|
106
|
-
##
|
|
117
|
+
## 7. Follow with Camera
|
|
107
118
|
|
|
108
119
|
**Oops! The monkey falls off-screen!**
|
|
109
120
|
|
|
110
121
|
---
|
|
111
122
|
|
|
112
|
-
|
|
113
|
-
``||scene:camera follow sprite [mySprite]||``
|
|
123
|
+
- :tree: To keep the monkey in sight, drag
|
|
124
|
+
``||scene:camera follow sprite [mySprite]||``
|
|
125
|
+
to **the end** of the
|
|
126
|
+
``||loops:on start||`` container.
|
|
114
127
|
|
|
115
128
|
```blocks
|
|
116
129
|
scene.setBackgroundImage(assets.image`background`)
|
|
@@ -124,23 +137,28 @@ scene.cameraFollowSprite(mySprite)
|
|
|
124
137
|
```
|
|
125
138
|
|
|
126
139
|
|
|
127
|
-
##
|
|
140
|
+
## 8. Look Again
|
|
128
141
|
|
|
129
|
-
**🕹️ Look at the game window to make sure you can see the monkey land on a platform
|
|
142
|
+
**🕹️ Look at the game window to make sure you can see the monkey land on a platform.**
|
|
130
143
|
|
|
131
144
|
|
|
132
145
|
|
|
133
|
-
##
|
|
146
|
+
## 9. Jump
|
|
134
147
|
|
|
135
148
|
Now that the monkey has landed safely, we can make it jump using the **up** arrow!
|
|
136
149
|
|
|
137
150
|
---
|
|
138
151
|
|
|
139
|
-
|
|
152
|
+
- :game: Drag the
|
|
153
|
+
``||controller:on [A] button [pressed]||``
|
|
154
|
+
container into an empty area of the workspace.
|
|
140
155
|
|
|
141
|
-
|
|
156
|
+
- :mouse pointer: Click the **A** option and change it to **up**.
|
|
142
157
|
|
|
143
|
-
|
|
158
|
+
- :paper plane: Inside of the
|
|
159
|
+
``||controller:on [up] button [pressed]||``
|
|
160
|
+
container, add
|
|
161
|
+
``||sprites:make [mySprite] gravity jump||``.
|
|
144
162
|
|
|
145
163
|
```blocks
|
|
146
164
|
controller.up.onEvent(ControllerButtonEvent.Pressed, function () {
|
|
@@ -152,12 +170,14 @@ controller.up.onEvent(ControllerButtonEvent.Pressed, function () {
|
|
|
152
170
|
|
|
153
171
|
|
|
154
172
|
|
|
155
|
-
##
|
|
173
|
+
## Finale
|
|
156
174
|
|
|
157
|
-
🔥 **That's it! Now give your game a try!** 🔥
|
|
175
|
+
🔥 **That's it! Now give your game a try!** 🔥
|
|
158
176
|
Can you jump around between platforms?
|
|
159
177
|
|
|
160
|
-
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
Take a spin through the level, then click **Done** to return to the main skillmap and go on to the next activity where we'll show you how to add **good** and **bad** tiles!
|
|
161
181
|
|
|
162
182
|
|
|
163
183
|
```package
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## 2. Try It!
|
|
13
13
|
|
|
14
|
-
**🕹️ First, move your sprite around in the game window
|
|
14
|
+
**🕹️ First, move your sprite around in the game window.**
|
|
15
15
|
|
|
16
16
|
---
|
|
17
17
|
|
|
@@ -19,19 +19,24 @@ Keep in mind which piece of code controls each action!
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
##
|
|
22
|
+
## 3. Game Over
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
**Time for danger**
|
|
25
|
+
💀💀💀
|
|
25
26
|
|
|
26
|
-
When the player overlaps
|
|
27
|
+
When the player overlaps a _poison pit_ tile, let's trigger a "GAME OVER" message.
|
|
27
28
|
|
|
28
29
|
---
|
|
29
30
|
|
|
30
|
-
|
|
31
|
+
- :tree: Drag the
|
|
32
|
+
``||scene:on [sprite] of kind [Player] overlaps [ ] at [location]||``
|
|
33
|
+
container into an empty area of the workspace.
|
|
31
34
|
|
|
32
|
-
|
|
35
|
+
- :paint brush: Click the checkerboard image and change it to the **poison pit** tile.
|
|
33
36
|
|
|
34
|
-
|
|
37
|
+
- :circle: Snap a
|
|
38
|
+
``||game:game over <LOSE>||``
|
|
39
|
+
block into the new container.
|
|
35
40
|
|
|
36
41
|
|
|
37
42
|
```blocks
|
|
@@ -40,9 +45,9 @@ scene.onOverlapTile(SpriteKind.Player, assets.tile`poison pit`, function (sprite
|
|
|
40
45
|
})
|
|
41
46
|
```
|
|
42
47
|
|
|
43
|
-
## Try It!
|
|
48
|
+
## 4. Try It Again!
|
|
44
49
|
|
|
45
|
-
|
|
50
|
+
**Give it a try in the game window**
|
|
46
51
|
|
|
47
52
|
---
|
|
48
53
|
|
|
@@ -50,19 +55,22 @@ When your monkey lands on the poison pit, it should end the game as a loss.
|
|
|
50
55
|
|
|
51
56
|
|
|
52
57
|
|
|
53
|
-
## You Win
|
|
58
|
+
## 5. You Win
|
|
54
59
|
|
|
55
|
-
|
|
60
|
+
**We have a way to lose, let's add a way to win!**
|
|
56
61
|
|
|
57
62
|
---
|
|
58
63
|
|
|
59
64
|
|
|
60
|
-
|
|
65
|
+
- :tree: Drag another
|
|
66
|
+
``||scene:on [sprite] of kind [Player] overlaps [ ] at [location]||``
|
|
61
67
|
container into the workspace.
|
|
62
68
|
|
|
63
|
-
|
|
69
|
+
- :paint brush: This time, change the checkerboard to the **chest1** tile.
|
|
64
70
|
|
|
65
|
-
|
|
71
|
+
- :circle: Snap a
|
|
72
|
+
``||game:game over <LOSE>||``
|
|
73
|
+
block into the new container and toggle
|
|
66
74
|
the **`<LOSE>`** switch to **`<WIN>`**!
|
|
67
75
|
|
|
68
76
|
|
|
@@ -73,20 +81,30 @@ scene.onOverlapTile(SpriteKind.Player, assets.tile`chest1`, function (sprite, lo
|
|
|
73
81
|
})
|
|
74
82
|
```
|
|
75
83
|
|
|
84
|
+
## 6. Try It Again, Again!
|
|
76
85
|
|
|
77
|
-
|
|
86
|
+
**Give it a try in the game window**
|
|
78
87
|
|
|
79
|
-
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
It's easy to lose...but impossible to win! How do you get over the pits?
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
## 7. Add Points 1
|
|
95
|
+
|
|
96
|
+
**💯 Award points when the player collects an orange bauble.**
|
|
80
97
|
|
|
81
98
|
---
|
|
82
99
|
|
|
83
100
|
|
|
84
|
-
|
|
101
|
+
- :tree: Drag another
|
|
102
|
+
``||scene:on [sprite] of kind [Player] overlaps [ ] at [location]||``
|
|
85
103
|
container into the workspace.
|
|
86
104
|
|
|
87
|
-
|
|
105
|
+
- :paint brush: Change the checkerboard to the orange sphere tile called **orange bauble**.
|
|
88
106
|
|
|
89
|
-
|
|
107
|
+
- :id card: Snap a ``||info:change score by [1]||`` block into the new container.
|
|
90
108
|
|
|
91
109
|
|
|
92
110
|
```blocks
|
|
@@ -95,7 +113,7 @@ scene.onOverlapTile(SpriteKind.Player, assets.tile`orange bauble`, function (spr
|
|
|
95
113
|
})
|
|
96
114
|
```
|
|
97
115
|
|
|
98
|
-
##
|
|
116
|
+
## 8. Play!
|
|
99
117
|
|
|
100
118
|
**🕹️ Play your game and collect an orange bauble 🕹️**
|
|
101
119
|
|
|
@@ -104,15 +122,21 @@ scene.onOverlapTile(SpriteKind.Player, assets.tile`orange bauble`, function (spr
|
|
|
104
122
|
Uh oh! You get WAY too many points when you touch an orange bauble. We can fix that in the next step.
|
|
105
123
|
|
|
106
124
|
|
|
107
|
-
##
|
|
125
|
+
## 9. Add Points 2
|
|
108
126
|
|
|
109
127
|
**Replace the baubles you collect with an empty tile.**
|
|
110
128
|
|
|
111
129
|
---
|
|
112
130
|
|
|
113
|
-
|
|
131
|
+
- :tree: Drag
|
|
132
|
+
``||scene:set [ ] at tilemap col [0] row [0]||``
|
|
133
|
+
into **the top** of the
|
|
134
|
+
``||scene:on [sprite] of kind [Player] overlaps [orange bauble] at [location]||`` container.
|
|
114
135
|
|
|
115
|
-
|
|
136
|
+
- :mouse pointer: Replace
|
|
137
|
+
``||scene:tilemap col [0] row [0]||``
|
|
138
|
+
with the ``||variables:location||``
|
|
139
|
+
value from the top of the **Player overlaps orange bauble** container.
|
|
116
140
|
|
|
117
141
|

|
|
118
142
|
|
|
@@ -126,13 +150,13 @@ scene.onOverlapTile(SpriteKind.Player, assets.tile`orange bauble`, function (spr
|
|
|
126
150
|
|
|
127
151
|
|
|
128
152
|
|
|
129
|
-
##
|
|
153
|
+
## Finale
|
|
130
154
|
|
|
131
155
|
**Now we have a simple platformer that has a way to win, a way to lose, and a way to collect points.**
|
|
132
156
|
|
|
133
157
|
---
|
|
134
158
|
|
|
135
|
-
When you're done playing with your game, click **Done** to return to the main
|
|
159
|
+
When you're done playing with your game, click **Done** to return to the main skillmap and keep going so we can show you how to win the game!
|
|
136
160
|
|
|
137
161
|
|
|
138
162
|
|
|
@@ -10,9 +10,9 @@ We need a way to pass the poison pits!
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## 2. Try It!
|
|
14
14
|
|
|
15
|
-
**🕹️ First, play the game in the game window
|
|
15
|
+
**🕹️ First, play the game in the game window.**
|
|
16
16
|
|
|
17
17
|
---
|
|
18
18
|
|
|
@@ -20,18 +20,24 @@ Can you remember which piece of code controls each action?
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
##
|
|
23
|
+
## 3. Adding Block Walls
|
|
24
24
|
|
|
25
|
-
**You know what would help us get over those pits?**
|
|
26
|
-
We need some well-placed platforms! Let's add a crate beneath the player when the A button is pressed.
|
|
25
|
+
**You know what would help us get over those pits?**
|
|
26
|
+
We need some well-placed platforms! Let's add a crate beneath the player when the (A) button is pressed.
|
|
27
27
|
|
|
28
28
|
---
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
- :game: Drag the
|
|
31
|
+
``||controller:on [A] button [pressed]||``
|
|
32
|
+
container into an empty area of the workspace.
|
|
31
33
|
|
|
32
|
-
|
|
34
|
+
- :tree: Set a wall by dragging
|
|
35
|
+
``||scene:set wall <OFF> at tilemap col [0] row [0]||``
|
|
36
|
+
into the empty
|
|
37
|
+
``||controller:on [A] button [pressed]||``
|
|
38
|
+
container.
|
|
33
39
|
|
|
34
|
-
|
|
40
|
+
- :mouse pointer: Toggle `<OFF>` to `<ON>`.
|
|
35
41
|
|
|
36
42
|
|
|
37
43
|
```blocks
|
|
@@ -40,14 +46,20 @@ controller.A.onEvent(ControllerButtonEvent.Pressed, function () {
|
|
|
40
46
|
})
|
|
41
47
|
```
|
|
42
48
|
|
|
43
|
-
##
|
|
49
|
+
## 4. Block Walls, Cont.
|
|
44
50
|
|
|
45
51
|
|
|
46
|
-
|
|
52
|
+
- :map: Make sure the new wall ends up in the right place by dragging
|
|
53
|
+
``||tiles:location [left] of [location]||``
|
|
54
|
+
in to replace
|
|
55
|
+
``||scene:tilemap col [0] row [0]||``.
|
|
47
56
|
|
|
48
|
-
|
|
57
|
+
- :mouse pointer: Click the word **left** to open the dropdown menu, and change the direction to **bottom**.
|
|
49
58
|
|
|
50
|
-
|
|
59
|
+
- :map: Create the wall **under** your sprite by dragging
|
|
60
|
+
``||tiles:location of [mySprite]||``
|
|
61
|
+
in to replace
|
|
62
|
+
``||variables:location||``.
|
|
51
63
|
|
|
52
64
|
|
|
53
65
|
```blocks
|
|
@@ -59,9 +71,9 @@ controller.A.onEvent(ControllerButtonEvent.Pressed, function () {
|
|
|
59
71
|
|
|
60
72
|
|
|
61
73
|
|
|
62
|
-
## Try It!
|
|
74
|
+
## 5. Try It!
|
|
63
75
|
|
|
64
|
-
**🕹️ Give it a try in the game window
|
|
76
|
+
**🕹️ Give it a try in the game window.**
|
|
65
77
|
|
|
66
78
|
---
|
|
67
79
|
|
|
@@ -69,16 +81,20 @@ Try jumping while you press the (A) button. Your monkey should continue to hover
|
|
|
69
81
|
|
|
70
82
|
|
|
71
83
|
|
|
72
|
-
##
|
|
84
|
+
## 6. Adding Block Tiles
|
|
73
85
|
|
|
74
|
-
**Where did my brick go??**
|
|
86
|
+
**Where did my brick go??**
|
|
75
87
|
The walls are great, but it's hard to remember where they are. Let's add special tiles over them so we can find them again later.
|
|
76
88
|
|
|
77
89
|
---
|
|
78
90
|
|
|
79
|
-
|
|
91
|
+
- :tree: Set a tile by dragging
|
|
92
|
+
``||scene:set [ ] at tilemap col [0] row [0]||``
|
|
93
|
+
into **the bottom** of the
|
|
94
|
+
``||controller:on [A] button [pressed]||``
|
|
95
|
+
container.
|
|
80
96
|
|
|
81
|
-
|
|
97
|
+
- :paint brush: Click the empty square and choose the crate called **bounce**.
|
|
82
98
|
|
|
83
99
|
|
|
84
100
|
```blocks
|
|
@@ -91,14 +107,19 @@ controller.A.onEvent(ControllerButtonEvent.Pressed, function () {
|
|
|
91
107
|
})
|
|
92
108
|
```
|
|
93
109
|
|
|
94
|
-
##
|
|
110
|
+
## 7. Adding Block Tiles, Cont.
|
|
95
111
|
|
|
96
112
|
|
|
97
|
-
|
|
113
|
+
- :map: Make sure the new tile ends up in the right place by dragging
|
|
114
|
+
``||tiles:location [left] of [location]||``
|
|
115
|
+
in to replace
|
|
116
|
+
``||scene:tilemap col [0] row [0]||``.
|
|
98
117
|
|
|
99
|
-
|
|
118
|
+
- :mouse pointer: Click the word **left** to open the dropdown menu, and change the direction to **bottom**.
|
|
100
119
|
|
|
101
|
-
|
|
120
|
+
- :map: As before, create the tile **under** your sprite by dragging
|
|
121
|
+
``||tiles:location of [mySprite]||``
|
|
122
|
+
in to replace ``||variables:location||``.
|
|
102
123
|
|
|
103
124
|
|
|
104
125
|
```blocks
|
|
@@ -111,9 +132,9 @@ controller.A.onEvent(ControllerButtonEvent.Pressed, function () {
|
|
|
111
132
|
```
|
|
112
133
|
|
|
113
134
|
|
|
114
|
-
## Try It!
|
|
135
|
+
## 8. Try It!
|
|
115
136
|
|
|
116
|
-
**🕹️ Now try it in the game window
|
|
137
|
+
**🕹️ Now try it in the game window.**
|
|
117
138
|
|
|
118
139
|
---
|
|
119
140
|
|
|
@@ -122,13 +143,13 @@ Now you can set your own blocks in-mid air to help you over the poison pit!
|
|
|
122
143
|
|
|
123
144
|
|
|
124
145
|
|
|
125
|
-
##
|
|
146
|
+
## Finale
|
|
126
147
|
|
|
127
|
-
**Play your game and see how many points you can get
|
|
148
|
+
**Play your game and see how many points you can get!**
|
|
128
149
|
|
|
129
150
|
---
|
|
130
151
|
|
|
131
|
-
When you're done playing, click **Done** to return to the main
|
|
152
|
+
When you're done playing, click **Done** to return to the main skillmap and continue to the next level where we will show you how to **break** tiles.
|
|
132
153
|
|
|
133
154
|
|
|
134
155
|
|