diff --git a/docs/test/skillmap/forest/forest2.md b/docs/test/skillmap/forest/forest2.md index 94892b972d9..d6629f5a8f4 100644 --- a/docs/test/skillmap/forest/forest2.md +++ b/docs/test/skillmap/forest/forest2.md @@ -83,7 +83,7 @@ hint~ #### ~ tutorialhint ```blocks -myPlane = sprites.create(assets.image`Fire Plane Right`, SpriteKind.Player) +myPlane = sprites.create(forest_imgs.Fire_Plane_2_Right, SpriteKind.Player) controller.moveSprite(myPlane) scene.cameraFollowSprite(myPlane) //@highlight @@ -127,7 +127,7 @@ hint~ ```blocks -myPlane = sprites.create(assets.image`Fire Plane Right`, SpriteKind.Player) +myPlane = sprites.create(forest_imgs.Fire_Plane_2_Right, SpriteKind.Player) controller.moveSprite(myPlane) scene.cameraFollowSprite(myPlane) diff --git a/docs/test/skillmap/forest/forest3.md b/docs/test/skillmap/forest/forest3.md index 88e706ad785..db59a698805 100644 --- a/docs/test/skillmap/forest/forest3.md +++ b/docs/test/skillmap/forest/forest3.md @@ -57,7 +57,7 @@ into **an empty area** of your workspace. #### ~ tutorialhint ```blocks controller.A.onEvent(ControllerButtonEvent.Repeated, function () { - sprites.spray(myPlane, assets.image`water`) + sprites.spray(myPlane, forest_imgs.Fire_Plane_2_Right) }) ``` @@ -216,6 +216,7 @@ keep moving through the skillmap so you can see how to make your fires spread. let myPlane = sprites.create(forest_imgs.Fire_Plane_2_Right, SpriteKind.Player) controller.moveSprite(myPlane) scene.cameraFollowSprite(myPlane) +sprites.spray(myPlane, forest_imgs.water) controller.A.onEvent(ControllerButtonEvent.Repeated, function () { sprites.spray(myPlane, forest_imgs.water) }) diff --git a/docs/test/skillmap/forest/forest4.md b/docs/test/skillmap/forest/forest4.md index 01faaf7e7b1..0c8f56ba23e 100644 --- a/docs/test/skillmap/forest/forest4.md +++ b/docs/test/skillmap/forest/forest4.md @@ -59,7 +59,7 @@ container that's already in the workspace. //@highlight game.set_health_of_trees(7) tiles.setTilemap(tilemap`level1`) -let myPlane = sprites.create(assets.image`Fire Plane Right`, SpriteKind.Player) +let myPlane = sprites.create(forest_imgs.Fire_Plane_2_Right, SpriteKind.Player) controller.moveSprite(myPlane) scene.cameraFollowSprite(myPlane) @@ -109,7 +109,7 @@ game.set_health_of_trees(7) game.set_strength_of_wind(3) game.set_dryness_of_grass(3) tiles.setTilemap(tilemap`level1`) -let myPlane = sprites.create(assets.image`Fire Plane Right`, SpriteKind.Player) +let myPlane = sprites.create(forest_imgs.Fire_Plane_2_Right, SpriteKind.Player) controller.moveSprite(myPlane) scene.cameraFollowSprite(myPlane) @@ -127,14 +127,12 @@ Now that the environment is set, we can add code to make the fires spread. --- -- :circle: From ``||game:Game||``, snap
- +- :circle: From ``||game:Game||``, snap ```blocks game.onUpdate(function () { sprites.random_spread() }) ``` - into an **empty area** of your workspace to run each time the game updates. @@ -165,7 +163,7 @@ Does it get out of control too quickly? Try experimenting with your variables. -## Finale +## {Finale} 👏 **Excellent!** @@ -178,11 +176,11 @@ keep moving through the skillmap to find out how to add a heads-up display to yo ```blockconfig.global -let myPlane = sprites.create(img`.`, SpriteKind.Player) +let myPlane = sprites.create(forest_imgs.Fire_Plane_2_Right, SpriteKind.Player) controller.moveSprite(myPlane) scene.cameraFollowSprite(myPlane) controller.A.onEvent(ControllerButtonEvent.Repeated, function () { - sprites.spray(myPlane, img`.`) + sprites.spray(myPlane, forest_imgs.water) }) tiles.setTileAt(location, assets.tile`transparency16`) @@ -205,10 +203,10 @@ game.onUpdate(function () { ```template controller.A.onEvent(ControllerButtonEvent.Repeated, function () { - sprites.spray(myPlane, assets.image`water`) + sprites.spray(myPlane, forest_imgs.water) }) -let myPlane = sprites.create(assets.image`Fire Plane Right`, SpriteKind.Player) +let myPlane = sprites.create(forest_imgs.Fire_Plane_2_Right, SpriteKind.Player) controller.moveSprite(myPlane) scene.cameraFollowSprite(myPlane) diff --git a/docs/test/skillmap/forest/forest5.md b/docs/test/skillmap/forest/forest5.md index f4fcef149b1..644b0f4e202 100644 --- a/docs/test/skillmap/forest/forest5.md +++ b/docs/test/skillmap/forest/forest5.md @@ -52,7 +52,7 @@ game.set_health_of_trees(7) game.set_strength_of_wind(3) game.set_dryness_of_grass(3) tiles.setTilemap(tilemap`level1`) -let myPlane = sprites.create(assets.image`Fire Plane Right`, SpriteKind.Player) +let myPlane = sprites.create(forest_imgs.Fire_Plane_2_Right, SpriteKind.Player) controller.moveSprite(myPlane) scene.cameraFollowSprite(myPlane) @@ -102,7 +102,7 @@ game.set_health_of_trees(7) game.set_strength_of_wind(3) game.set_dryness_of_grass(3) tiles.setTilemap(tilemap`level1`) -let myPlane = sprites.create(assets.image`Fire Plane Right`, SpriteKind.Player) +let myPlane = sprites.create(forest_imgs.Fire_Plane_2_Right, SpriteKind.Player) controller.moveSprite(myPlane) scene.cameraFollowSprite(myPlane) @@ -143,7 +143,7 @@ game.set_health_of_trees(7) game.set_strength_of_wind(3) game.set_dryness_of_grass(3) tiles.setTilemap(tilemap`level1`) -let myPlane = sprites.create(assets.image`Fire Plane Right`, SpriteKind.Player) +let myPlane = sprites.create(forest_imgs.Fire_Plane_2_Right, SpriteKind.Player) controller.moveSprite(myPlane) scene.cameraFollowSprite(myPlane) @@ -188,7 +188,7 @@ game.set_health_of_trees(7) game.set_strength_of_wind(3) game.set_dryness_of_grass(3) tiles.setTilemap(tilemap`level1`) -let myPlane = sprites.create(assets.image`Fire Plane Right`, SpriteKind.Player) +let myPlane = sprites.create(forest_imgs.Fire_Plane_2_Right, SpriteKind.Player) controller.moveSprite(myPlane) scene.cameraFollowSprite(myPlane) @@ -235,7 +235,7 @@ and head back out to the skillmap to share it with friends or save it in your ga ```blockconfig.global -let myPlane = sprites.create(assets.image`Fire Plane Right`, SpriteKind.Player) +let myPlane = sprites.create(forest_imgs.Fire_Plane_2_Right, SpriteKind.Player) controller.moveSprite(myPlane) scene.cameraFollowSprite(myPlane) @@ -250,13 +250,13 @@ pxt-arcade-forest-fire=github:microsoft/arcade-forest-fire ```template controller.A.onEvent(ControllerButtonEvent.Repeated, function () { - sprites.spray(myPlane, assets.image`water`) + sprites.spray(myPlane, forest_imgs.water) }) game.set_health_of_trees(7) game.set_strength_of_wind(3) game.set_dryness_of_grass(3) -let myPlane = sprites.create(assets.image`Fire Plane Right`, SpriteKind.Player) +let myPlane = sprites.create(forest_imgs.Fire_Plane_2_Right, SpriteKind.Player) controller.moveSprite(myPlane) scene.cameraFollowSprite(myPlane) @@ -297,11 +297,11 @@ hud.fire_hud_label ("Nope:") ```blockconfig.global -let myPlane = sprites.create(img`.`, SpriteKind.Player) +let myPlane = sprites.create(forest_imgs.Fire_Plane_2_Right, SpriteKind.Player) controller.moveSprite(myPlane) scene.cameraFollowSprite(myPlane) controller.A.onEvent(ControllerButtonEvent.Repeated, function () { - sprites.spray(myPlane, img`.`) + sprites.spray(myPlane, forest_imgs.water) }) tiles.setTileAt(location, assets.tile`transparency16`) @@ -324,13 +324,13 @@ game.onUpdate(function () { ```template controller.A.onEvent(ControllerButtonEvent.Repeated, function () { - sprites.spray(myPlane, assets.image`water`) + sprites.spray(myPlane, forest_imgs.water) }) game.set_health_of_trees(7) game.set_strength_of_wind(3) game.set_dryness_of_grass(3) -let myPlane = sprites.create(assets.image`Fire Plane Right`, SpriteKind.Player) +let myPlane = sprites.create(forest_imgs.Fire_Plane_2_Right, SpriteKind.Player) controller.moveSprite(myPlane) scene.cameraFollowSprite(myPlane) diff --git a/docs/test/skillmap/forest/forest6.md b/docs/test/skillmap/forest/forest6.md index e26985ef5b7..2e051bdb9a4 100644 --- a/docs/test/skillmap/forest/forest6.md +++ b/docs/test/skillmap/forest/forest6.md @@ -31,10 +31,45 @@ it flips around as it goes back and forth. - :game: From ``||controller:Controller||``, grab ```blocks +controller.left.onEvent(ControllerButtonEvent.Pressed, function () { controller.left.onEvent(ControllerButtonEvent.Pressed, function () { animation.runImageAnimation( myPlane, - [img`.`], + [img` + ........................ + ........................ + ....ffffff.............. + ....f9bbbbf.........8f.. + .....ffbbbbff......88f.. + .....8ffff888ff...88bf.. + ..ffffbbbbbb8888888bbf.. + ffbb1bbbbbbbbbbbb888888f + fbbbbddd99bbbbbbbbbfffff + .f8bbbbbbbbb88bbbbf..... + ..ff8888888bf88bbbbf.... + ....ffffffffff88bbbbb... + ........cf.cf.f98888b... + ...............ffffff... + ........................ + ........................ + `,img` + ........................ + ........................ + ........................ + ....ffffff..........8f.. + ....f9bbbbff.......88f.. + .....8fffffff.....88bf.. + ..ffffbbbbbbff88888bbf.. + ffbbbd9999bbbbbbb888888f + fbbbbbbbbbbbbbbbbbbfffff + .f8bbbbbbbbb888bbbbf.... + ..ff8888888bf888bbbbb... + ....fffffffffff98888b... + ........cf.cf..ffffff... + ........................ + ........................ + ........................ + `], 100, true ) @@ -301,7 +336,7 @@ and head back out to the skillmap to share with friends and save your game in yo ```blockconfig.global -let myPlane = sprites.create(assets.image`Fire Plane Right`, SpriteKind.Player) +let myPlane = sprites.create(forest_imgs.Fire_Plane_2_Right, SpriteKind.Player) controller.moveSprite(myPlane) scene.cameraFollowSprite(myPlane) controller.left.onEvent(ControllerButtonEvent.Pressed, function () { @@ -353,14 +388,14 @@ music.thump.play() ```template controller.A.onEvent(ControllerButtonEvent.Repeated, function () { - sprites.spray(myPlane, assets.image`water`) + sprites.spray(myPlane, forest_imgs.Fire_Plane_2_Right) }) game.set_health_of_trees(7) game.set_strength_of_wind(3) game.set_dryness_of_grass(3) -let myPlane = sprites.create(assets.image`Fire Plane Right`, SpriteKind.Player) +let myPlane = sprites.create(forest_imgs.Fire_Plane_2_Right, SpriteKind.Player) controller.moveSprite(myPlane) scene.cameraFollowSprite(myPlane) diff --git a/docs/test/tutorials/bubbles.md b/docs/test/tutorials/bubbles.md index d09d8e43e14..44b554ced03 100644 --- a/docs/test/tutorials/bubbles.md +++ b/docs/test/tutorials/bubbles.md @@ -4,7 +4,7 @@ ## Intro @showdialog -Are you ready to have an adventure with Joy and the rest of the emotions from Inside Out 2? Click **Next** to make your own game! +Are you ready to try something new with Joy and the rest of the emotions from Inside Out 2? Click **Next** to make your own game! ![Play Bubble Stacking with Joy](/static/tutorials/bubbles/io2_title.png "How many memories can you store?") @@ -222,10 +222,7 @@ You should be able to aim your bubble further to the right. #### ~ tutorialhint ```blocks -bubble.createBoard() -bubble.load_bubble() -let mySprite = sprites.create(io2_images.joy, SpriteKind.Player) -mySprite.top = 102 + //@highlight controller.right.onEvent(ControllerButtonEvent.Repeated, function () { bubble.tilt_angle(bubble.Choice.Right) @@ -248,13 +245,7 @@ You should now be able to aim your bubble further to the left. #### ~ tutorialhint ```blocks -bubble.createBoard() -bubble.load_bubble() -let mySprite = sprites.create(io2_images.joy, SpriteKind.Player) -mySprite.top = 102 -controller.right.onEvent(ControllerButtonEvent.Repeated, function () { - bubble.tilt_angle(bubble.Choice.Right) -}) + //@highlight controller.left.onEvent(ControllerButtonEvent.Repeated, function () { bubble.tilt_angle(bubble.Choice.Left) @@ -298,58 +289,72 @@ You should be able to toss a bubble in the direction it's aimed when you press e Give it a try! -💡 _ Notice that your bubble doesn't properly stick where it hits, yet. There's also no option to throw another bubble. We'll fix both of those things in the steps that follow._ +💡 _Notice that your bubble doesn't properly stick where it hits, yet. There's also no option to throw another bubble. We'll fix both of those things in the steps that follow._ +```blockconfig.local +controller.A.onEvent(ControllerButtonEvent.Pressed, function () { + bubble.tossBubble() +}) +``` -## {12. Need a Refill?} -**Let's load a new bubble every time we toss the old one.** ---- +## {12. Connecting Bubbles} -- :dot circle: Open the ``||bubble: Bubble||`` category **in the toolbox** and grab
-``||bubble:load new bubble||``
-then snap it inside at **the end of** the
-``||controller(noclick):on [A] button [pressed]||``
-block already in the workspace. +**Time to make the memories stick!** +We want the bubbles to stick whenever they connect to the top wall or to another bubble. + +--- + +- :tree: Open the ``||scene: Scene||`` category and grab the
+``||scene:on [sprite] of kind [Bubble] ...||``
+bundle and drop it into **an empty** area of the workspace.
```blockconfig.local controller.A.onEvent(ControllerButtonEvent.Pressed, function () { bubble.tossBubble() - bubble.load_bubble() }) ``` - - #### ~ tutorialhint ```blocks - -controller.A.onEvent(ControllerButtonEvent.Pressed, function () { - bubble.tossBubble() - //@highlight - bubble.load_bubble() +//@highlight +scene.onHitWall(SpriteKind.Bubble, function (sprite, location) { + bubble.stick_to_wall(sprite, location) }) ``` -## {13. Connecting Bubbles} +## {13. Check Your Screen!} + + +- :binoculars: Take a shot in the game window! + +When your bubble hits a grouping at the top, it should stick! If that grouping has three or more of the same color, you should also get points as they pop. + + + -**Time to make the memories stick!** -We want the bubbles to stick whenever they connect to the top wall or to another bubble. + +## {14. Need a Refill?} + +**Let's load a new bubble every time we toss the old one.** --- -- :tree: Open the ``||scene: Scene||`` category and grab the
-``||scene:on [sprite] of kind [Bubble] ...||``
-bundle and drop it into **an empty** area of the workspace.
+- :dot circle: Open the ``||bubble: Bubble||`` category **in the toolbox** and grab
+``||bubble:load new bubble||``
+then snap it inside at **the end of** the
+``||controller(noclick):on [A] button [pressed]||``
+container already in the workspace. + ```blockconfig.local @@ -357,23 +362,27 @@ controller.A.onEvent(ControllerButtonEvent.Pressed, function () { bubble.tossBubble() bubble.load_bubble() }) - ``` + #### ~ tutorialhint ```blocks -//@highlight -scene.onHitWall(SpriteKind.Bubble, function (sprite, location) { - bubble.stick_to_wall(sprite, location) + +controller.A.onEvent(ControllerButtonEvent.Pressed, function () { + bubble.tossBubble() + //@highlight + bubble.load_bubble() }) ``` -## {18. Test It} + + +## {15. Test It} - :binoculars: **Time to play your finished game!** @@ -396,6 +405,12 @@ Feel like going above and beyond? There are enough blocks in the toolbox to make hint~ +```blockconfig.local +controller.A.onEvent(ControllerButtonEvent.Pressed, function () { + bubble.tossBubble() + bubble.load_bubble() +}) +```