Michelle T
Published © GPL3+

Fish "Bones" Strange Controller

Want to play "Cat Away"? Need a controller? Here's a fish controller to go with it! Don't mind the bones, that's just how we roll.

IntermediateShowcase (no instructions)10 hours138
Fish "Bones" Strange Controller

Things used in this project

Hardware components

Circuit Playground Express
Adafruit Circuit Playground Express
×1
USB-A to Micro-USB Cable
USB-A to Micro-USB Cable
×1

Software apps and online services

MakeCode
Microsoft MakeCode

Hand tools and fabrication machines

White Yarn
Black Yarn
Crochet Hook
Yarn Needle
Scissors

Story

Read more

Code

Cat Away MakeCode Arcade Game

JavaScript
This is the code for the game "Cat Away" made in MakeCode Arcade
info.onCountdownEnd(function () {
    if (info.score() <= 0) {
        game.over(true)
    } else if (info.score() > 0) {
        game.splash("Good try!", "Now, avoid all the cats!")
        game.over(false)
    }
})
sprites.onOverlap(SpriteKind.Player, SpriteKind.Projectile, function (sprite, otherSprite) {
    mySprite.startEffect(effects.bubbles, 200)
    info.changeScoreBy(1)
})
let projectile: Sprite = null
let mySprite: Sprite = null
scene.setBackgroundImage(img`
    6666688888888888888888888666668888888888888888888888888666668888888888888888888888888666668888888888888888888888888888888888888888888888888888888666668888888888
    6666688888888888888888888666668888888888888888888888888666668888888888888888888888888666668888888888888888888888888888888888888888888888888888888666668888888888
    6666688888888888888888888666668888888888888888888888888666668888888888888888888888888666668888888888888888888888888888888888888888888888888888888666668888888888
    6666688888888888888888888666668888888888888888888888888666668888888888888888888888888666668888888888888888888888888888888888888888888888888888888666668888888888
    6666688888888888888888888666668888888888888888888888888666668888888888888888888888888666668888888888888888888888888888888888888888888888888888888666668888888888
    8888866666888888888866666888888888888888888888888888888666668888888888888888888888888666668888888888888888888888888888886666666666888888888888888888886666688888
    8888866666888888888866666888888888888888888888888888888666668888888888888888888888888666668888888888888888888888888888886666666666888888888888888888886666688888
    8888866666888888888866666888888888888888888888888888888666668888888888888888888888888666668888888888888888888888888888886666666666888888888888888888886666688888
    8888866666888888888866666888888888888888888888888888888666668888888888888888888888888666668888888888888888888888888888886666666666888888888888888888886666688888
    8888866666888888888866666888888888888888888888888888888666668888888888888888888888888666668888888888888888888888888888886666666666888888888888888888886666688888
    8888888888666666666688888888888888888888888888888888888888886666688888888888888866666888888888888888888888888888888666668888888888666668888888888888888888866666
    8888888888666666666688888888888888888888888888888888888888886666688888888888888866666888888888888888888888888888888666668888888888666668888888888888888888866666
    8888888888666666666688888888888888888888888888888888888888886666688888888888888866666888888888888888888888888888888666668888888888666668888888888888888888866666
    8888888888666666666688888888888888888888888888888888888888886666688888888888888866666888888888888888888888888888888666668888888888666668888888888888888888866666
    8888888888666666666688888888888888888888888888888888888888886666688888888888888866666888888888888888888888888888888666668888888888666668888888888888888888866666
    8888888888888888888888888888888888888888888888888888888888888888866666666666666688888888888888888888888888888866666888886666688888888886666688888888888888888888
    8888888888888888888888888888888888888888888888888888888888888888866666666666666688888888888888888888888888888866666888886666688888888886666688888888888888888888
    8888888888888888888888888888888888888888888888888888888888888888866666666666666688888888888888888888888888888866666888886666688888888886666688888888888888888888
    8888888888888888888888888888888888888888888888888888888888888888866666666666666688888888888888888888888888888866666888886666688888888886666688888888888888888888
    8888888888888888888888888888888888888888888888888888888888888888866666666666666688888888888888888888888888888866666888886666688888888886666688888888888888888888
    8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888866666888888888888888888886666688888888888888888888
    8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888866666888888888888888888886666688888888888888888888
    8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888866666888888888888888888886666688888888888888888888
    8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888866666888888888888888888886666688888888888888888888
    8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888866666888888888888888888886666688888888888888888888
    6666666666888888888888888888886666666666666666666688888888888888888888888888888866666666668888888888888888888888888666668888888888666668888888888888888888888888
    6666666666888888888888888888886666666666666666666688888888888888888888888888888866666666668888888888888888888888888666668888888888666668888888888888888888888888
    6666666666888888888888888888886666666666666666666688888888888888888888888888888866666666668888888888888888888888888666668888888888666668888888888888888888888888
    6666666666888888888888888888886666666666666666666688888888888888888888888888888866666666668888888888888888888888888666668888888888666668888888888888888888888888
    6666666666888888888888888888886666666666666666666688888888888888888888888888888866666666668888888888888888888888888666668888888888666668888888888888888888888888
    6666688888666668888888888666668888888888888888888866666888888888888888888886666688888888886666688888888888888888888888886666666666888888888888888888888888888888
    6666688888666668888888888666668888888888888888888866666888888888888888888886666688888888886666688888888888888888888888886666666666888888888888888888888888888888
    6666688888666668888888888666668888888888888888888866666888888888888888888886666688888888886666688888888888888888888888886666666666888888888888888888888888888888
    6666688888666668888888888666668888888888888888888866666888888888888888888886666688888888886666688888888888888888888888886666666666888888888888888888888888888888
    6666688888666668888888888666668888888888888888888866666888888888888888888886666688888888886666688888888888888888888888886666666666888888888888888888888888888888
    6666688888888886666666666888888888888888888888888888888666668888888888666668888888888666668888866666888888888888888888888888888888888888888888888888888888888888
    6666688888888886666666666888888888888888888888888888888666668888888888666668888888888666668888866666888888888888888888888888888888888888888888888888888888888888
    6666688888888886666666666888888888888888888888888888888666668888888888666668888888888666668888866666888888888888888888888888888888888888888888888888888888888888
    6666688888888886666666666888888888888888888888888888888666668888888888666668888888888666668888866666888888888888888888888888888888888888888888888888888888888888
    6666688888888886666666666888888888888888888888888888888666668888888888666668888888888666668888866666888888888888888888888888888888888888888888888888888888888888
    6666688888888886666666666888888888888888888888888888888666668888888888666668888888888888888888866666888888888888888888888888866666666666666688888888888888888888
    6666688888888886666666666888888888888888888888888888888666668888888888666668888888888888888888866666888888888888888888888888866666666666666688888888888888888888
    6666688888888886666666666888888888888888888888888888888666668888888888666668888888888888888888866666888888888888888888888888866666666666666688888888888888888888
    6666688888888886666666666888888888888888888888888888888666668888888888666668888888888888888888866666888888888888888888888888866666666666666688888888888888888888
    6666688888888886666666666888888888888888888888888888888666668888888888666668888888888888888888866666888888888888888888888888866666666666666688888888888888888888
    6666688888666668888888888666668888888888888888888866666888888888888888888886666688888888886666688888888888888888888888886666688888888888888866666888888888888888
    6666688888666668888888888666668888888888888888888866666888888888888888888886666688888888886666688888888888888888888888886666688888888888888866666888888888888888
    6666688888666668888888888666668888888888888888888866666888888888888888888886666688888888886666688888888888888888888888886666688888888888888866666888888888888888
    6666688888666668888888888666668888888888888888888866666888888888888888888886666688888888886666688888888888888888888888886666688888888888888866666888888888888888
    6666688888666668888888888666668888888888888888888866666888888888888888888886666688888888886666688888888888888888888888886666688888888888888866666888888888888888
    6666666666888888888888888888886666666666666666666688888888888888888888888888888866666666668888888888888888888888888666668888888888888888888888888666668888888888
    6666666666888888888888888888886666666666666666666688888888888888888888888888888866666666668888888888888888888888888666668888888888888888888888888666668888888888
    6666666666888888888888888888886666666666666666666688888888888888888888888888888866666666668888888888888888888888888666668888888888888888888888888666668888888888
    6666666666888888888888888888886666666666666666666688888888888888888888888888888866666666668888888888888888888888888666668888888888888888888888888666668888888888
    6666666666888888888888888888886666666666666666666688888888888888888888888888888866666666668888888888888888888888888666668888888888888888888888888666668888888888
    8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888866666888888888866666888888888888888888886666688888
    8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888866666888888888866666888888888888888888886666688888
    8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888866666888888888866666888888888888888888886666688888
    8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888866666888888888866666888888888888888888886666688888
    8888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888866666888888888866666888888888888888888886666688888
    8888888888888888888888888888888888888888888888888866666666666666666666666666666666666888888888888888888888888866666888886666688888888888888888888888886666688888
    8888888888888888888888888888888888888888888888888866666666666666666666666666666666666888888888888888888888888866666888886666688888888888888888888888886666688888
    8888888888888888888888888888888888888888888888888866666666666666666666666666666666666888888888888888888888888866666888886666688888888888888888888888886666688888
    8888888888888888888888888888888888888888888888888866666666666666666666666666666666666888888888888888888888888866666888886666688888888888888888888888886666688888
    8888888888888888888888888888888888888888888888888866666666666666666666666666666666666888888888888888888888888866666888886666688888888888888888888888886666688888
    8888888888888888888888888888888888866666666666666688888888888888888888888888888888888666666666688888888888888866666888888888888888888888888888888888886666688888
    8888888888888888888888888888888888866666666666666688888888888888888888888888888888888666666666688888888888888866666888888888888888888888888888888888886666688888
    8888888888888888888888888888888888866666666666666688888888888888888888888888888888888666666666688888888888888866666888888888888888888888888888888888886666688888
    8888888888888888888888888888888888866666666666666688888888888888888888888888888888888666666666688888888888888866666888888888888888888888888888888888886666688888
    8888888888888888888888888888888888866666666666666688888888888888888888888888888888888666666666688888888888888866666888888888888888888888888888888888886666688888
    8888888888888888888888888888886666666666888886666666666888888888888888888888888888888888886666666666888888888888888666668888888888888888888888888666668888888888
    8888888888888888888888888888886666666666888886666666666888888888888888888888888888888888886666666666888888888888888666668888888888888888888888888666668888888888
    8888888888888888888888888888886666666666888886666666666888888888888888888888888888888888886666666666888888888888888666668888888888888888888888888666668888888888
    8888888888888888888888888888886666666666888886666666666888888888888888888888888888888888886666666666888888888888888666668888888888888888888888888666668888888888
    8888888888888888888888888888886666666666888886666666666888888888888888888888888888888888886666666666888888888888888666668888888888888888888888888666668888888888
    8888888888888888888888888666666666688888666668888866666888888888888888888888888888888888888888866666666668888888888888886666688888888888888866666888888888888888
    8888888888888888888888888666666666688888666668888866666888888888888888888888888888888888888888866666666668888888888888886666688888888888888866666888888888888888
    8888888888888888888888888666666666688888666668888866666888888888888888888888888888888888888888866666666668888888888888886666688888888888888866666888888888888888
    8888888888888888888888888666666666688888666668888866666888888888888888888888888888888888888888866666666668888888888888886666688888888888888866666888888888888888
    8888888888888888888888888666666666688888666668888866666888888888888888888888888888888888888888866666666668888888888888886666688888888888888866666888888888888888
    8888888888888888888866666666668888888888666668888866666888888888888888888888888888888888888888888888666666666688888888888888866666666666666688888888888888888888
    8888888888888888888866666666668888888888666668888866666888888888888888888888888888888888888888888888666666666688888888888888866666666666666688888888888888888888
    8888888888888888888866666666668888888888666668888866666888888888888888888888888888888888888888888888666666666688888888888888866666666666666688888888888888888888
    8888888888888888888866666666668888888888666668888866666888888888888888888888888888888888888888888888666666666688888888888888866666666666666688888888888888888888
    8888888888888888888866666666668888888888666668888866666888888888888888888888888888888888888888888888666666666688888888888888866666666666666688888888888888888888
    8888888888888888888866666888888888866666888888888866666888888888888888888888888888888888888888888888888888888866666888888888888888888888888888888888888888888888
    8888888888888888888866666888888888866666888888888866666888888888888888888888888888888888888888888888888888888866666888888888888888888888888888888888888888888888
    8888888888888888888866666888888888866666888888888866666888888888888888888888888888888888888888888888888888888866666888888888888888888888888888888888888888888888
    8888888888888888888866666888888888866666888888888866666888888888888888888888888888888888888888888888888888888866666888888888888888888888888888888888888888888888
    8888888888888888888866666888888888866666888888888866666888888888888888888888888888888888888888888888888888888866666888888888888888888888888888888888888888888888
    8888888888888886666666666888886666688888888886666666666888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
    8888888888888886666666666888886666688888888886666666666888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
    8888888888888886666666666888886666688888888886666666666888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
    8888888888888886666666666888886666688888888886666666666888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
    8888888888888886666666666888886666688888888886666666666888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888
    8888888888888886666688888888888888888888666666666688888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888886666688888
    8888888888888886666688888888888888888888666666666688888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888886666688888
    8888888888888886666688888888888888888888666666666688888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888886666688888
    8888888888888886666688888888888888888888666666666688888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888886666688888
    8888888888888886666688888888888888888888666666666688888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888886666688888
    8888888888888886666666666666666666666666666668888888888888888888888888888886666666666666666666688888888888888888888888888888888888888888888888888666666666666666
    8888888888888886666666666666666666666666666668888888888888888888888888888886666666666666666666688888888888888888888888888888888888888888888888888666666666666666
    8888888888888886666666666666666666666666666668888888888888888888888888888886666666666666666666688888888888888888888888888888888888888888888888888666666666666666
    8888888888888886666666666666666666666666666668888888888888888888888888888886666666666666666666688888888888888888888888888888888888888888888888888666666666666666
    8888888888888886666666666666666666666666666668888888888888888888888888888886666666666666666666688888888888888888888888888888888888888888888888888666666666666666
    8888866666888888888888888888888888888888888888888888888888888888888888666668888888888888888888866666888888888888888888888888888888888888888888888888886666688888
    8888866666888888888888888888888888888888888888888888888888888888888888666668888888888888888888866666888888888888888888888888888888888888888888888888886666688888
    8888866666888888888888888888888888888888888888888888888888888888888888666668888888888888888888866666888888888888888888888888888888888888888888888888886666688888
    8888866666888888888888888888888888888888888888888888888888888888888888666668888888888888888888866666888888888888888888888888888888888888888888888888886666688888
    8888866666888888888888888888888888888888888888888888888888888888888888666668888888888888888888866666888888888888888888888888888888888888888888888888886666688888
    6666666666666668888888888888888888888888888888888888888888888888866666888888888888888888888888888888666668888888888888888888888888666666666688888888888888888888
    6666666666666668888888888888888888888888888888888888888888888888866666888888888888888888888888888888666668888888888888888888888888666666666688888888888888888888
    6666666666666668888888888888888888888888888888888888888888888888866666888888888888888888888888888888666668888888888888888888888888666666666688888888888888888888
    6666666666666668888888888888888888888888888888888888888888888888866666888888888888888888888888888888666668888888888888888888888888666666666688888888888888888888
    6666666666666668888888888888888888888888888888888888888888888888866666888888888888888888888888888888666668888888888888888888888888666666666688888888888888888888
    8888866666888888888888888888888888888888888888888888888888886666666666666666666666666666666666666666666666666688888888888888866666888888888866666888888888888888
    8888866666888888888888888888888888888888888888888888888888886666666666666666666666666666666666666666666666666688888888888888866666888888888866666888888888888888
    8888866666888888888888888888888888888888888888888888888888886666666666666666666666666666666666666666666666666688888888888888866666888888888866666888888888888888
    8888866666888888888888888888888888888888888888888888888888886666666666666666666666666666666666666666666666666688888888888888866666888888888866666888888888888888
    8888866666888888888888888888888888888888888888888888888888886666666666666666666666666666666666666666666666666688888888888888866666888888888866666888888888888...
    `)
mySprite = sprites.create(img`
    . . . . . . 1 1 1 . . . . . . 
    . . . . . 1 f 1 1 1 . . . . . 
    . . . . 1 1 1 1 1 1 1 . . . . 
    . . . . . . . 1 . . . . . . . 
    . . . . 1 1 1 1 1 1 1 . . . . 
    . . . 1 . . . 1 . . . 1 . . . 
    . . . . . 1 1 1 1 1 . . . . . 
    . . . . 1 . . 1 . . 1 . . . . 
    . . . . . . 1 1 1 . . . . . . 
    . . . . . 1 . 1 . 1 . . . . . 
    . . . . . . . 1 . . . . . . . 
    . . . . . . 1 1 1 . . . . . . 
    . . . . . 1 1 . 1 1 . . . . . 
    . . . . 1 . . 1 . . 1 . . . . 
    . . . . . 1 1 . 1 1 . . . . . 
    `, SpriteKind.Player)
controller.moveSprite(mySprite)
mySprite.setFlag(SpriteFlag.StayInScreen, true)
light.setAll(0xff0080)
info.startCountdown(30)
game.onUpdateInterval(1000, function () {
    projectile = sprites.createProjectileFromSide(img`
        . f . . . 4 . . . . . . . . . 
        . 4 4 4 4 4 . . . . . . . . f 
        . 4 f 4 f 4 . . . . . . . 4 4 
        . 4 4 4 4 4 . . . . . . . 4 . 
        . 4 4 f 4 4 . . . . . . 4 4 . 
        . 4 4 4 4 4 . . . . . . 4 . . 
        . . . . f 4 4 f 4 4 f 4 4 . . 
        . . . . f 4 4 f 4 4 f 4 4 . . 
        . . . . f 4 4 f 4 4 f 4 4 . . 
        . . . . 4 4 4 f 4 4 4 4 4 . . 
        . . . . 4 4 4 4 4 4 4 4 4 . . 
        . . . . 4 . 4 . . . 4 . 4 . . 
        . . . . 4 . 4 . . . 4 . 4 . . 
        . . . . 4 . f . . . 4 . f . . 
        . . . . f . . . . . f . . . . 
        `, randint(-50, 50), randint(-50, 50))
    if (projectile.vx > 0) {
        projectile.image.flipX()
    }
})
forever(function () {
    for (let index = 0; index < 2; index++) {
        music.playTone(330, music.beat(BeatFraction.Eighth))
        music.playTone(659, music.beat(BeatFraction.Quarter))
        music.playTone(494, music.beat(BeatFraction.Eighth))
        music.playTone(988, music.beat(BeatFraction.Quarter))
        music.playTone(392, music.beat(BeatFraction.Eighth))
        music.playTone(784, music.beat(BeatFraction.Quarter))
    }
    for (let index = 0; index < 2; index++) {
        music.playTone(440, music.beat(BeatFraction.Eighth))
        music.playTone(880, music.beat(BeatFraction.Quarter))
        music.playTone(659, music.beat(BeatFraction.Eighth))
        music.playTone(1318, music.beat(BeatFraction.Quarter))
        music.playTone(523, music.beat(BeatFraction.Eighth))
        music.playTone(1046, music.beat(BeatFraction.Quarter))
        music.playTone(330, music.beat(BeatFraction.Eighth))
        music.playTone(659, music.beat(BeatFraction.Quarter))
    }
    if (info.score() == 10) {
        light.setLength(9)
    }
})

ArcadeController

JavaScript
https://learn.adafruit.com/custom-controllers-for-makecode-arcade?view=all
This website was used to help build the controller code
input.onGesture(Gesture.TiltDown, function () {
    makerController.player1.setButton(ArcadeButton.Up, true)
    pause(200)
    makerController.player1.setButton(ArcadeButton.Up, false)
})
input.onGesture(Gesture.TiltLeft, function () {
    makerController.player1.setButton(ArcadeButton.Left, true)
    pause(200)
    makerController.player1.setButton(ArcadeButton.Left, false)
})
input.onGesture(Gesture.TiltRight, function () {
    makerController.player1.setButton(ArcadeButton.Right, true)
    pause(200)
    makerController.player1.setButton(ArcadeButton.Right, false)
})
input.onGesture(Gesture.TiltUp, function () {
    makerController.player1.setButton(ArcadeButton.Down, true)
    pause(200)
    makerController.player1.setButton(ArcadeButton.Down, false)
})
input.onGesture(Gesture.Shake, function () {
    makerController.player1.press(ArcadeButton.A)
})
input.onGesture(Gesture.FaceDown, function () {
    makerController.player1.press(ArcadeButton.B)
})

Credits

Michelle T
4 projects • 0 followers
Contact

Comments

Please log in or sign up to comment.