Astronomical - a platformer
@Stage\n\nwhen flag clicked\nset volume to (100) %\nforever\n    play sound [Lensko - Cetus v] until done\nend\n\nwhen flag clicked\nforever\n    if <(mute?) = [1]> then\n        set volume to (0) %\n    else\n        set volume to (100) %\n    end\n    wait until <(mute?) = [1]>\nend\n\n@square\n\nwhen flag clicked\nset rotation style [left-right v]\ngo to x: (0) y: (20)\nhide variable [touching bouncer? v]\nforever\n    if <<touching color (#ffe600)?> or <touching color (#605600)?>> then\n        set [touching bouncer? v] to [1]\n    else\n        set [touching bouncer? v] to [0]\n    end\nend\n\nwhen flag clicked\nhide variable [touching portal? v]\nforever\n    if <touching color (#ff9800)?> then\n        set [touching portal? v] to [1]\n    else\n        set [touching portal? v] to [0]\n    end\nend\n\nwhen [timer v] > (0.125)\ngo to x: (0) y: (20)\npoint in direction (90)\nswitch costume to (right v)\n\nwhen flag clicked\ngo to [front v] layer\nhide variable [touching portal? v]\nforever\n    wait until <<<<touching color (#ff0000)?> or <touching color (#600000)?>> and <not <<touching color (#74b140)?> or <<touching color (#2b4218)?> or <<touching color (#0077b8)?> or <<touching color (#002d45)?> or <<touching color (#675134)?> or <<touching color (#271e13)?> or <<touching color (#4d3d27)?> or <touching color (#1d170f)?>>>>>>>>>> or <touching color (#2eff00)?>>\n    broadcast (restart level v)\nend\n\nwhen flag clicked\nhide variable [touching portal2? v]\nforever\n    if <touching color (#2196f3)?> then\n        set [touching portal2? v] to [1]\n    else\n        set [touching portal2? v] to [0]\n    end\nend\n\nwhen flag clicked\nhide variable [jump? v]\nforever\n    if <(jump?) = [1]> then\n        wait until <(jump?) = [0]>\n    else\n        if <not <key (any v) pressed?>> then\n            switch costume to (center v)\n        else\n            if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n                switch costume to (left v)\n            else\n                if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n                    switch costume to (right v)\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [jump1 v]\nrepeat until <(jump?) = [2]>\n    if <not <key (any v) pressed?>> then\n        switch costume to (up v)\n    else\n        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n            switch costume to (up left v)\n        else\n            if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n                switch costume to (up right v)\n            end\n        end\n    end\nend\n\nwhen I receive [jump2 v]\nrepeat until <(jump?) = [0]>\n    if <not <key (any v) pressed?>> then\n        switch costume to (down v)\n    else\n        if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n            switch costume to (down left v)\n        else\n            if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n                switch costume to (down right v)\n            end\n        end\n    end\nend\n\n@planet\n\nwhen flag clicked\nset [bouncing? v] to [0]\nswitch costume to (0 v)\nset size to (487) %\ngo to x: (0) y: (-257.5)\nbroadcast (next level v)\nforever\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        repeat until <not <<key (left arrow v) pressed?> or <key (a v) pressed?>>>\n            turn right (1.5) degrees\n        end\n    end\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        repeat until <not <<key (right arrow v) pressed?> or <key (d v) pressed?>>>\n            turn left (1.5) degrees\n        end\n    end\nend\n\nwhen flag clicked\nhide variable [bouncing? v]\nforever\n    wait until <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <(bouncing?) = [0]>>\n    set [jump? v] to [1]\n    broadcast (jump1 v)\n    repeat (4)\n        change y by (-10)\n    end\n    repeat (4)\n        change y by (-5)\n    end\n    repeat (4)\n        change y by (-2.5)\n    end\n    repeat (4)\n        change y by (-1.25)\n    end\n    set [jump? v] to [2]\n    broadcast (jump2 v)\n    repeat (4)\n        change y by (1.25)\n    end\n    repeat (4)\n        change y by (2.5)\n    end\n    repeat (4)\n        change y by (5)\n    end\n    repeat (4)\n        change y by (10)\n    end\n    go to x: (0) y: (-257)\n    set [jump? v] to [0]\nend\n\nwhen I receive [next level v]\ngo to x: (0) y: (-257.5)\npoint in direction (90)\nnext costume\n\nwhen I receive [restart level v]\nstart sound [dead v]\ngo to x: (0) y: (-257.5)\npoint in direction (default rotation)\n\nwhen flag clicked\nhide variable [mute? v]\nset [mute? v] to [0]\nforever\n    wait until <key (m v) pressed?>\n    if <(mute?) = [0]> then\n        set [mute? v] to [1]\n    else\n        set [mute? v] to [0]\n    end\n    wait until <not <key (m v) pressed?>>\nend\n\nwhen flag clicked\nset [color v] effect to (0)\nwait until <(costume [number v]) = [2]>\nwait until <(costume [number v]) = [1]>\nbroadcast (end v)\nstart sound [portal v]\nforever\n    change [color v] effect by (10)\nend\n\nwhen flag clicked\nforever\n    wait until <(touching portal2?) = [1]>\n    set [default rotation v] to (direction)\n    start sound [portal2 v]\n    next costume\n    wait until <(touching portal2?) = [0]>\nend\n\nwhen flag clicked\nforever\n    wait until <(touching bouncer?) = [1]>\n    set [bouncing? v] to [1]\n    repeat until <(touching bouncer?) = [0]>\n        set [jump? v] to [1]\n        broadcast (jump1 v)\n        repeat (8)\n            change y by (-10)\n        end\n        repeat (8)\n            change y by (-5)\n        end\n        repeat (8)\n            change y by (-2.5)\n        end\n        repeat (8)\n            change y by (-1.25)\n        end\n        set [jump? v] to [2]\n        broadcast (jump2 v)\n        repeat (8)\n            change y by (1.25)\n        end\n        repeat (8)\n            change y by (2.5)\n        end\n        repeat (8)\n            change y by (5)\n        end\n        repeat (8)\n            change y by (10)\n        end\n        go to x: (0) y: (-257)\n    end\n    set [jump? v] to [0]\n    set [bouncing? v] to [0]\nend\n\nwhen flag clicked\nhide variable [default rotation v]\nforever\n    wait until <(touching portal?) = [1]>\n    set [default rotation v] to [90]\n    start sound [portal v]\n    broadcast (next level v)\n    wait until <(touching portal?) = [0]>\nend\n\nstart sound [jump2 v]\n\nstart sound [jump1 v]\n\n@text\n\nwhen flag clicked\ngo to x: (-95) y: (160)\nswitch costume to (0 v)\nshow\nforever\n    switch costume to ([costume # v] of [planet v])\nend\n\nwhen [timer v] > (0.125)\nhide\n\n@map\n\nwhen [timer v] > (0.125)\nhide\n\nwhen flag clicked\nset size to (50) %\nshow\nset [color v] effect to (0)\nswitch costume to (0 v)\ngo to x: (200) y: (105)\nforever\n    point in direction ([direction v] of [planet v])\n    switch costume to ([costume # v] of [planet v])\nend\n\nwhen I receive [end v]\nforever\n    change [color v] effect by (10)\nend\n\n@level\n\nwhen flag clicked\ngo to x: (-145) y: (-165)\nshow\nforever\n    switch costume to ([costume # v] of [planet v])\nend\n\nwhen flag clicked\nforever\n    reset timer\nend\n\nwhen [timer v] > (0.125)\nhide\n\n@marker\n\nwhen flag clicked\ngo to [front v] layer\nset size to (90) %\ngo to x: (200) y: (142.5)\nforever\n    if <([costume name v] of [planet v]) = [0]> then\n        hide\n    else\n        show\n    end\nend\n\nwhen [timer v] > (0.125)\nhide\n\n@shadow\n\nwhen [timer v] > (0.125)\nhide\n\nwhen flag clicked\nset size to (77.5) %\nset [ghost v] effect to (37.5)\ngo to x: (0) y: (3.75)\nshow\nforever\n    wait until <(touching bouncer?) = [1]>\n    repeat (8)\n        change y by (-10)\n    end\n    repeat (8)\n        change y by (-5)\n    end\n    repeat (8)\n        change y by (-2.5)\n    end\n    repeat (8)\n        change y by (-1.25)\n    end\n    repeat (8)\n        change y by (1.25)\n    end\n    repeat (8)\n        change y by (2.5)\n    end\n    repeat (8)\n        change y by (5)\n    end\n    repeat (8)\n        change y by (10)\n    end\n    go to x: (0) y: (3.75)\nend\n\nwhen flag clicked\nforever\n    wait until <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <(bouncing?) = [0]>>\n    repeat (4)\n        change y by (-10)\n        change [ghost v] effect by (5)\n    end\n    repeat (4)\n        change y by (-5)\n        change [ghost v] effect by (2.5)\n    end\n    repeat (4)\n        change y by (-2.5)\n        change [ghost v] effect by (1.25)\n    end\n    repeat (4)\n        change y by (-1.25)\n        change [ghost v] effect by (0.625)\n    end\n    repeat (4)\n        change y by (1.25)\n        change [ghost v] effect by (-0.625)\n    end\n    repeat (4)\n        change y by (2.5)\n        change [ghost v] effect by (-1.25)\n    end\n    repeat (4)\n        change y by (5)\n        change [ghost v] effect by (-2.5)\n    end\n    repeat (4)\n        change y by (10)\n        change [ghost v] effect by (-5)\n    end\n    go to x: (0) y: (3.75)\nend\n\nmove (10) steps\n\n@thumbnail\n\nwhen flag clicked\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\ngo to [front v] layer\nset size to (100) %\n\n@horizon\n\nwhen flag clicked\nset size to (97) %\ngo to [back v] layer\nforever\n    go to x: (0) y: (([y position v] of [planet v]) + (100))\n    switch costume to ([costume # v] of [planet v])\nend\n\n@horizon2\n\nwhen flag clicked\nshow\nset size to (15) %\ngo to [back v] layer\nforever\n    go to x: ([x position v] of [map v]) y: ([y position v] of [map v])\n    switch costume to ([costume # v] of [planet v])\nend\n\nwhen [timer v] > (0.125)\nhide\n\n@shadow2\n\nwhen [timer v] > (0.125)\nhide\n\nwhen flag clicked\nset size to (77.5) %\nset [ghost v] effect to (37.5)\ngo to x: (0) y: (3.75)\nshow\nforever\n    wait until <(touching bouncer?) = [1]>\n    repeat (8)\n        change y by (-10)\n    end\n    repeat (8)\n        change y by (-5)\n    end\n    repeat (8)\n        change y by (-2.5)\n    end\n    repeat (8)\n        change y by (-1.25)\n    end\n    repeat (8)\n        change y by (1.25)\n    end\n    repeat (8)\n        change y by (2.5)\n    end\n    repeat (8)\n        change y by (5)\n    end\n    repeat (8)\n        change y by (10)\n    end\n    go to x: (0) y: (3.75)\nend\n\nwhen flag clicked\nforever\n    wait until <<<key (up arrow v) pressed?> or <key (w v) pressed?>> and <(bouncing?) = [0]>>\n    repeat (4)\n        change y by (-10)\n        change [ghost v] effect by (5)\n    end\n    repeat (4)\n        change y by (-5)\n        change [ghost v] effect by (2.5)\n    end\n    repeat (4)\n        change y by (-2.5)\n        change [ghost v] effect by (1.25)\n    end\n    repeat (4)\n        change y by (-1.25)\n        change [ghost v] effect by (0.625)\n    end\n    repeat (4)\n        change y by (1.25)\n        change [ghost v] effect by (-0.625)\n    end\n    repeat (4)\n        change y by (2.5)\n        change [ghost v] effect by (-1.25)\n    end\n    repeat (4)\n        change y by (5)\n        change [ghost v] effect by (-2.5)\n    end\n    repeat (4)\n        change y by (10)\n        change [ghost v] effect by (-5)\n    end\n    go to x: (0) y: (3.75)\nend\n\nmove (10) steps\n\n
Overview:\nAstronomical is one of Scratch's most ambitious round platformers. I will tell you what to do in the top left. Your goal is to complete the level without dying!\n\nControls:\nWASD or arrow keys to move\nM to mute music\n\nCredits:\nLensko - Cetus