Cave - a Platformer
@Stage\n\nwhen I receive [next! v]\nnext backdrop\n\nwhen flag clicked\nswitch backdrop to (backdrop1 v)\n\n@Ball\n\nwhen flag clicked\npoint in direction (90)\nforever\n    if <<<<mouse down?> and <(mouse y) > [-50]>> or <key (up arrow v) pressed?>> and <(y position) < [-138]>> then\n        set [up and down v] to [12]\n    else\n        change [up and down v] by (-0.7)\n    end\nend\n\nwhen flag clicked\ngo to x: (-150) y: (-50)\nset [up and down v] to [10]\nforever\n    change y by (Up and down)\nend\n\nwhen flag clicked\nwait (1) seconds\nforever\n    if <<<(mouse x) > (x position)> and <mouse down?>> or <key (right arrow v) pressed?>> then\n        change [left and right v] by (0.6)\n    end\n    if <<<(mouse x) < (x position)> and <mouse down?>> or <key (left arrow v) pressed?>> then\n        change [left and right v] by (-0.6)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Left and right) > [0]> then\n        change [left and right v] by (-0.2)\n    end\n    if <(Left and right) < [0]> then\n        change [left and right v] by (0.2)\n    end\nend\n\nwhen flag clicked\nforever\n    if on edge, bounce\n    point in direction (90)\nend\n\nwhen flag clicked\ngo to x: (-150) y: (-50)\nset [left and right v] to [0]\nforever\n    change x by (Left and right)\nend\n\nwhen I receive [go! v]\ngo to x: (-150) y: (-50)\nset [left and right v] to [0]\nset [up and down v] to [0]\n\nwhen I receive [next! v]\ngo to x: (-150) y: (-50)\nset [left and right v] to [0]\nset [up and down v] to [0]\n\n@Ouch!\n\nwhen flag clicked\nswitch costume to (costume1 v)\nforever\n    wait (0.1) seconds\n    wait until <touching (ball v)?>\n    broadcast (Go! v)\nend\n\nwhen I receive [next! v]\nnext costume\n\n@End\n\nwhen flag clicked\nforever\n    wait (0.1) seconds\n    wait until <touching (ball v)?>\n    broadcast (Next! v)\nend\n\n@Sprite1\n\nwhen flag clicked\nforever\n    go to (ball v)\nend\n\n@Sprite2\n\nwhen flag clicked\nforever\n    set [ghost v] effect to (100)\nend\n\n
Use the arrow keys (or tap on mobile) to get to the end, avoiding spiky crystals and using your light to guide you through! Enjoy!