pxt-arcade 1.7.2 → 1.7.3

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.
@@ -448,11 +448,11 @@
448
448
  ],
449
449
  "uploadDocs": true,
450
450
  "versions": {
451
- "branch": "v1.7.2",
452
- "tag": "v1.7.2",
453
- "commits": "https://github.com/microsoft/pxt-arcade/commits/5c0351836e55d924140e90500d22054ac4220e7e",
454
- "target": "1.7.2",
455
- "pxt": "7.3.2"
451
+ "branch": "v1.7.3",
452
+ "tag": "v1.7.3",
453
+ "commits": "https://github.com/microsoft/pxt-arcade/commits/5f25293cb2206b608be9e3b76c2d8d42a3ad7449",
454
+ "target": "1.7.3",
455
+ "pxt": "7.3.4"
456
456
  },
457
457
  "blocksprj": {
458
458
  "id": "blocksprj",
package/docs/hardware.md CHANGED
@@ -45,7 +45,7 @@ These boards run MakeCode Arcade games. Choose a board to find out more about it
45
45
  "name": "TinkerGen GameGo",
46
46
  "description": "A fun-sized console to play the games you code.",
47
47
  "imageUrl": "/static/hardware/gamego.jpg",
48
- "url": "https://shop.tinkergen.com/gamego.html",
48
+ "url": "https://www.tinkergen.com/gamego",
49
49
  "variant": "hw---stm32f401"
50
50
  },
51
51
  {
@@ -1,3 +1,3 @@
1
1
  {
2
- "appref": "v1.6.21"
2
+ "appref": "v1.6.23"
3
3
  }
@@ -203,7 +203,7 @@
203
203
  * [Adafruit PyBadge](https://www.adafruit.com/product/4200)
204
204
  * [Adafruit PyGamer](https://www.adafruit.com/product/4242)
205
205
  * [Kitronik ARCADE](https://www.kitronik.co.uk/arcade)
206
- * [TinkerGen GameGo](https://shop.tinkergen.com/gamego.html)
206
+ * [TinkerGen GameGo](https://www.tinkergen.com/gamego)
207
207
  * [Ovobot Xtron Pro](https://www.ovobot.cc/en/product/detail/xtron-pro/)
208
208
  * [Adafruit EdgeBadge](https://www.adafruit.com/product/4400)
209
209
  * [Adafruit M4](https://learn.adafruit.com/makecode-arcade-m4)
@@ -4,18 +4,18 @@
4
4
 
5
5
  The **Save the Forest!** map uses basic code blocks and extensions in MakeCode Arcade to implement simple game concepts.
6
6
 
7
- In this short set of activities, students code a scenario where players fly fire planes across a burning forest in an urgent effort to douse the flames. This map is intended for students who are new to MakeCode with little or no previous coding experience.
7
+ In this short set of activities, students code a game that recreates the conditions for a forest fire, and then code a fire-fighting airtanker plane to spray water and put out the flames! This map is intended for students who are new to MakeCode with little or no previous coding experience.
8
8
 
9
9
  Designed for students between the ages of 11 & 18, this experience contains a total of 6 tutorials (approximating 54 minutes of instruction). At the end of the learning path, students receive a certificate of completion.
10
10
 
11
11
  | | Minutes* | Game Type | Key Concepts |
12
12
  | --------------- | -------- | --------- | ------------ |
13
- | Prepare Your Plane | 7 | Intro | movement, creation |
14
- | Burning Issues | 8 | Maze | events, game score |
15
- | Fire Fighting | 10 | Maze | events, game score, timer |
16
- | Spreads Like Wildfire | 10 | Maze | events, game score, timer |
17
- | Head's Up! | 9 | Maze | events, game score, timer |
18
- | Keep Going | 10 | Maze | events, game score, timer |
13
+ | Prepare Your Plane | 7 | Intro | movement, sprites |
14
+ | Burning Issues | 8 | Maze | events, loops, random |
15
+ | Fire Fighting | 10 | Maze | events, projectiles |
16
+ | Spreads Like Wildfire | 10 | Maze | events, variables, collisions |
17
+ | Head's Up! | 9 | Maze | displays, customization |
18
+ | Keep Going | 10 | Maze | animations, sounds |
19
19
 
20
20
  \* Minutes are approximate, based on time to follow instructions as written. Times do not include time spent on designing elements or re-aquainting with previously-written code. Providing extra time for creativity and debugging is encouraged.
21
21
 
@@ -32,6 +32,8 @@ Specifically, they will experience the following topics:
32
32
  - Movement
33
33
  - Collisions
34
34
  - Projectiles
35
+ - Animation
36
+ - Sounds
35
37
  - Strength/Life Mechanics
36
38
 
37
39
 
@@ -46,20 +48,58 @@ pxt-tilemaps=github:microsoft/pxt-tilemaps/
46
48
  #### 1. Prepare Your Plane
47
49
  | Activity | Prepare Your Plane (7 min) |
48
50
  |---|---|
49
- | ![Prepare Your Plane thumbnail](/static/skillmap/rockstar/rockstar1.gif) | Set up your plane to make sure you can get everywhere you need to be! |
51
+ | ![Prepare Your Plane thumbnail](/static/skillmap/forest/forest1.gif) | Set up your plane to make sure you can get everywhere you need to be! |
50
52
  | Blocks used | ``[let mySprite = sprites.create(img`.`, SpriteKind.Player)]``<br/>``[let mySprite: Sprite=null; controller.moveSprite(mySprite)]``<br/>``[tiles.placeOnRandomTile()]``<br/>``[let mySprite: Sprite=null; scene.cameraFollowSprite(mySprite)]`` |
51
- | Solution option | [Prepare Your Plane Project](https://makecode.com/_FM1DbPhEia87) |
53
+ | Solution option | [Prepare Your Plane Project](https://makecode.com/_0CbLhcf6TW1W) |
52
54
 
53
55
  #### 2. Burning Issues
54
56
  | Activity | Burning Issues (8 min) |
55
57
  |---|---|
56
- | ![Burning Issues thumbnail](/static/skillmap/rockstar/rockstar2.gif) | Use loops to add random fires to your map! |
58
+ | ![Burning Issues thumbnail](/static/skillmap/forest/forest2.gif) | Use loops to add random fires to your map! |
57
59
  | Blocks used | ``[scene.onOverlapTile()]``<br/>``[tiles.setTileAt(location, assets.tile`transparency16`)]``<br/>``[info.changeScoreBy(1)]``<br/>``[game.over(true)]`` |
58
- | Solution option | [Burning Issues Project](https://makecode.com/_aE3eYm23wad3) |
60
+ | Solution option | [Burning Issues Project](https://makecode.com/_EdjVbU6eMTPW) |
59
61
 
60
62
  #### 3. Fire Fighting
61
63
  | Activity | Fire Fighting (10 min) |
62
64
  |---|---|
63
- | ![Fire Fighting! thumbnail](/static/skillmap/rockstar/rockstar3.gif) | Add a water hose to your plane so you can keep your fires under control. |
65
+ | ![Fire Fighting! thumbnail](/static/skillmap/forest/forest3.gif) | Add a water hose to your plane so you can keep your fires under control. |
64
66
  | Blocks used | ``[scene.onOverlapTile()]``<br/>``[tiles.setTileAt(location, assets.tile`transparency16`)]``<br/>``[info.changeScoreBy(-1)]``<br/>``[info.startCountdown(0)]`` |
65
- | Solution option | [Fire Fighting Project](https://makecode.com/_dW115JWAR2d0) |
67
+ | Solution option | [Fire Fighting Project](https://makecode.com/_9p32WzfzX1uv) |
68
+
69
+ #### 4. Spreads Like Wildfire
70
+ | Activity | Spreads Like Wildfire (10 min) |
71
+ |---|---|
72
+ | ![Spreads Like Wildfire thumbnail](/static/skillmap/forest/forest4.gif) | Conditions in the weather and environment such as drought, winds, vegetation density and dryness can cause fires to spread more quickly.  Let’s simulate these conditions in our game. |
73
+ | Blocks used | ``[scene.onOverlapTile()]``<br/>``[tiles.setTileAt(location, assets.tile`transparency16`)]``<br/>``[info.changeScoreBy(-1)]``<br/>``[info.startCountdown(0)]`` |
74
+ | Solution option | [Spreads Like Wildfire Project](https://makecode.com/_ifR6pigEHKP7) |
75
+
76
+ #### 5. Head's Up!
77
+ | Activity | Head's Up! (9 min) |
78
+ |---|---|
79
+ | ![Head's Up!](/static/skillmap/forest/forest5.gif) | Computer science is more important to firefighting than ever before. Let's add a heads-up-display (HUD) to help the pilot get information from their fire database in real-time. |
80
+ | Blocks used | ``[scene.onOverlapTile()]``<br/>``[tiles.setTileAt(location, assets.tile`transparency16`)]``<br/>``[info.changeScoreBy(-1)]``<br/>``[info.startCountdown(0)]`` |
81
+ | Solution option | [Head's Up Project](https://makecode.com/_77cLwx4b120o) |
82
+
83
+ #### 4. Keep Going
84
+ | Activity | Keep Going (10 min) |
85
+ |---|---|
86
+ | ![Keep Going thumbnail](/static/skillmap/forest/forest6.gif) | Add more to your game! Experiment with sounds and animation to make your game truly unique. |
87
+ | Blocks used | ``[scene.onOverlapTile()]``<br/>``[tiles.setTileAt(location, assets.tile`transparency16`)]``<br/>``[info.changeScoreBy(-1)]``<br/>``[info.startCountdown(0)]`` |
88
+ | Solution option | [Keep Going Project](https://makecode.com/_0kzFyAgPMa4A) |
89
+
90
+ ##### Game Mod Ideas
91
+
92
+ As students work on **Keep Going**, we encourage them to plan out ways they can dive even deeper using the full editor after opening their game using the [SAVE TO MY PROJECTS] button.
93
+
94
+ - What other environment could my plane explore? Neighborhoods? The desert?
95
+ - What could pop-up randomly instead of fires? Fish? Mice? Snowmen?
96
+ - What could you move around instead of an airplane? A boat? A magnifying glass?
97
+
98
+ ##### What's Next?
99
+
100
+ When students are finished with **Save the Forest!** consider graduating them to another map to work on skills further.
101
+
102
+ - [Try the Beginner Skillmap](/skillmap/beginner)
103
+ - [Try the Jungle Monkey Skillmap](/skillmap/jungle)
104
+ - [Try the Space Explorer Map](/skillmap/space)
105
+ - [Try our Time Flies Tutorial](/tutorials/froggy)
@@ -42,11 +42,12 @@ tiles.setTilemap(tilemap`level2`)
42
42
 
43
43
  ## 3. Set Your Map
44
44
 
45
- - :paint brush: Click the empty grey square in
46
- the
47
- ``||scene:set tilemap to []||``
45
+ - :paint brush: Click the empty grey square in
46
+ ``||scene:set tilemap to []||``
48
47
  and toggle to **My Assets** to select the tilemap called **level1**.
49
48
 
49
+ ![Toggle to My Assets](/static/skillmap/assets/my-assets.png "Resources have been provided for you!")
50
+
50
51
 
51
52
  ```blocks
52
53
  //@highlight
@@ -56,13 +57,13 @@ tiles.setTilemap(tilemap`level1`)
56
57
  ## 4. Take a Look!
57
58
 
58
59
  **Click the Game Window Tab (Above)**
59
- ![Click the Game Window tab to see your scene. ](/static/skillmap/assets/game-win-tab.png "Look what we're about to do today!")
60
+ ![Click the Game Window tab to see your scene. ](/static/skillmap/assets/game-win-tab.png "Don't forget to look at your game!")
60
61
 
61
62
  ---
62
63
 
63
64
  Open the game window to take a look at the scene you've just set up.
64
65
 
65
- When you're ready to continue, click back to the instructions tab for more!
66
+ When you're ready to continue, click into the instructions tab again!
66
67
 
67
68
 
68
69
 
@@ -73,7 +74,7 @@ When you're ready to continue, click back to the instructions tab for more!
73
74
  **We need a hero**
74
75
 
75
76
  Choose a [__*sprite*__](#sprote "a 2-D image that moves on the screen")
76
- for your aircraft that you will fly around the screen.
77
+ for your aircraft that will fly around the screen.
77
78
 
78
79
  ---
79
80
 
@@ -38,7 +38,7 @@ container.
38
38
 
39
39
  - :paper plane: Add
40
40
  ``||variables:set [mySprite2] to sprite [ ] of kind [Player]||``
41
- to the end of the
41
+ to the empty
42
42
  ``||loops:repeat [4] times||``
43
43
  container.
44
44
 
@@ -133,7 +133,7 @@ for (let index = 0; index < 4; index++) {
133
133
 
134
134
 
135
135
 
136
- ## Try It
136
+ ## 6. Try It
137
137
 
138
138
  **🕹️ Test it out in the Game Window **
139
139
 
@@ -32,10 +32,10 @@ Let's add code that sprays water when you press the (A) button.
32
32
 
33
33
  - :game: Drag the
34
34
  ``||controller:on [A] button [pressed]||``
35
-
36
35
  container into an empty area in your workspace.
37
36
 
38
- - :mouse pointer: Change ``||controller:pressed||`` to ``||controller:repeat||`` to keep the water spraying as you hold the (A) button.
37
+ - :mouse pointer: Change ``||controller:pressed||`` to ``||controller:repeat||`` to keep the water spraying as you hold the (A) button.
38
+
39
39
  _💡 Find it too hard to keep (A) pressed? Try using the spacebar on your keyboard!_
40
40
 
41
41
 
@@ -152,7 +152,7 @@ Does it get out of control too quickly?
152
152
 
153
153
  ## 7. No Fuel, No Fire
154
154
 
155
- Right now, the fires don't burn the trees,
155
+ Right now, the fires don't burn the trees
156
156
  so they can appear on the same tree over and over.
157
157
  When a flame burns out, we want to mark that spot in the forest with a special tile.
158
158
 
@@ -221,6 +221,8 @@ with
221
221
  - :mouse pointer: To get the location for the correct sprite, replace ``||variables:mySprite||`` with the ``||variables:sprite||``
222
222
  value from the outer ** on destroyed** container.
223
223
 
224
+ ![Grab the sprite value from the title bar of the outer container](/static/skillmap/assets/sprite-from-container.gif "This is how your block knows which sprite to use")
225
+
224
226
 
225
227
  ```blocks
226
228
  namespace SpriteKind {
@@ -235,6 +237,10 @@ sprites.onDestroyed(SpriteKind.Fire, function (sprite) {
235
237
 
236
238
  ```
237
239
 
240
+ ---
241
+
242
+ ![Grab the sprite value from the title bar of the outer container](/static/skillmap/assets/sprite-from-container.gif "This is how your block knows which sprite to use")
243
+
238
244
 
239
245
 
240
246
  ## 10. Smoke Screen
@@ -4,6 +4,7 @@
4
4
  ## Welcome @showdialog
5
5
 
6
6
  Computer science is more important to firefighting than ever before.
7
+
7
8
  Let's add a heads-up-display (HUD) to help the pilot get information from their fire database in real-time.
8
9
 
9
10
  ![A HUD can help keep you informed](/static/skillmap/forest/forest5.gif "Look what we're about to do!")
@@ -109,7 +110,7 @@ hud.danger_hud(true)
109
110
 
110
111
  ## 6. Healthy Forests
111
112
 
112
- The crew needs to know how engulfed the forest is. Add another hud
113
+ The crew needs to know the progress of the fire. Add another hud
113
114
  to share information on how much of the forest is still healthy.
114
115
 
115
116
  ---
@@ -271,12 +272,12 @@ sprites.onOverlap(SpriteKind.Fire, SpriteKind.Fire, function (sprite, otherSprit
271
272
  sprite.destroy()
272
273
  })
273
274
 
274
- scene.onOverlapTile(SpriteKind.Fire, assets.tile`smoulder`, function (sprite, location) {
275
+ scene.onOverlapTile(SpriteKind.Fire, assets.tile`burnt tree`, function (sprite, location) {
275
276
  sprite.destroy()
276
277
  })
277
278
 
278
279
  sprites.onDestroyed(SpriteKind.Fire, function (sprite) {
279
- tiles.setTileAt(tiles.locationOfSprite(sprite), assets.tile`smoulder`)
280
+ tiles.setTileAt(tiles.locationOfSprite(sprite), assets.tile`burnt tree`)
280
281
  })
281
282
 
282
283
  game.onUpdate(function () {
@@ -358,6 +359,7 @@ let hudBG = sprites.create(img`
358
359
  hudBG.bottom = 120
359
360
  hudBG.z = 2000
360
361
  hudBG.setFlag(SpriteFlag.Invisible, true)
362
+ hudBG.setFlag(SpriteFlag.RelativeToCamera, true)
361
363
  let statusbar2 = statusbars.create(8, 8, StatusBarKind.Magic)
362
364
  statusbar2.setLabel("Fire Danger:")
363
365
  statusbar2.setColor(7, 2)
@@ -373,7 +375,7 @@ statusbar2.setFlag(SpriteFlag.Invisible, true)
373
375
 
374
376
  game.onUpdate(function () {
375
377
  statusbar.max = tiles.tilemapRows() * tiles.tilemapColumns()
376
- statusbar.value = tiles.tilemapRows() * tiles.tilemapColumns() - tiles.getTilesByType(assets.tile`smoulder`).length
378
+ statusbar.value = tiles.tilemapRows() * tiles.tilemapColumns() - tiles.getTilesByType(assets.tile`burnt tree`).length
377
379
  spreadTimeBase = 4500 - (250 * windSpeed + 250 * dryGrass - 100 * tinder)
378
380
  if (spreadTimeBase >= 4000) {
379
381
  statusbar2.setColor(7, 2)
@@ -102,7 +102,7 @@ Your plane should face left when you fly left and right when you fly right!
102
102
 
103
103
  ---
104
104
 
105
- - :headphones: Find a block to add sound when a sprite of kind ``||sprites:Fire||`` is **destroyed**.
105
+ - :headphones: Find the block that will let you add sound when a sprite of kind ``||sprites:Fire||`` is **destroyed**.
106
106
  💡 We like the **thump** sound for this.
107
107
 
108
108
  - :question: Can you figure out where to add this block if you want it to play each time a sprite of kind **Fire** is **destroyed**?
@@ -115,7 +115,7 @@ namespace SpriteKind {
115
115
  export const Burnt = SpriteKind.create()
116
116
  }
117
117
  sprites.onDestroyed(SpriteKind.Fire, function (sprite) {
118
- tiles.setTileAt(tiles.locationOfSprite(sprite), assets.tile`smoulder`)
118
+ tiles.setTileAt(tiles.locationOfSprite(sprite), assets.tile`burnt tree`)
119
119
  //@highlight
120
120
  music.thump.play()
121
121
  })
@@ -156,7 +156,7 @@ sprites.onCreated(SpriteKind.Fire, function (sprite) {
156
156
 
157
157
  ---
158
158
 
159
- Don't forget to play with the grass, wind, and trees
159
+ Don't forget to play with the grass, wind, and tree
160
160
  variables to see how challenging your game can be.
161
161
 
162
162
 
@@ -192,7 +192,7 @@ namespace SpriteKind {
192
192
  export const Burnt = SpriteKind.create()
193
193
  }
194
194
  sprites.onDestroyed(SpriteKind.Fire, function (sprite) {
195
- tiles.setTileAt(tiles.locationOfSprite(sprite), assets.tile`smoulder`)
195
+ tiles.setTileAt(tiles.locationOfSprite(sprite), assets.tile`burnt tree`)
196
196
  })
197
197
  sprites.onCreated(SpriteKind.Fire, function (sprite) {
198
198
  sprite.startEffect(effects.fire)
@@ -209,7 +209,7 @@ sprites.onOverlap(SpriteKind.Water, SpriteKind.Fire, function (sprite, otherSpri
209
209
  sprite.destroy()
210
210
  sprites.change_flame_strength_by(otherSprite, -1)
211
211
  })
212
- scene.onOverlapTile(SpriteKind.Fire, assets.tile`smoulder`, function (sprite, location) {
212
+ scene.onOverlapTile(SpriteKind.Fire, assets.tile`burnt tree`, function (sprite, location) {
213
213
  sprite.destroy()
214
214
  })
215
215
  let newFire: Sprite = null
@@ -328,6 +328,7 @@ let hudBG = sprites.create(img`
328
328
  hudBG.bottom = 120
329
329
  hudBG.z = 2000
330
330
  hudBG.setFlag(SpriteFlag.Invisible, true)
331
+ hudBG.setFlag(SpriteFlag.RelativeToCamera, true)
331
332
  let statusbar2 = statusbars.create(8, 8, StatusBarKind.Magic)
332
333
  statusbar2.setLabel("Fire Danger:")
333
334
  statusbar2.setColor(7, 2)
@@ -343,7 +344,7 @@ statusbar2.setFlag(SpriteFlag.Invisible, true)
343
344
 
344
345
  game.onUpdate(function () {
345
346
  statusbar.max = tiles.tilemapRows() * tiles.tilemapColumns()
346
- statusbar.value = tiles.tilemapRows() * tiles.tilemapColumns() - tiles.getTilesByType(assets.tile`smoulder`).length
347
+ statusbar.value = tiles.tilemapRows() * tiles.tilemapColumns() - tiles.getTilesByType(assets.tile`burnt tree`).length
347
348
  spreadTimeBase = 4500 - (250 * windSpeed + 250 * dryGrass - 100 * tinder)
348
349
  if (spreadTimeBase >= 4000) {
349
350
  statusbar2.setColor(7, 2)
@@ -366,37 +367,6 @@ game.onUpdate(function () {
366
367
 
367
368
 
368
369
 
369
- namespace animation {
370
- /*
371
- * Loops the passed frames on the sprite at the given interval whenever
372
- * the specified rule is true for that sprite.
373
- *
374
- * If more than one rule applies, the most specific rule will be used.
375
- * If multiple rules are equally specific, the currently executing rule
376
- * is favored (or one is chosen at random).
377
- *
378
- * @param sprite the sprite to animate
379
- * @param frames the images that make up that animation
380
- * @param frame Interval the amount of time to spend on each frame in milliseconds
381
- * @param rule the rule that decides when this animation will play
382
- */
383
- //% blockId=arcade_character_loop_frames2
384
- //% block="animate $sprite loop frames $frames interval (ms) $frameInterval when $rule"
385
- //% sprite.defl=mySprite
386
- //% frames.defl=Fire Plane Right
387
- //% sprite.shadow=variables_get
388
- //% frames.shadow=animation_editor
389
- //% frameInterval.shadow=timePicker
390
- //% rule.shadow=arcade_character_make_rule
391
- //% weight=100
392
- //% blockGap=8
393
- //% help=github:arcade-character-animations/docs/loop-character-animation
394
- export function loopFrames2(sprite: Sprite, frames: Image[], frameInterval: number, rule: number) {
395
- characterAnimations.loopFrames(sprite, frames, frameInterval, rule);
396
- }
397
- }
398
-
399
-
400
370
  namespace game {
401
371
 
402
372
  /*
@@ -2,7 +2,7 @@
2
2
  * name: Save the Forest
3
3
  * description: The last few summers have been some of the hottest on record and the forest service needs your air team to help keep fires under control. Use blocks to code your airtanker and set up your HUDs so your ground team can help you save the forest!
4
4
  * infoUrl: skillmap/educator-info/forest-map-info
5
- * bannerUrl: /static/skillmap/forest/forest1.gif
5
+ * bannerUrl: /static/skillmap/forest/forest6.gif
6
6
  * backgroundurl: /static/skillmap/backgrounds/forest-comp.png
7
7
  * primarycolor: #b27ea3
8
8
  * secondarycolor: #ffffff
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pxt-arcade",
3
- "version": "1.7.2",
3
+ "version": "1.7.3",
4
4
  "description": "Small arcade editor for MakeCode",
5
5
  "keywords": [
6
6
  "JavaScript",
@@ -32,8 +32,8 @@
32
32
  "typescript": "^4.2.3"
33
33
  },
34
34
  "dependencies": {
35
- "pxt-common-packages": "9.2.7",
36
- "pxt-core": "7.3.2"
35
+ "pxt-common-packages": "9.3.2",
36
+ "pxt-core": "7.3.4"
37
37
  },
38
38
  "optionalDependencies": {
39
39
  "pxt-arcade-sim": "microsoft/pxt-arcade-sim.git#v0.8.7"