pxt-arcade 1.7.3 → 1.7.4
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/target.js +69 -68
- package/built/target.json +69 -68
- package/built/targetlight.json +4 -4
- package/built/theme.json +2 -1
- package/docs/hour-of-code/educators-2021.html +366 -0
- package/docs/hour-of-code-2021.html +239 -140
- package/docs/hour-of-code.html +11 -11
- 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 +8 -8
- package/docs/skillmap/clicker-themed/clickert2.md +10 -10
- package/docs/skillmap/clicker-themed/clickert3.md +8 -8
- package/docs/skillmap/clicker-themed/clickert4.md +8 -8
- 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 +14 -14
- package/docs/skillmap/collector-themed/collectort2.md +9 -9
- package/docs/skillmap/collector-themed/collectort3.md +11 -11
- package/docs/skillmap/collector-themed/collectort4.md +11 -11
- package/docs/skillmap/collector-themed/collectort4old.md +8 -8
- package/docs/skillmap/collector-themed/collectort5.md +2 -2
- package/docs/skillmap/educator-info/forest-map-info.md +8 -8
- package/docs/skillmap/educator-info/racer-map-info.md +105 -0
- 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 +3 -67
- 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.md +2 -2
- package/docs/skillmap/interface/activity1.md +14 -14
- 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/racer.md +7 -7
- package/docs/skillmap/rockstar/rockstar1.md +32 -13
- package/docs/skillmap/rockstar/rockstar2.md +43 -25
- package/docs/skillmap/rockstar/rockstar3.md +43 -25
- 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 +62 -28
- package/docs/skillmap/space/space2.md +33 -24
- package/docs/skillmap/space/space3.md +85 -68
- package/docs/skillmap/space/space4.md +95 -64
- package/docs/skillmap/space/space4a.md +32 -24
- package/docs/skillmap/space/space5.md +77 -41
- package/docs/skillmap/space/space6.md +56 -78
- 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 +7 -7
- package/docs/skillmap/story/story2.md +11 -11
- package/docs/skillmap/story/story3.md +10 -10
- package/docs/skillmap/story/story4.md +10 -10
- 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/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/global-game-jam.png +0 -0
- package/docs/static/hour-of-code/2021/header.gif +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/microbit.png +0 -0
- package/docs/static/hour-of-code/2021/styles.css +269 -21
- package/docs/static/skillmap/assets/my-assets-three.png +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/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/hundred.md +400 -0
- package/package.json +1 -1
- package/pxtarget.json +2 -1
- 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/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
|
@@ -46,7 +46,7 @@ forever(function () {
|
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
|
|
49
|
-
## Intro @showdialog
|
|
49
|
+
## {Intro @showdialog}
|
|
50
50
|
|
|
51
51
|
Ready to give your **W,A,S,D** keys a workout?
|
|
52
52
|
|
|
@@ -56,7 +56,7 @@ Let's create a game that brings back some of the iconic arcade style that we lov
|
|
|
56
56
|
|
|
57
57
|
|
|
58
58
|
|
|
59
|
-
## Step 2
|
|
59
|
+
## {Step 2}
|
|
60
60
|
|
|
61
61
|
**🐤 This game needs a** [__*sprite*__](#sprote "a dynamic 2-D image")**. 🐤**
|
|
62
62
|
|
|
@@ -100,7 +100,7 @@ let mySprite = sprites.create(img`
|
|
|
100
100
|
|
|
101
101
|
|
|
102
102
|
|
|
103
|
-
## Step 3
|
|
103
|
+
## {Step 3}
|
|
104
104
|
|
|
105
105
|
**🤩 Fabulous 🤩**
|
|
106
106
|
|
|
@@ -147,7 +147,7 @@ controller.moveSprite(mySprite, 0, 100)
|
|
|
147
147
|
|
|
148
148
|
|
|
149
149
|
|
|
150
|
-
## Step 4
|
|
150
|
+
## {Step 4}
|
|
151
151
|
|
|
152
152
|
**💰 The sprite needs something to collect 💰**
|
|
153
153
|
|
|
@@ -191,7 +191,7 @@ forever(function () {
|
|
|
191
191
|
|
|
192
192
|
|
|
193
193
|
|
|
194
|
-
## Step 5
|
|
194
|
+
## {Step 5}
|
|
195
195
|
|
|
196
196
|
**😯 Now you have a steady stream of income 😯**
|
|
197
197
|
|
|
@@ -232,7 +232,7 @@ forever(function () {
|
|
|
232
232
|
|
|
233
233
|
|
|
234
234
|
|
|
235
|
-
## Step 6
|
|
235
|
+
## {Step 6}
|
|
236
236
|
|
|
237
237
|
**This is looking great, but the coins still hover around the top.**
|
|
238
238
|
|
|
@@ -267,12 +267,12 @@ forever(function () {
|
|
|
267
267
|
|
|
268
268
|
```
|
|
269
269
|
|
|
270
|
-
## Step 7 @showdialog
|
|
270
|
+
## {Step 7 @showdialog}
|
|
271
271
|
|
|
272
272
|
**🎮 Give your game a try in the game screen 🎮**
|
|
273
273
|
|
|
274
274
|
|
|
275
|
-
## Step 8
|
|
275
|
+
## {Step 8}
|
|
276
276
|
|
|
277
277
|
**Notice anything missing?**
|
|
278
278
|
|
|
@@ -296,7 +296,7 @@ sprites.onOverlap(SpriteKind.Player, SpriteKind.Projectile, function (sprite, ot
|
|
|
296
296
|
|
|
297
297
|
|
|
298
298
|
|
|
299
|
-
## Step 9
|
|
299
|
+
## {Step 9}
|
|
300
300
|
|
|
301
301
|
Now we have a container for code that runs when the sprite
|
|
302
302
|
overlaps a projectile.
|
|
@@ -322,7 +322,7 @@ sprites.onOverlap(SpriteKind.Player, SpriteKind.Projectile, function (sprite, ot
|
|
|
322
322
|
```
|
|
323
323
|
|
|
324
324
|
|
|
325
|
-
## Step 10
|
|
325
|
+
## {Step 10}
|
|
326
326
|
|
|
327
327
|
**🏆 Keeping score 🏆**
|
|
328
328
|
|
|
@@ -345,7 +345,7 @@ sprites.onOverlap(SpriteKind.Player, SpriteKind.Projectile, function (sprite, ot
|
|
|
345
345
|
```
|
|
346
346
|
|
|
347
347
|
|
|
348
|
-
## Step 11
|
|
348
|
+
## {Step 11}
|
|
349
349
|
|
|
350
350
|
**🎆 Congrats 🎆**
|
|
351
351
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# Design a Background
|
|
2
2
|
|
|
3
|
-
## Introduction @showdialog
|
|
3
|
+
## {Introduction @showdialog}
|
|
4
4
|
|
|
5
5
|
Let's give your hero a world to protect!
|
|
6
6
|
|
|
7
7
|

|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
## Add a background
|
|
10
|
+
## {Add a background}
|
|
11
11
|
|
|
12
12
|
**We're going to need a background image.**
|
|
13
13
|
|
|
@@ -145,7 +145,7 @@ scene.setBackgroundImage(img`
|
|
|
145
145
|
`)
|
|
146
146
|
```
|
|
147
147
|
|
|
148
|
-
## Edit the background
|
|
148
|
+
## {Edit the background}
|
|
149
149
|
|
|
150
150
|
**🖼️ Time to get creative 🖼️**
|
|
151
151
|
|
|
@@ -282,7 +282,7 @@ scene.setBackgroundImage(img`
|
|
|
282
282
|
```
|
|
283
283
|
|
|
284
284
|
|
|
285
|
-
## Play @@showdialog
|
|
285
|
+
## {Play @@showdialog}
|
|
286
286
|
|
|
287
287
|
**🎮 Play your game 🎮**
|
|
288
288
|
|
|
@@ -293,7 +293,7 @@ scene.setBackgroundImage(img`
|
|
|
293
293
|
► Feel free to return to the **Image Editor** and change it until you get it just the way you want it!
|
|
294
294
|
|
|
295
295
|
|
|
296
|
-
## Decorative sprites
|
|
296
|
+
## {Decorative sprites}
|
|
297
297
|
|
|
298
298
|
** 🐚 Add some sprites to decorate your game 🐚**
|
|
299
299
|
|
|
@@ -362,7 +362,7 @@ let mySprite2 = sprites.create(img`
|
|
|
362
362
|
|
|
363
363
|
```
|
|
364
364
|
|
|
365
|
-
## Update sprite y-position
|
|
365
|
+
## {Update sprite y-position}
|
|
366
366
|
|
|
367
367
|
**You can put your sprites wherever you want...**
|
|
368
368
|
|
|
@@ -441,7 +441,7 @@ mySprite2.setPosition(randint(5, 155), 115)
|
|
|
441
441
|
|
|
442
442
|
```
|
|
443
443
|
|
|
444
|
-
## Add More
|
|
444
|
+
## {Add More }
|
|
445
445
|
|
|
446
446
|
**You can add more decorations the same way!**
|
|
447
447
|
|
|
@@ -449,7 +449,7 @@ Just give each sprite a unique name and make sure
|
|
|
449
449
|
you select that name from the dropdown when positioning each sprite.
|
|
450
450
|
|
|
451
451
|
|
|
452
|
-
## Conclusion
|
|
452
|
+
## {Conclusion }
|
|
453
453
|
|
|
454
454
|
**🎉 Congratulations 🎉**
|
|
455
455
|
|
|
@@ -202,7 +202,7 @@ forever(function () {
|
|
|
202
202
|
```
|
|
203
203
|
|
|
204
204
|
|
|
205
|
-
## Intro @showdialog
|
|
205
|
+
## {Intro @showdialog}
|
|
206
206
|
|
|
207
207
|
You've made a collector game, now let's add some
|
|
208
208
|
special touches to make it even more fun.
|
|
@@ -211,7 +211,7 @@ special touches to make it even more fun.
|
|
|
211
211
|
|
|
212
212
|
|
|
213
213
|
|
|
214
|
-
## Step 1
|
|
214
|
+
## {Step 1}
|
|
215
215
|
|
|
216
216
|
The code for a basic collector is already in the workspace, but a few extra
|
|
217
217
|
blocks could make it amazing.
|
|
@@ -251,7 +251,7 @@ controller.moveSprite(mySprite, 0, 100)
|
|
|
251
251
|
|
|
252
252
|
|
|
253
253
|
|
|
254
|
-
## Step 2
|
|
254
|
+
## {Step 2}
|
|
255
255
|
|
|
256
256
|
**If the game gets wild, our sprite might leave the screen.**
|
|
257
257
|
Let's prevent that.
|
|
@@ -291,7 +291,7 @@ mySprite.setStayInScreen(true)
|
|
|
291
291
|
```
|
|
292
292
|
|
|
293
293
|
|
|
294
|
-
## Step 3
|
|
294
|
+
## {Step 3}
|
|
295
295
|
|
|
296
296
|
**🕔 Does this game feel long to you? 🕔**
|
|
297
297
|
|
|
@@ -332,7 +332,7 @@ info.startCountdown(15)
|
|
|
332
332
|
```
|
|
333
333
|
|
|
334
334
|
|
|
335
|
-
## Step 4
|
|
335
|
+
## {Step 4}
|
|
336
336
|
|
|
337
337
|
**🥇 Everyone's a winner 🥇**
|
|
338
338
|
|
|
@@ -355,7 +355,7 @@ info.onCountdownEnd(function () {
|
|
|
355
355
|
```
|
|
356
356
|
|
|
357
357
|
|
|
358
|
-
## Step 5
|
|
358
|
+
## {Step 5}
|
|
359
359
|
|
|
360
360
|
**🎊 Little celebrations 🎊**
|
|
361
361
|
|
|
@@ -382,7 +382,7 @@ sprites.onOverlap(SpriteKind.Player, SpriteKind.Projectile, function (sprite, ot
|
|
|
382
382
|
```
|
|
383
383
|
|
|
384
384
|
|
|
385
|
-
## Step 6
|
|
385
|
+
## {Step 6}
|
|
386
386
|
|
|
387
387
|
Finally, let's make the timing of the coins less predictable using random numbers.
|
|
388
388
|
|
|
@@ -414,7 +414,7 @@ forever(function () {
|
|
|
414
414
|
})
|
|
415
415
|
```
|
|
416
416
|
|
|
417
|
-
## Step 7
|
|
417
|
+
## {Step 7}
|
|
418
418
|
|
|
419
419
|
There you have it...a collector game with style AND class.
|
|
420
420
|
|
|
@@ -131,7 +131,7 @@ forever(function () {
|
|
|
131
131
|
```
|
|
132
132
|
|
|
133
133
|
|
|
134
|
-
## Intro @showdialog
|
|
134
|
+
## {Intro @showdialog}
|
|
135
135
|
|
|
136
136
|
Collecting things is great, but avoiding danger is more exciting.
|
|
137
137
|
|
|
@@ -141,7 +141,7 @@ This tutorial will show you how to add menacing elements to your game.
|
|
|
141
141
|
|
|
142
142
|
|
|
143
143
|
|
|
144
|
-
## Step 1
|
|
144
|
+
## {Step 1}
|
|
145
145
|
|
|
146
146
|
The code for a collector game is already in the workspace.
|
|
147
147
|
We can build on this to make something that requires extra skill.
|
|
@@ -182,7 +182,7 @@ forever(function () {
|
|
|
182
182
|
```
|
|
183
183
|
|
|
184
184
|
|
|
185
|
-
## Step 2
|
|
185
|
+
## {Step 2}
|
|
186
186
|
|
|
187
187
|
Our new enemy isn't quite ready. Let's make sure to get all the blocks
|
|
188
188
|
in the new **forever** loop pointed to the right thing.
|
|
@@ -223,7 +223,7 @@ forever(function () {
|
|
|
223
223
|
```
|
|
224
224
|
|
|
225
225
|
|
|
226
|
-
## Step 3
|
|
226
|
+
## {Step 3}
|
|
227
227
|
|
|
228
228
|
If you play your game right now, you'll see that the rocks and the coins
|
|
229
229
|
fly out at about the same rate. Let's add some variation.
|
|
@@ -263,7 +263,7 @@ forever(function () {
|
|
|
263
263
|
```
|
|
264
264
|
|
|
265
265
|
|
|
266
|
-
## Step 4
|
|
266
|
+
## {Step 4}
|
|
267
267
|
|
|
268
268
|
**😲 Uh-Oh 😲**
|
|
269
269
|
|
|
@@ -309,7 +309,7 @@ forever(function () {
|
|
|
309
309
|
})
|
|
310
310
|
```
|
|
311
311
|
|
|
312
|
-
## Step 5
|
|
312
|
+
## {Step 5}
|
|
313
313
|
|
|
314
314
|
**😈 Wicked 😈**
|
|
315
315
|
|
|
@@ -338,7 +338,7 @@ sprites.onOverlap(SpriteKind.Player, SpriteKind.Enemy, function (sprite, otherSp
|
|
|
338
338
|
```
|
|
339
339
|
|
|
340
340
|
|
|
341
|
-
## Step 6
|
|
341
|
+
## {Step 6}
|
|
342
342
|
|
|
343
343
|
At this point, the player is still awarded points when they hit a rock.
|
|
344
344
|
|
|
@@ -364,7 +364,7 @@ sprites.onOverlap(SpriteKind.Player, SpriteKind.Enemy, function (sprite, otherSp
|
|
|
364
364
|
```
|
|
365
365
|
|
|
366
366
|
|
|
367
|
-
## Step 7
|
|
367
|
+
## {Step 7}
|
|
368
368
|
|
|
369
369
|
**What an amazing creation!**
|
|
370
370
|
|
|
@@ -207,7 +207,7 @@ forever(function () {
|
|
|
207
207
|
```
|
|
208
208
|
|
|
209
209
|
|
|
210
|
-
## Introduction @showdialog
|
|
210
|
+
## {Introduction @showdialog}
|
|
211
211
|
|
|
212
212
|
Why settle for one enemy sprite when you could have two?
|
|
213
213
|
|
|
@@ -216,7 +216,7 @@ In this tutorial, we'll add more enemy options.
|
|
|
216
216
|

|
|
217
217
|
|
|
218
218
|
|
|
219
|
-
## Step 2
|
|
219
|
+
## {Step 2}
|
|
220
220
|
|
|
221
221
|
---
|
|
222
222
|
|
|
@@ -253,7 +253,7 @@ forever(function () {
|
|
|
253
253
|
```
|
|
254
254
|
|
|
255
255
|
|
|
256
|
-
## Step 2
|
|
256
|
+
## {Step 2}
|
|
257
257
|
|
|
258
258
|
Inside the ``||sprites:on created||`` block, place an ``||logic:if then else||`` statement.
|
|
259
259
|
|
|
@@ -268,7 +268,7 @@ sprites.onCreated(SpriteKind.Enemy, function (sprite) {
|
|
|
268
268
|
})
|
|
269
269
|
```
|
|
270
270
|
|
|
271
|
-
## Step 3
|
|
271
|
+
## {Step 3}
|
|
272
272
|
|
|
273
273
|
Place a ``||math:% chance||`` block as the condition inside the ``||logic:if then else||``.
|
|
274
274
|
Change the percentage ``||math:%||`` to `50`.
|
|
@@ -284,7 +284,7 @@ sprites.onCreated(SpriteKind.Enemy, function (sprite) {
|
|
|
284
284
|
})
|
|
285
285
|
```
|
|
286
286
|
|
|
287
|
-
## Step 3
|
|
287
|
+
## {Step 3}
|
|
288
288
|
|
|
289
289
|
Place a ``||sprites:set image to||`` block into the first clause of ``||logic:if then else||``.
|
|
290
290
|
Drag the ``||variables:sprite||`` variable from the ``||sprites:on created||`` block and use it as
|
|
@@ -319,7 +319,7 @@ sprites.onCreated(SpriteKind.Enemy, function (sprite) {
|
|
|
319
319
|
})
|
|
320
320
|
```
|
|
321
321
|
|
|
322
|
-
## Step 4
|
|
322
|
+
## {Step 4}
|
|
323
323
|
|
|
324
324
|
Place a second ``||sprites:set image to||`` block into the else clause of ``||logic:if then else||``.
|
|
325
325
|
Drag the ``||variables:sprite||`` variable from the ``||sprites:on created||`` block and use it as
|
|
@@ -371,7 +371,7 @@ sprites.onCreated(SpriteKind.Enemy, function (sprite) {
|
|
|
371
371
|
})
|
|
372
372
|
```
|
|
373
373
|
|
|
374
|
-
## Conclusion @showdialog
|
|
374
|
+
## {Conclusion @showdialog}
|
|
375
375
|
|
|
376
376
|
Now let's add code to destroy the enemies with your projectiles! Or, if you're feeling creative, add a background to set the scene.
|
|
377
377
|
|
|
@@ -191,7 +191,7 @@ forever(function () {
|
|
|
191
191
|
|
|
192
192
|
|
|
193
193
|
|
|
194
|
-
## Intro @showdialog
|
|
194
|
+
## {Intro @showdialog}
|
|
195
195
|
|
|
196
196
|
Ready to give your game some extra life?
|
|
197
197
|
|
|
@@ -200,7 +200,7 @@ Ready to give your game some extra life?
|
|
|
200
200
|
|
|
201
201
|
|
|
202
202
|
|
|
203
|
-
## Step 1
|
|
203
|
+
## {Step 1}
|
|
204
204
|
|
|
205
205
|
The code for a collector game is already in the workspace.
|
|
206
206
|
|
|
@@ -249,7 +249,7 @@ forever(function () {
|
|
|
249
249
|
```
|
|
250
250
|
|
|
251
251
|
|
|
252
|
-
## Step 2
|
|
252
|
+
## {Step 2}
|
|
253
253
|
|
|
254
254
|
**The extra life isn't quite ready.**
|
|
255
255
|
|
|
@@ -297,7 +297,7 @@ forever(function () {
|
|
|
297
297
|
```
|
|
298
298
|
|
|
299
299
|
|
|
300
|
-
## Step 3
|
|
300
|
+
## {Step 3}
|
|
301
301
|
|
|
302
302
|
Extra lives are supposed to be special, but they appear just as much
|
|
303
303
|
as the other two projectiles right now.
|
|
@@ -341,7 +341,7 @@ forever(function () {
|
|
|
341
341
|
|
|
342
342
|
|
|
343
343
|
|
|
344
|
-
## Step 4
|
|
344
|
+
## {Step 4}
|
|
345
345
|
|
|
346
346
|
**Play through your game once or twice. Notice anything wrong?**
|
|
347
347
|
|
|
@@ -369,7 +369,7 @@ sprites.onOverlap(SpriteKind.Player, SpriteKind.Food, function (sprite, otherSpr
|
|
|
369
369
|
```
|
|
370
370
|
|
|
371
371
|
|
|
372
|
-
## Step 6
|
|
372
|
+
## {Step 6}
|
|
373
373
|
|
|
374
374
|
The extra life is still **subtracting** a life when collected.
|
|
375
375
|
|
|
@@ -401,7 +401,7 @@ sprites.onOverlap(SpriteKind.Player, SpriteKind.Food, function (sprite, otherSpr
|
|
|
401
401
|
|
|
402
402
|
|
|
403
403
|
|
|
404
|
-
## Step 7
|
|
404
|
+
## {Step 7}
|
|
405
405
|
|
|
406
406
|
► The new **mySprite say** block is pointed toward the wrong sprite. To fix that,
|
|
407
407
|
drag the ``||variables:otherSprite||`` argument out of the header of the
|
|
@@ -422,7 +422,7 @@ sprites.onOverlap(SpriteKind.Player, SpriteKind.Food, function (sprite, otherSpr
|
|
|
422
422
|
|
|
423
423
|
```
|
|
424
424
|
|
|
425
|
-
## Step 8
|
|
425
|
+
## {Step 8}
|
|
426
426
|
|
|
427
427
|
|
|
428
428
|
**There you go!**
|
|
@@ -472,7 +472,7 @@ forever(function () {
|
|
|
472
472
|
|
|
473
473
|
```
|
|
474
474
|
|
|
475
|
-
## Intro @showdialog
|
|
475
|
+
## {Intro @showdialog}
|
|
476
476
|
|
|
477
477
|
You've learned everything you know to make an exciting collector game. Now put it all together to create something that's all your own!
|
|
478
478
|
|
|
@@ -481,7 +481,7 @@ You've learned everything you know to make an exciting collector game. Now put
|
|
|
481
481
|
|
|
482
482
|
|
|
483
483
|
|
|
484
|
-
## Step 1
|
|
484
|
+
## {Step 1}
|
|
485
485
|
|
|
486
486
|
The code for a collector game is already in the workspace.
|
|
487
487
|
|
|
@@ -26,7 +26,7 @@ forever(function () {
|
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
## Intro @showdialog
|
|
29
|
+
## {Intro @showdialog}
|
|
30
30
|
|
|
31
31
|
Ready to test your agility?
|
|
32
32
|
|
|
@@ -36,7 +36,7 @@ Let's create a game where Mama Dino needs to get to her hoard of babies!
|
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
## Step 2
|
|
39
|
+
## {Step 2}
|
|
40
40
|
|
|
41
41
|
**🦖 This game needs a** [__*sprite*__](#sprote "a dynamic 2-D image") 🦖
|
|
42
42
|
|
|
@@ -63,7 +63,7 @@ let mySprite = sprites.create(assets.image`Mama`, SpriteKind.Player)
|
|
|
63
63
|
|
|
64
64
|
|
|
65
65
|
|
|
66
|
-
## Step 3
|
|
66
|
+
## {Step 3}
|
|
67
67
|
|
|
68
68
|
**🤩 Fabulous 🤩**
|
|
69
69
|
|
|
@@ -90,14 +90,14 @@ controller.moveSprite(mySprite, 0, 100)
|
|
|
90
90
|
```
|
|
91
91
|
|
|
92
92
|
|
|
93
|
-
## Step 4
|
|
93
|
+
## {Step 4}
|
|
94
94
|
|
|
95
95
|
**🎮 Try your project using the game screen 🎮**
|
|
96
96
|
|
|
97
97
|
Make sure your ``||sprites:Player||`` moves up and down with the joypad, arrow keys, or **W** and **S** keys.
|
|
98
98
|
|
|
99
99
|
|
|
100
|
-
## Step 5
|
|
100
|
+
## {Step 5}
|
|
101
101
|
|
|
102
102
|
**Did you notice your sprite can disappear?**
|
|
103
103
|
|
|
@@ -120,7 +120,7 @@ mySprite.setStayInScreen(true)
|
|
|
120
120
|
|
|
121
121
|
|
|
122
122
|
|
|
123
|
-
## Step 6
|
|
123
|
+
## {Step 6}
|
|
124
124
|
|
|
125
125
|
**🖼️ Let's set the scene 🖼️**
|
|
126
126
|
|
|
@@ -143,7 +143,7 @@ mySprite.setStayInScreen(true)
|
|
|
143
143
|
```
|
|
144
144
|
|
|
145
145
|
|
|
146
|
-
## Step 7
|
|
146
|
+
## {Step 7}
|
|
147
147
|
|
|
148
148
|
**🛣️ Add movement to the scene 🛣️**
|
|
149
149
|
|
|
@@ -168,7 +168,7 @@ scroller.scrollBackgroundWithSpeed(-50, 0)
|
|
|
168
168
|
|
|
169
169
|
|
|
170
170
|
|
|
171
|
-
## Step 8
|
|
171
|
+
## {Step 8}
|
|
172
172
|
|
|
173
173
|
**🎮 Take a look at the game screen 🎮**
|
|
174
174
|
|
|
@@ -176,7 +176,7 @@ Your background should move right-to-left across the screen on its own, and you
|
|
|
176
176
|
|
|
177
177
|
|
|
178
178
|
|
|
179
|
-
## Step 9
|
|
179
|
+
## {Step 9}
|
|
180
180
|
|
|
181
181
|
**The sprite needs something to collect!**
|
|
182
182
|
Let's add some baby dinos for the momma dinosaur to rescue 💚
|
|
@@ -201,7 +201,7 @@ forever(function () {
|
|
|
201
201
|
|
|
202
202
|
```
|
|
203
203
|
|
|
204
|
-
## Step 10
|
|
204
|
+
## {Step 10}
|
|
205
205
|
|
|
206
206
|
► To make the babies look like they're walking along the road, change
|
|
207
207
|
[__*vx*__](#whatVX "horizontal velocity") (or horizontal speed) to **-90**.
|
|
@@ -219,7 +219,7 @@ forever(function () {
|
|
|
219
219
|
|
|
220
220
|
|
|
221
221
|
|
|
222
|
-
## Step 11
|
|
222
|
+
## {Step 11}
|
|
223
223
|
|
|
224
224
|
**😲 They're flying 😲**
|
|
225
225
|
|
|
@@ -246,7 +246,7 @@ forever(function () {
|
|
|
246
246
|
```
|
|
247
247
|
|
|
248
248
|
|
|
249
|
-
## Step 12
|
|
249
|
+
## {Step 12}
|
|
250
250
|
|
|
251
251
|
**This is looking great, but they still hover around the top.**
|
|
252
252
|
|
|
@@ -266,7 +266,7 @@ forever(function () {
|
|
|
266
266
|
|
|
267
267
|
|
|
268
268
|
|
|
269
|
-
## Step 13
|
|
269
|
+
## {Step 13}
|
|
270
270
|
|
|
271
271
|
► Keep the babies from running out at the speed of light by
|
|
272
272
|
adding a ``||loops:pause [100] ms||`` block (from the ``||loops:Loops||``
|
|
@@ -286,7 +286,7 @@ forever(function () {
|
|
|
286
286
|
|
|
287
287
|
|
|
288
288
|
|
|
289
|
-
## Step 11
|
|
289
|
+
## {Step 11}
|
|
290
290
|
|
|
291
291
|
**🎆 Congrats 🎆**
|
|
292
292
|
|
|
@@ -48,7 +48,7 @@ forever(function () {
|
|
|
48
48
|
```
|
|
49
49
|
|
|
50
50
|
|
|
51
|
-
## Intro @showdialog
|
|
51
|
+
## {Intro @showdialog}
|
|
52
52
|
|
|
53
53
|
The start of a collector game is in your workspace. Let's take it even further by adding points when you collect baby dinos!
|
|
54
54
|
|
|
@@ -58,12 +58,12 @@ The start of a collector game is in your workspace. Let's take it even further b
|
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
|
|
61
|
-
## Step 2
|
|
61
|
+
## {Step 2}
|
|
62
62
|
|
|
63
63
|
**🎮 Play the game in the workspace before you begin 🎮**
|
|
64
64
|
|
|
65
65
|
|
|
66
|
-
## Step 3
|
|
66
|
+
## {Step 3}
|
|
67
67
|
|
|
68
68
|
**We're off to a great start!!**
|
|
69
69
|
Let's add some code that tells the game what to do when the mom reaches her baby.
|
|
@@ -85,7 +85,7 @@ sprites.onOverlap(SpriteKind.Player, SpriteKind.Projectile, function (sprite, ot
|
|
|
85
85
|
|
|
86
86
|
|
|
87
87
|
|
|
88
|
-
## Step 4
|
|
88
|
+
## {Step 4}
|
|
89
89
|
|
|
90
90
|
Now we have a container for code that runs when Mama Dino overlaps the babies.
|
|
91
91
|
**Let's add a block to remove the babies from the play area when you catch them.**
|
|
@@ -115,7 +115,7 @@ sprites.onOverlap(SpriteKind.Player, SpriteKind.Projectile, function (sprite, ot
|
|
|
115
115
|

|
|
116
116
|
|
|
117
117
|
|
|
118
|
-
## Step 5
|
|
118
|
+
## {Step 5}
|
|
119
119
|
|
|
120
120
|
**🏆 Keeping score 🏆**
|
|
121
121
|
|
|
@@ -138,7 +138,7 @@ sprites.onOverlap(SpriteKind.Player, SpriteKind.Projectile, function (sprite, ot
|
|
|
138
138
|
```
|
|
139
139
|
|
|
140
140
|
|
|
141
|
-
## Step 6
|
|
141
|
+
## {Step 6}
|
|
142
142
|
|
|
143
143
|
**🎮 Now try it out on the game screen 🎮**
|
|
144
144
|
|
|
@@ -174,7 +174,7 @@ forever(function () {
|
|
|
174
174
|
|
|
175
175
|
|
|
176
176
|
|
|
177
|
-
## Step 7
|
|
177
|
+
## {Step 7}
|
|
178
178
|
|
|
179
179
|
**🕔 Does this game feel long to you? 🕔**
|
|
180
180
|
|
|
@@ -199,7 +199,7 @@ info.startCountdown(15)
|
|
|
199
199
|
```
|
|
200
200
|
|
|
201
201
|
|
|
202
|
-
## Step 8
|
|
202
|
+
## {Step 8}
|
|
203
203
|
|
|
204
204
|
**🥇 Everyone's a winner 🥇**
|
|
205
205
|
|
|
@@ -223,7 +223,7 @@ info.onCountdownEnd(function () {
|
|
|
223
223
|
|
|
224
224
|
|
|
225
225
|
|
|
226
|
-
## Step 9
|
|
226
|
+
## {Step 9}
|
|
227
227
|
|
|
228
228
|
**🏆 Now play your winning creation 🏆**
|
|
229
229
|
|