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
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -12,7 +12,7 @@ Let's create a platform base at the bottom of the screen.
|
|
|
12
12
|
Get a ``||scene:set tilemap to||`` and put it in ``||loops:on start||``.
|
|
13
13
|
Click on the gray box to open the ``tilemap editor``.
|
|
14
14
|
In the bottom left corner, set the size of the tilemap to ``10x8``
|
|
15
|
-
and draw a platform
|
|
15
|
+
and draw a platform in the bottom two rows of the tilemap.
|
|
16
16
|
Finally, click the `Wall` button, and fill in those two rows with wall tiles.
|
|
17
17
|
|
|
18
18
|

|
|
@@ -122,7 +122,7 @@ let mySprite: Sprite = sprites.create(img`
|
|
|
122
122
|
|
|
123
123
|
## {Step 3}
|
|
124
124
|
|
|
125
|
-
Open the tilemap editor and find the tile position where you want to place your
|
|
125
|
+
Open the tilemap editor and find the tile position where you want to place your sprite (hint: it's 1, 5!). You can see the position on the lower left of the editor.
|
|
126
126
|
Use the ``||scene:place mySprite on top of tilemap col row||`` block to position your player on that tile.
|
|
127
127
|
|
|
128
128
|
```blocks
|
|
@@ -188,7 +188,7 @@ tiles.placeOnTile(mySprite, tiles.getTileLocation(1, 5))
|
|
|
188
188
|
## {Step 4}
|
|
189
189
|
|
|
190
190
|
Let's give the sprite the ability to jump when we press a button. We do this by moving
|
|
191
|
-
the player upward in an ``||controller:on A button pressed||`` event.
|
|
191
|
+
the player upward in an ``||controller:on A button pressed||`` event. Inside the event, make the sprite move up with a ``||sprites:vy (velocity y)||``. Use `-200` for the `vy` value.
|
|
192
192
|
|
|
193
193
|
```blocks
|
|
194
194
|
let mySprite: Sprite = null
|
|
@@ -265,7 +265,7 @@ mySprite.ay = 500
|
|
|
265
265
|
|
|
266
266
|
## {Step 6}
|
|
267
267
|
|
|
268
|
-
We need to make sure that the sprite is on the ground before jumping, so drag an ``||logic:if then||`` conditional into the ``||controller:on A button pressed||``. Replace `true` with ``||scene:is mySprite hitting wall||`` and change ``left`` side ``bottom``.
|
|
268
|
+
We need to make sure that the sprite is on the ground before jumping, so drag an ``||logic:if then||`` conditional into the ``||controller:on A button pressed||``. Replace `true` with ``||scene:is mySprite hitting wall||`` and change the ``left`` side to ``bottom``. Now, drag the ``||sprites:vy (velocity y)||`` that was added earlier inside the ``||logic:if then||`` conditional.
|
|
269
269
|
|
|
270
270
|
```blocks
|
|
271
271
|
let mySprite: Sprite = null
|
|
@@ -447,7 +447,7 @@ controller.moveSprite(mySprite)
|
|
|
447
447
|
## {Step 4 - Keep the Player in the screen}
|
|
448
448
|
|
|
449
449
|
Notice that we can actually move our player off the screen. Let’s prevent that. From the
|
|
450
|
-
``||sprites:Sprites||`` Toolbox drawer,
|
|
450
|
+
``||sprites:Sprites||`` Toolbox drawer, drag a
|
|
451
451
|
``||sprites:set mySprite stay in screen||`` block and drop after the ``||controller:move mySprite||``
|
|
452
452
|
block.
|
|
453
453
|
|
|
@@ -944,7 +944,7 @@ sprites.onOverlap(SpriteKind.Player, SpriteKind.Projectile, function (sprite, ot
|
|
|
944
944
|
|
|
945
945
|
## {Step 12 - Destroy Clover}
|
|
946
946
|
|
|
947
|
-
From the ``||sprites:Sprites||`` Toolbox drawer,
|
|
947
|
+
From the ``||sprites:Sprites||`` Toolbox drawer, drag a ``||sprites:destroy sprite||`` block and drop in the ``||sprites:on sprite overlaps||`` block.
|
|
948
948
|
In the ``||sprites:on sprite overlaps||`` block, drag the ``||sprites:otherSprite||`` local variable (representing the specific overlapping clover) into the ``||sprites:destroy sprite||`` block replacing ``||sprites:mySprite||``.
|
|
949
949
|
|
|
950
950
|
```blocks
|
package/docs/tutorials/froggy.md
CHANGED
|
@@ -9,21 +9,22 @@ Let's get to it!
|
|
|
9
9
|

|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## 2. Add Background
|
|
13
13
|
|
|
14
|
-
**🐸 Before you add a frog, it's going to need a place to sit
|
|
14
|
+
**🐸 Before you add a frog, it's going to need a place to sit**
|
|
15
15
|
|
|
16
16
|
---
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
- :tree: From the ``||scene:Scene||`` category, grab
|
|
19
|
+
``||scene: set background image to [ ]||``
|
|
20
|
+
and snap it into the
|
|
21
|
+
``||loops:on start||`` container already in the workspace.
|
|
20
22
|
|
|
21
|
-
|
|
23
|
+
- :paint brush: Click the grey box in the new block to open the **image editor**.
|
|
22
24
|
|
|
23
|
-
You can draw a background
|
|
24
|
-
or **My Assets** tab at the top and choose one that has already been created.
|
|
25
|
+
_💡 You can draw a background or you can switch over to the **My Assets** tab at the top and choose one that has already been created._
|
|
25
26
|
|
|
26
|
-
|
|
27
|
+
- :mouse pointer: Click **Next** when you're ready for the next instruction.
|
|
27
28
|
|
|
28
29
|
|
|
29
30
|
```blocks
|
|
@@ -31,19 +32,20 @@ or **My Assets** tab at the top and choose one that has already been created.
|
|
|
31
32
|
scene.setBackgroundImage(assets.image`Background`)
|
|
32
33
|
```
|
|
33
34
|
|
|
34
|
-
##
|
|
35
|
+
## 3. Add a Sprite
|
|
35
36
|
|
|
36
37
|
**Time for a hero!**
|
|
37
38
|
|
|
38
39
|
---
|
|
39
40
|
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
- :paper plane: From ``||sprites:Sprites||``, drag
|
|
42
|
+
``||variables:set [mySprite] to sprite [ ] of kind [Player]||``
|
|
43
|
+
into **the end** of the
|
|
44
|
+
``||loops:on start||`` container.
|
|
42
45
|
|
|
43
|
-
|
|
46
|
+
- :paint brush: Click the grey box in the new block to open the **image editor**.
|
|
44
47
|
|
|
45
|
-
|
|
46
|
-
or **My Assets** tab and choose one that has already been created.
|
|
48
|
+
_💡 Switch over to **My Assets** to choose the same frog we use, or draw one of your own!_
|
|
47
49
|
|
|
48
50
|
|
|
49
51
|
```blocks
|
|
@@ -53,17 +55,25 @@ scene.setBackgroundImage(assets.image`Background`)
|
|
|
53
55
|
mySprite = sprites.create(assets.image`Hero`, SpriteKind.Player)
|
|
54
56
|
```
|
|
55
57
|
|
|
56
|
-
##
|
|
58
|
+
## 4. Try It
|
|
57
59
|
|
|
58
|
-
|
|
60
|
+
**Click the Game Window Tab (Above)**
|
|
61
|
+

|
|
59
62
|
|
|
60
63
|
---
|
|
61
64
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
Is your frog sitting where you want it? If not, you can fix it in the next step.
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
## 5. Set Position
|
|
69
|
+
|
|
70
|
+
- :paper plane: If you don't like where your hero has ended up, snap a
|
|
71
|
+
``||sprites:set [mySprite] position to x [0] y [0]||``
|
|
72
|
+
block into **the end** of the
|
|
73
|
+
``||loops:on start||`` container.
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
- :mouse pointer: Play with the **x** (horizontal) and/or **y** (vertical) positions until your sprite appears where you want it.
|
|
67
77
|
|
|
68
78
|
```blocks
|
|
69
79
|
let mySprite: Sprite = null
|
|
@@ -73,21 +83,23 @@ mySprite = sprites.create(assets.image`Hero`, SpriteKind.Player)
|
|
|
73
83
|
mySprite.setPosition(85, 80)
|
|
74
84
|
```
|
|
75
85
|
|
|
76
|
-
##
|
|
86
|
+
## 6. Add a Fly
|
|
77
87
|
|
|
78
|
-
**😋 It's snack time
|
|
79
|
-
The frog needs something to eat.
|
|
88
|
+
**😋 It's snack time**
|
|
89
|
+
The frog needs something to eat.
|
|
80
90
|
|
|
81
91
|
---
|
|
82
92
|
|
|
83
|
-
|
|
84
|
-
|
|
93
|
+
- :paper plane: Snap a new
|
|
94
|
+
``||variables:set [mySprite2] to sprite [ ] of kind [Player]||``
|
|
95
|
+
block into **the end** of the
|
|
96
|
+
``||loops:on start||`` container.
|
|
97
|
+
|
|
98
|
+
- :paper plane: Click the grey box in the new block to open the image editor and draw a flying insect.
|
|
85
99
|
|
|
86
|
-
|
|
87
|
-
*(Or switch over to __Gallery__
|
|
88
|
-
or __My Assets__ and choose one that has already been created.)*
|
|
100
|
+
_💡 Or switch over to the **My Assets** tab at the top and choose a fly that has already been created._
|
|
89
101
|
|
|
90
|
-
|
|
102
|
+
- :mouse pointer: Switch the **kind** of the fly by clicking on **Player** and selecting **Food**.
|
|
91
103
|
|
|
92
104
|
|
|
93
105
|
```blocks
|
|
@@ -101,19 +113,23 @@ mySprite2 = sprites.create(assets.image`Bouncer`, SpriteKind.Food)
|
|
|
101
113
|
```
|
|
102
114
|
|
|
103
115
|
|
|
104
|
-
##
|
|
116
|
+
## 7. Get It Moving
|
|
105
117
|
|
|
106
|
-
**😴 There's no challenge if the fly just sits there
|
|
118
|
+
**😴 There's no challenge if the fly just sits there**
|
|
107
119
|
|
|
108
120
|
---
|
|
109
121
|
|
|
110
|
-
|
|
111
|
-
|
|
122
|
+
- :paper plane: To get the fly moving, snap a
|
|
123
|
+
``||sprites:set [mySprite] velocity to vx [50] vy [50]||``
|
|
124
|
+
into the **the end** of the
|
|
125
|
+
``||loops:on start||`` container.
|
|
126
|
+
|
|
127
|
+
- :mouse pointer: To make sure it's the fly that's moving, change **mySprite** to **mySprite2** using the dropdown menu.
|
|
128
|
+
|
|
129
|
+
- :mouse pointer: Add some excitement by choosing larger numbers for both velocity directions (**vx** and **vy**).
|
|
112
130
|
|
|
113
|
-
|
|
131
|
+
_💡 Anything between 100 and 200 is entertaining._
|
|
114
132
|
|
|
115
|
-
► Add some excitement by choosing larger numbers for both velocity directions.
|
|
116
|
-
*(Anything between 100 and 200 is entertaining.)*
|
|
117
133
|
|
|
118
134
|
```blocks
|
|
119
135
|
let mySprite: Sprite = null
|
|
@@ -128,27 +144,31 @@ mySprite2.setVelocity(200, 100)
|
|
|
128
144
|
|
|
129
145
|
|
|
130
146
|
|
|
131
|
-
##
|
|
147
|
+
## 8. Try It
|
|
132
148
|
|
|
133
|
-
**👀 Try your game in the simulator
|
|
149
|
+
**👀 Try your game in the simulator**
|
|
134
150
|
|
|
135
|
-
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
Does it do what you expected? Did the fly leave the screen too fast for you to see?
|
|
136
154
|
|
|
137
155
|
|
|
138
156
|
|
|
139
|
-
##
|
|
157
|
+
## 9. Bounce
|
|
140
158
|
|
|
141
|
-
**🕐 That didn't last long
|
|
159
|
+
**🕐 That didn't last long**
|
|
142
160
|
|
|
143
161
|
To give the frog a fighting chance, we'll want to keep the fly on screen.
|
|
144
162
|
|
|
145
163
|
---
|
|
146
164
|
|
|
147
|
-
|
|
148
|
-
|
|
165
|
+
- :paper plane: From ``||sprites:Sprites||``, grab a
|
|
166
|
+
``||sprites:set [mySprite] bounce on wall <on>||``
|
|
167
|
+
block and snap it into the **the end** of the
|
|
168
|
+
``||loops:on start||`` container.
|
|
149
169
|
|
|
150
170
|
|
|
151
|
-
|
|
171
|
+
- :mouse pointer: Change **mySprite** to **mySprite2** to make sure the block changes the behavior of the fly.
|
|
152
172
|
|
|
153
173
|
|
|
154
174
|
```blocks
|
|
@@ -164,17 +184,19 @@ mySprite2.setBounceOnWall(true)
|
|
|
164
184
|
```
|
|
165
185
|
|
|
166
186
|
|
|
167
|
-
##
|
|
187
|
+
## 10. Press the Button
|
|
168
188
|
|
|
169
189
|
**We want to press the button to catch the fly!**
|
|
170
190
|
|
|
171
191
|
---
|
|
172
192
|
|
|
173
|
-
|
|
193
|
+
- :game: From ``||controller:Controller||``, drag
|
|
194
|
+
``||controller:on [A] button [pressed]||``
|
|
174
195
|
out into an empty spot in the workspace.
|
|
175
196
|
|
|
176
|
-
|
|
177
|
-
|
|
197
|
+
- :random: Inside the new container, drop a
|
|
198
|
+
``||logic:if <true> then / else||``
|
|
199
|
+
block (from the ``||logic:Logic||`` category).
|
|
178
200
|
|
|
179
201
|
|
|
180
202
|
```blocks
|
|
@@ -185,12 +207,14 @@ controller.A.onEvent(ControllerButtonEvent.Pressed, function () {
|
|
|
185
207
|
})
|
|
186
208
|
```
|
|
187
209
|
|
|
188
|
-
##
|
|
210
|
+
## 11. Get It?
|
|
189
211
|
|
|
190
|
-
|
|
191
|
-
|
|
212
|
+
- :paper plane: From ``||sprites:Sprites||``, grab
|
|
213
|
+
``||sprites:<[mySprite] overlaps with [otherSprite]>||``
|
|
214
|
+
and drop it in to replace **`<true>`** in the
|
|
215
|
+
``||logic:if <true> then / else||`` block.
|
|
192
216
|
|
|
193
|
-
|
|
217
|
+
- :mouse pointer: Change **otherSprite** to **mySprite2** using the dropdown menu.
|
|
194
218
|
|
|
195
219
|
|
|
196
220
|
```blocks
|
|
@@ -204,20 +228,24 @@ controller.A.onEvent(ControllerButtonEvent.Pressed, function () {
|
|
|
204
228
|
```
|
|
205
229
|
|
|
206
230
|
|
|
207
|
-
##
|
|
231
|
+
## 12. Check for Flies
|
|
208
232
|
|
|
209
|
-
|
|
233
|
+
When we press the Ⓐ button, one of two things could be happening:
|
|
210
234
|
- The fly will be overlapping the frog and we win the game with a snack
|
|
211
235
|
- The fly will not be overlapping the frog and our player will lose a life
|
|
212
236
|
|
|
213
237
|
---
|
|
214
238
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
239
|
+
- :circle: To create the first case, drag
|
|
240
|
+
``||game:game over <lose>||``
|
|
241
|
+
into the top (**if**) section of the
|
|
242
|
+
``||logic:if <true> then / else||``
|
|
243
|
+
block and toggle **`<lose>`** to **`<win>`**.
|
|
218
244
|
|
|
219
|
-
|
|
220
|
-
|
|
245
|
+
- :id card: For the second case, drag
|
|
246
|
+
``||info:change life by -1||``
|
|
247
|
+
into the bottom (**else**) section of the
|
|
248
|
+
``||logic:if <true> then / else||`` block.
|
|
221
249
|
|
|
222
250
|
|
|
223
251
|
```blocks
|
|
@@ -235,64 +263,51 @@ controller.A.onEvent(ControllerButtonEvent.Pressed, function () {
|
|
|
235
263
|
|
|
236
264
|
## {Step 12}
|
|
237
265
|
|
|
238
|
-
**👀 Try your game in the simulator
|
|
266
|
+
**👀 Try your game in the simulator**
|
|
239
267
|
|
|
240
|
-
|
|
268
|
+
---
|
|
269
|
+
|
|
270
|
+
How is it shaping up? Do you lose a life if the fly isn't over the frog when you press (A)? Do you win the game if it is?
|
|
241
271
|
|
|
242
272
|
|
|
243
273
|
|
|
244
274
|
## {Step 11}
|
|
245
275
|
|
|
246
|
-
**⌚ Don't be late
|
|
276
|
+
**⌚ Don't be late**
|
|
247
277
|
|
|
248
278
|
Add a sense of urgency by including a countdown timer.
|
|
249
279
|
|
|
250
280
|
---
|
|
251
281
|
|
|
252
|
-
|
|
253
|
-
|
|
282
|
+
- :id card: From ``||info:Info||``, grab
|
|
283
|
+
``||info:start countown [10]s||``
|
|
284
|
+
and drag it to the end of the
|
|
285
|
+
``||loops:on start||`` container.
|
|
254
286
|
|
|
255
287
|
Now you have exactly 10 seconds to catch the fly before the game ends!
|
|
256
288
|
|
|
257
289
|
|
|
258
290
|
## {Step 11}
|
|
259
291
|
|
|
260
|
-
**🎉 Congratulations
|
|
292
|
+
**🎉 Congratulations**
|
|
293
|
+
|
|
294
|
+
---
|
|
261
295
|
|
|
262
296
|
Now you have a game that tests your timing and is enforced by a timer!
|
|
263
297
|
|
|
264
|
-
Click **Done** if you're ready to publish your game and share with friends, or
|
|
265
|
-
look at the challenges below for suggestions on modding your game
|
|
266
|
-
the **MakeCode Arcade Game Jam!**
|
|
298
|
+
Click **Done** if you're ready to publish your game and share with friends, or
|
|
299
|
+
look at the challenges below for suggestions on modding your game.
|
|
267
300
|
|
|
268
301
|
---
|
|
269
302
|
|
|
270
|
-
|
|
303
|
+
- :question: Try adding a block to change the number of lives you start with.
|
|
271
304
|
|
|
272
|
-
|
|
273
|
-
you lose a life
|
|
305
|
+
- :question: Instead of only one fly, start with three and have one disappear each time you lose a life.
|
|
274
306
|
|
|
275
|
-
|
|
307
|
+
- :question: Change the theme so that instead of a frog catching flies, it's something entirely different!
|
|
276
308
|
|
|
277
|
-
---
|
|
278
|
-
|
|
279
|
-
**Proud of what you've got??**
|
|
280
|
-
Submit it to aka.ms/gamejam by May 17, 2021 to be included in the **Time Jam**!
|
|
281
309
|
|
|
282
310
|
|
|
283
|
-
```blocks
|
|
284
|
-
let mySprite: Sprite = null
|
|
285
|
-
let mySprite2: Sprite = null
|
|
286
|
-
scene.setBackgroundImage(assets.image`Background`)
|
|
287
|
-
mySprite = sprites.create(assets.image`Hero`, SpriteKind.Player)
|
|
288
|
-
mySprite.setPosition(85, 80)
|
|
289
|
-
mySprite2 = sprites.create(assets.image`Bouncer`, SpriteKind.Food)
|
|
290
|
-
mySprite2.setVelocity(200, 100)
|
|
291
|
-
mySprite2.setBounceOnWall(true)
|
|
292
|
-
//@highlight
|
|
293
|
-
info.startCountdown(10)
|
|
294
|
-
```
|
|
295
|
-
|
|
296
311
|
|
|
297
312
|
|
|
298
313
|
|