Skip to content

Commit

Permalink
Fixes for Forest and Bubble (#6405)
Browse files Browse the repository at this point in the history
  • Loading branch information
kiki-lee committed Apr 24, 2024
1 parent bc991d2 commit b8773ed
Show file tree
Hide file tree
Showing 6 changed files with 117 additions and 68 deletions.
4 changes: 2 additions & 2 deletions docs/test/skillmap/forest/forest2.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion docs/test/skillmap/forest/forest3.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
```

Expand Down Expand Up @@ -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)
})
Expand Down
18 changes: 8 additions & 10 deletions docs/test/skillmap/forest/forest4.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -127,14 +127,12 @@ Now that the environment is set, we can add code to make the fires spread.

---

- :circle: From ``||game:Game||``, snap <br/>

- :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.

Expand Down Expand Up @@ -165,7 +163,7 @@ Does it get out of control too quickly? Try experimenting with your variables.



## Finale
## {Finale}

👏 **Excellent!**

Expand All @@ -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`)
Expand All @@ -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)
Expand Down
22 changes: 11 additions & 11 deletions docs/test/skillmap/forest/forest5.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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`)
Expand All @@ -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)
Expand Down
43 changes: 39 additions & 4 deletions docs/test/skillmap/forest/forest6.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down Expand Up @@ -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 () {
Expand Down Expand Up @@ -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)
Expand Down
Loading

0 comments on commit b8773ed

Please sign in to comment.