diff --git a/docs/tutorials/turkey-jr.md b/docs/tutorials/turkey-jr.md new file mode 100755 index 00000000000..30e61dd00be --- /dev/null +++ b/docs/tutorials/turkey-jr.md @@ -0,0 +1,523 @@ +# Move the Turkey +### @explicitHints true +### @flyoutOnly true + +## Welcome @showdialog + +Happy **Turkey Day!** + +Let's make a game where you need to save the turkeys. + +![An anigif of the game we're about to build](/static/skillmap/turkey/turkey1.gif "Look what we're about to do today!") + +Click "Ok" to get started. + + + + +## {2. We need a HERO} + +Add the turkey to your code. + +```block + turkey.addTurkey() +``` + +--- + +![Add the new block to the workspace](/static/skillmap/turkey/jr2.gif) + + +#### ~ tutorialhint +```blocks +turkey.onStartSimple(function () { + //@highlight +turkey.addTurkey() +}) +``` + + + + + + + + +## {3. Try It} + + +- :binoculars: Test your project in the game window! + +Your turkey should move left and right with the arrows, but won't jump. + +![Look for the game window in the lower right](/static/skillmap/turkey/lr.gif) + + + + +## {4. Add Jumping} + +Add this! + +```blocks +turkey.onA(function () { + turkey.turkeyJump() +}) +``` + +--- + +![Add the new block to the workspace](/static/skillmap/turkey/jr4.gif) + + +#### ~ tutorialhint + +```blocks +turkey.onStartSimple(function () { +turkey.addTurkey() +}) + +//@highlight +turkey.onA(function () { + turkey.turkeyJump() +}) +``` + + + + +## {5. Try It} + + +- :binoculars: Now the turkey should jump when you press the (A) button! + +![Try the A button](/static/skillmap/turkey/a.gif) + + + + + + +## {6. Get Cages} + +Add this: +```blocks +turkey.turkeyOverlapCage(function () { + turkey.changeScoreOverride(1) +}) +``` + +--- + +![Add the new block to the workspace](/static/skillmap/turkey/jr6.gif) + + +#### ~ tutorialhint + +```blocks +turkey.onStartSimple(function () { +turkey.addTurkey() +}) + +turkey.onA(function () { + turkey.turkeyJump() +}) + +//@highlight +turkey.turkeyOverlapCage(function () { + turkey.changeScoreOverride(1) +}) +``` + + + + +## {7. Look Again} + +- :binoculars: Now you get points when the turkey overlaps a cage! + + +![Overlap a cage](/static/skillmap/turkey/cage.gif) + + + + +## {8. Free the Turkey} + +Add this block: +```block + turkey.freeTurkey() +``` + +to + +```blocks +turkey.turkeyOverlapCage(function () { + turkey.changeScoreOverride(1) +}) +``` + +--- + + +![Add the new block to the workspace](/static/skillmap/turkey/jr8.gif) + + +#### ~ tutorialhint + +```blocks + +turkey.onStartSimple(function () { +turkey.addTurkey() +}) + +turkey.onA(function () { + turkey.turkeyJump() +}) + +turkey.turkeyOverlapCage(function () { + turkey.changeScoreOverride(1) +//@highlight + turkey.freeTurkey() +}) +``` + + + +## {9. Play} + +- :binoculars: Now you'll free a turkey when you touch each cage. + + +![Add the new block to the workspace](/static/skillmap/turkey/free.gif) + + + +## {10. Free the Turkey} + +Add a way to win: +```blocks +turkey.onCages(15, function () { + turkey.turkeyWin() +}) +``` + +--- + +![Add the new block to the workspace](/static/skillmap/turkey/jr10.gif) + + +#### ~ tutorialhint + +```blocks + +turkey.onStartSimple(function () { +turkey.addTurkey() +}) + +turkey.onA(function () { + turkey.turkeyJump() +}) + +turkey.turkeyOverlapCage(function () { + turkey.changeScoreOverride(1) + turkey.freeTurkey() +}) + +//@highlight +turkey.onCages(15, function () { + turkey.turkeyWin() +}) +``` + + +## {11. Play} + +- :binoculars: You should win the game when you free 15 turkeys! + +![Add the new block to the workspace](/static/skillmap/turkey/win.gif) + + + +## {Finale} + +When you're finished playing your game, click **Done** +to share with friends and family! + + + + + +```blockconfig.global + +turkey.onA(function () { + turkey.turkeyJump() +}) + +turkey.onCages(15, function () { + turkey.turkeyWin() +}) + +turkey.turkeyOverlapCage(function () { + turkey.changeScoreOverride(1) +}) + +``` + +```package +turkey_imgs=github:kiki-lee/turkey_imgs +carnival=github:microsoft/arcade-carnival#v0.0.7 +arcade-block-icons=github:kiki-lee/arcade-block-icons + +``` + +```template + +turkey.onStartSimple(function () { + +}) + +``` + + +```ghost + turkey.turkeyTimer() + turkey.freeTurkey() +``` + + +```customts +scene.setBackgroundColor(9) +tiles.setTilemap(turkey_imgs.level1) +namespace SpriteKind { + //% isKind + export const Rescued = SpriteKind.create() +} + + +//% color=#4c5857 +//% icon="\uf52d" +//% blockGap=8 block="Turkey" +//% weight=99 +namespace turkey { + + export let cageLocation: tiles.Location; + export let freeTurkeys: Sprite = null + export let bigTurkey: Sprite = null + export let scoreText = textsprite.create("", 0, 14) + scoreText.setFlag(SpriteFlag.RelativeToCamera, true) + + + + + /** + * Run code when the play button is pressed + * (Like on start, but jr) + */ + //% color=#093330 + //% help=game/on-start-simple + //% weight=1000 + //% afterOnStart=false + //% blockId=on_start_simple + //% block="on `ICON.play`" + //% blockAllowMultiple=0 + export function onStartSimple(a: () => void): void { + a(); + } + + + + + /** + * Make the turkey appear to jump + */ + //% blockId=turkey_jump + //% weight=900 + //% block="`ICON.turkey-right` jump" + //% help=github:docs/turkey_jump + export function turkeyJump() { + bigTurkey.vy = -300 + } + + /** + * Make the turkey appear to jump + */ + //% blockId=free_turkey + //% weight=300 + //% block="free `ICON.turkey-cage`" + //% help=github:docs/free_turkey + export function freeTurkey() { + tiles.setTileAt(cageLocation, assets.tile`transparency17`) + turkey.freeTurkeys = sprites.create(turkey_imgs.lil, SpriteKind.Rescued) + tiles.placeOnTile(turkey.freeTurkeys, cageLocation) + turkey.freeTurkeys.follow(turkey.bigTurkey) + } + + /** + * Add the turkey and mechanics to the game + */ + //% blockId=add_turkey + //% block="add `ICON.turkey-right`" + //% help=github:docs/add_turkey + export function addTurkey() { + bigTurkey = sprites.create(turkey_imgs.player, SpriteKind.Player) + controller.moveSprite(bigTurkey, 100, 0) + bigTurkey.ay = 500 + scene.cameraFollowSprite(bigTurkey) + tiles.placeOnRandomTile(bigTurkey, assets.tile`start`) + } + + /** + * Start the game timer + */ + //% blockId=turkey_timer + //% block="start `ICON.clock-white`" + //% help=github:docs/turkey_timer + export function turkeyTimer() { + carnival.startTimer() + } + + + + /** + * Special lose sequence + */ + //% blockId=set_turkey_lose + //% block="game over `ICON.frown-open-white`" + //% group="Game" + //% help=github:docs/set_turkey_lose + export function turkeyLoss() { + game.setGameOverPlayable(false, music.createSoundEffect(WaveShape.Noise, 4173, 1026, 100, 0, 800, SoundExpressionEffect.Warble, InterpolationCurve.Curve), false) + game.gameOver(false) + } + + + /** + * Special win sequence + */ + //% blockId=set_turkey_win + //% block="game over `ICON.smile-beam-white`" + //% help=github:docs/set_turkey_win + export function turkeyWin() { + //carnival.onGameOverExpanded(carnival.WinTypes.Timed) + + let secs = Math.floor(carnival.getTimerValue() / 1000) + carnival.customGameOverExpanded("15 cages in " + secs + " seconds!", effects.confetti, music.powerUp, carnival.ScoreTypes.LTime) + + } + + /** + * Register code run when a controller event occurs + * @param event + * @param handler + */ + //% weight=99 blockGap=8 + //% blockId=ctrlonA block="on `ICON.a-button-white-invert`" + //% color=#093330 + //% help=docs/on-a + export function onA(handler: () => void) { + controller.A.onEvent(ControllerButtonEvent.Pressed, handler) + } + + /** + * Runs code once each time [||] reaches a given value. This will also + * run if the score "passes" the given value in either direction without ever + * having the exact value (e.g. if score is changed by more than 1) + * + * @param score the score to fire the event on + * @param handler code to run when the score reaches the given value + */ + //% blockId=gameonscore3 + //% block="on `ICON.turkey-cage` $score" + //% score.defl=15 + //% help=docs/on_score + //% color=#093330 + export function onCages(score: number, handler: () => void) { + info.player1.impl.onScore(score, handler); + } + + + /** + * Register code run when a controller event occurs + * @param event + * @param handler + */ + //% weight=99 + //% blockId=on-overlap-cage + //% block="`ICON.turkey-right` `ICON.point-right-white` `ICON.turkey-cage`" + //% draggableParameters = "reporter" + //% color=#093330 + //% help=docs/on-overlap-cage + export function turkeyOverlapCage(handler: () => void) { + if (!handler) return; + + const overlapHandler = (sprite: Sprite, location: tiles.Location) => { + cageLocation = location; + handler(); + } + + const tileOverlapHandlers = game.currentScene().tileOverlapHandlers; + tileOverlapHandlers.push( + new scene.TileOverlapHandler( + SpriteKind.Player, + turkey_imgs.cage, + overlapHandler + ) + ); + } + + + + /** + * Overrides the normal score UI with an iconified version + */ + //% blockId=set_turkey_override + //% block="set `ICON.turkey-cage` to $thisScore" + //% thisScore.defl=0 + //% help=github:docs/set_turkey_override + export function setScoreOverride(thisScore: number) { + info.setScore(thisScore) + turkey.scoreText.setText(" x " + convertToText(info.score())) + scoreText.setIcon(turkey_imgs.lil) + + //scoreText.setBorder(1, 3, 1) + scoreText.setMaxFontHeight(9) + scoreText.right = 160 + scoreText.top = 1 + scoreText.update() + info.showScore(false) + } + + + /** + * Changes the score and overrides the traditional UI + * with an iconified version + */ + //% blockId=change_turkey_override + //% weight=900 + //% block="`ICON.turkey-cage` + $thisScore" + //% thisScore.defl=1 + //% help=github:docs/change_turkey_override + export function changeScoreOverride(thisScore: number) { + info.changeScoreBy(thisScore) + turkey.setScoreOverride(info.score()) + } + +} +``` + + + +```assetjson +{ + "assets.json": "", + "images.g.jres": "{\n \"*\": {\n \"mimeType\": \"image/x-mkcd-f4\",\n \"dataEncoding\": \"base64\",\n \"namespace\": \"myImages\"\n }\n}", + "images.g.ts": "// Auto-generated code. Do not edit.\nnamespace myImages {\n\n helpers._registerFactory(\"image\", function(name: string) {\n switch(helpers.stringTrim(name)) {\n\n }\n return null;\n })\n\n helpers._registerFactory(\"animation\", function(name: string) {\n switch(helpers.stringTrim(name)) {\n\n }\n return null;\n })\n\n helpers._registerFactory(\"song\", function(name: string) {\n switch(helpers.stringTrim(name)) {\n\n }\n return null;\n })\n\n}\n// Auto-generated code. Do not edit.\n", + "main.blocks": "", + "main.ts": "\n", + "pxt.json": "{\n \"name\": \"turkey_tiles\",\n \"version\": \"0.0.1\",\n \"description\": \"\",\n \"dependencies\": {\n \"device\": \"*\"\n },\n \"files\": [\n \"main.blocks\",\n \"main.ts\",\n \"assets.json\",\n \"tilemap.g.jres\",\n \"tilemap.g.ts\",\n \"images.g.jres\",\n \"images.g.ts\",\n \"pxt.json\"\n ],\n \"testFiles\": [],\n \"targetVersions\": {\n \"branch\": \"v1.12.46\",\n \"tag\": \"v1.12.46\",\n \"commits\": \"https://github.com/microsoft/pxt-arcade/commits/e66fb08db35df2249cd64300195259c64d497106\",\n \"target\": \"1.12.46\",\n \"pxt\": \"8.5.57\",\n \"targetId\": \"arcade\"\n },\n \"supportedTargets\": [\n \"arcade\"\n ],\n \"preferredEditor\": \"tsprj\",\n \"palette\": [\n \"#000000\",\n \"#FFFFFF\",\n \"#FF2121\",\n \"#FF93C4\",\n \"#FF8135\",\n \"#FFF609\",\n \"#249CA3\",\n \"#78DC52\",\n \"#B86F6F\",\n \"#87F2FF\",\n \"#8E2EC4\",\n \"#A4839F\",\n \"#5C406c\",\n \"#E5CDC4\",\n \"#91463d\",\n \"#000000\"\n ],\n \"assetPack\": true\n}\n", + "tilemap.g.jres": "{\n \"transparency17\": {\n \"data\": \"hwQQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==\",\n \"mimeType\": \"image/x-mkcd-f4\",\n \"tilemapTile\": true\n },\n \"tile1\": {\n \"data\": \"hwQQABAAAAAAAAAAAAAAuwAAAAAAAADbAAAAAAAAANsAAAAAAAAA2wAAAAAAAADbAAAAAAAAANsAAAAAAAAA2wAAAAAAAADbAAAAAAAAANsAAAAAAAAA2wAAAAAAAADbAAAAAAAAANsAAAAAAAAA2wAAAAAAAADbAAAAAAAAANsAAAAAAAAAuw==\",\n \"mimeType\": \"image/x-mkcd-f4\",\n \"tilemapTile\": true,\n \"displayName\": \"start\"\n },\n \"tile2\": {\n \"data\": \"hwQQABAAAADMzMzMzMzMzNzd3d3d3d3N3LBLtLAiu8vcALtEuyK7xMzMzMzMzMzM3N3d3dzd3M3cKyKy3O7czdy7u7Lc7tzM3ACwu9zu3M3MzMzM3O7cztzd3d3c7tzO3Lvu7ty+3Mvc6x3t3O7cztzr8e/c7tzOzMzMzMz8zMzc3d3d3f3dzQ==\",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yMDAwMDAwMDAwMDAwMjAwMjAwMDAwMDAwMDAwMDIwMDIyMjIyMDAyMDIyMjIyMDAyMDAwMDAwMDAwMDAwMjAwMjAwMDAwMDAwMDAwMDIwMjIyMjIyMjIyMjIyMjIyMg==\",\n \"tileset\": [\n \"myTiles.transparency17\",\n \"sprites.skillmap.islandTile3\",\n \"sprites.skillmap.islandTile5\",\n \"sprites.skillmap.islandTile1\",\n \"sprites.castle.tilePath2\",\n \"sprites.castle.tilePath1\",\n \"sprites.castle.tilePath3\",\n \"sprites.swamp.swampTile16\",\n \"myTiles.tile1\",\n \"myTiles.tile2\"\n ],\n \"displayName\": \"level1\"\n },\n \"*\": {\n \"mimeType\": \"image/x-mkcd-f4\",\n \"dataEncoding\": \"base64\",\n \"namespace\": \"myTiles\"\n }\n}", + "tilemap.g.ts": "// Auto-generated code. Do not edit.\nnamespace myTiles {\n //% fixedInstance jres blockIdentity=images._tile\n export const transparency17 = image.ofBuffer(hex``);\n //% fixedInstance jres blockIdentity=images._tile\n export const tile1 = image.ofBuffer(hex``);\n //% fixedInstance jres blockIdentity=images._tile\n export const tile2 = image.ofBuffer(hex``);\n\n helpers._registerFactory(\"tilemap\", function(name: string) {\n switch(helpers.stringTrim(name)) {\n case \"level1\":\n case \"level1\":return tiles.createTilemap(hex`1000a00002070707070707070707070707070701020707070707070707070707070707010200000000000000000000000000000102000000000000000000000000000001020600000000000000000005040406010209000000000005040404040404060102000000000000000000000000000001020504060000000000000000000000010200000000000000000000000000000102000000000000050600000000000001020000000000000000000000000000010200000000000000000000000000000102000504060000000000000504040601020000000000000000000000000000010200000000000005060000000000000102000000000000000000000000000001020000000000000000000000000000010200000000000000050404060000000102000000000000050600000000090001020000000000000000000005040406010200000000000000000000000000000102040404040600000000000000000001020000000000000000000000000000010200000000000000000504060000000102000000000000000000000000000001020000000000000000000000000000010200000000000504040600000000000102000000050600000000000000000001020000000000000000000000000000010206000000000000000000050600000102000000000000000000000000000001020900000000000000000000000000010200050600000000000000000504060102000005060000000000000000000001020000000000000000000000000000010200000005040600000000000000000102000000000000000000000000000001020000000000000000050600000000010200000000000000000000050600000102050404040600000000000000000001020000000000000000000000000000010200000000000000000000000005060102000000000000090000050600000001020000000000000000000000000000010200000000000504060000000000000102000000000000000000000000000001020000000000000000000005040406010200050406000000050600000000000102000000000000000000000000000001020000000000000000000000000000010200000000000005040600000000000102000000000000000000000000000001020000000000000000000000000000010200000000000000000005060000000102000000000000000000000000000001020504060000000000000000000000010200000000000005040600000000000102000000090000000000000000000001020000000000000000000005040406010200000005060000000000000000000102000000000000000000000000000001020000000000000000000000000000010200000506000000000000000000000102000000050600000000000000000001020000000005040406000000000000010200000000000000000000000000000102050406000000000000050600000001020000000000000000000000000000010200000000000000000000000000000102000000000005060000000504040601020000000000000000000000000000010200000000000000000000000000000102000005040404040406000000000001020000000000000000000000000000010200000000000000000000050600000102000000000000000000000000000001020000000000000009000000000000010200000000000000000000000000050102000000000005040406000000000001020000000000000000000000000000010200000000000000000000000506000102000504060000000000000000000001020000000000000000000000000000010200000000000000050600000000000102000000000000000000000000000001020000000000000000000000000000010200000900000000050404040600000102000000000000000000000000000001020504040406000000000000000000010200000000000000000000000000000102000000000000000000000000000001020000000000000506000000000000010200000000000506000000000000000102000000000000000000000000000001020000000000000000000504040404010200050406000000000000000000000102000000000000000000000000000001020000000000000000000000000000010200000000000506000000090000000102000000000000000000000000000001020000000000000000000005040600010200000000000000000000000000000102000000000504060000000000000001020504040600000000000000000000010200000000000000000000000000000102000000000000000000050406000001020000000000000000000000000000010200000000000000000000000000000102000000000005040600000000000001020000000000000000000000000000010200000000000000000000000000000102000000000000000000000000000001020000000005040600000000000000010200090000000000000000000000000102000000000000000000000000000001020406000000000005060000090000010200000000000000000000000000000102000000000000000000000504040601020000000504060000000000000000010200000000000000000000000000000102000000000000000000000000000001020000000000000000000000000000010200000506000000000000000000000102000000000000050404060000000001020000000000000000000000000000010200000000000000000000000504060102050406000000000000000000000001020000000000000009000000000000010200000000000000000000000000000102000000000005040406000000000001020000000000000000000000000000010200000000000000000000000000000102000000000000000000000005060001020000090000000504040600000000010200000000000000000000000000000102000005060000000000000000000001020000000000000000000000000000010200000000000000000000000000000102000000050406000000000000000001020000000000000000000000000000010200000000000000000000000000000102000000000000050406000009000001020000000000000000000000000000010200000000000000000000050404060102000000000000000000000000000001020000000504040600000000000000010200000900000000000000000000000102000000000000000000000000000001020404060000000000050406000000010200000000000000000000000000000102000000000000000000000000000001020000000005040600000000000000010200000000000000000000090000000102000000000000000000050600000001020000000000000000000000000000010200000000000000000000000000000102000504040600000005040404060001020000000000000000000000000000010200000000000008000000000000000102030303030303030303030303030303`, img`\n2..............2\n2..............2\n2..............2\n2..............2\n22.........22222\n2......222222222\n2..............2\n2222...........2\n2..............2\n2......22......2\n2..............2\n2..............2\n2.222......22222\n2..............2\n2......22......2\n2..............2\n2..............2\n2.......2222...2\n2......22......2\n2..........22222\n2..............2\n222222.........2\n2..............2\n2........222...2\n2..............2\n2..............2\n2.....2222.....2\n2...22.........2\n2..............2\n22.........22..2\n2..............2\n2..............2\n2.22........2222\n2..22..........2\n2..............2\n2...222........2\n2..............2\n2........22....2\n2..........22..2\n222222.........2\n2..............2\n2............222\n2.........22...2\n2..............2\n2.....222......2\n2..............2\n2..........22222\n2.222...22.....2\n2..............2\n2..............2\n2......222.....2\n2..............2\n2..............2\n2.........22...2\n2..............2\n2222...........2\n2......222.....2\n2..............2\n2..........22222\n2...22.........2\n2..............2\n2..............2\n2..22..........2\n2...22.........2\n2....2222......2\n2..............2\n2222......22...2\n2..............2\n2..............2\n2.....22...22222\n2..............2\n2..............2\n2..2222222.....2\n2..............2\n2..........22..2\n2..............2\n2..............2\n2.............22\n2.....2222.....2\n2..............2\n2...........22.2\n2.222..........2\n2..............2\n2.......22.....2\n2..............2\n2..............2\n2.......22222..2\n2..............2\n222222.........2\n2..............2\n2..............2\n2......22......2\n2.....22.......2\n2..............2\n2.........222222\n2.222..........2\n2..............2\n2..............2\n2.....22.......2\n2..............2\n2..........222.2\n2..............2\n2....222.......2\n22222..........2\n2..............2\n2.........222..2\n2..............2\n2..............2\n2.....222......2\n2..............2\n2..............2\n2..............2\n2....222.......2\n2..............2\n2..............2\n222.....22.....2\n2..............2\n2..........22222\n2...222........2\n2..............2\n2..............2\n2..............2\n2..22..........2\n2......2222....2\n2..............2\n2...........2222\n2222...........2\n2..............2\n2..............2\n2.....2222.....2\n2..............2\n2..............2\n2...........22.2\n2......2222....2\n2..............2\n2..22..........2\n2..............2\n2..............2\n2...222........2\n2..............2\n2..............2\n2......222.....2\n2..............2\n2..........22222\n2..............2\n2...2222.......2\n2..............2\n2..............2\n2222.....222...2\n2..............2\n2..............2\n2....222.......2\n2..............2\n2.........22...2\n2..............2\n2..............2\n2.2222...22222.2\n2..............2\n2..............2\n2222222222222222\n`, [myTiles.transparency17,sprites.skillmap.islandTile3,sprites.skillmap.islandTile5,sprites.skillmap.islandTile1,sprites.castle.tilePath2,sprites.castle.tilePath1,sprites.castle.tilePath3,sprites.swamp.swampTile16,myTiles.tile1,myTiles.tile2], TileScale.Sixteen);\n }\n return null;\n })\n\n helpers._registerFactory(\"tile\", function(name: string) {\n switch(helpers.stringTrim(name)) {\n case \"transparency17\":return transparency17;\n case \"start\":\n case \"tile1\":return tile1;\n case \"cage\":\n case \"tile2\":return tile2;\n }\n return null;\n })\n\n}\n// Auto-generated code. Do not edit.\n" +} + +``` \ No newline at end of file