Basic Platformer
@Stage\n\nwhen flag clicked\nforever\n    switch backdrop to (LEVEL)\nend\n\n@Player\n\nwhen flag clicked\nGo to start\nswitch costume to (block v)\nset [level v] to [1]\nset [falling v] to [0]\nset [gravity v] to [-1]\nset [jump strength v] to [12]\nset [speed v] to [1.5]\nset [resistance v] to [0.8]\nset [speed y v] to [0]\nset [customise menu v] to [0]\nforever\n    if <<<key (w v) pressed?> or <key (up arrow v) pressed?>> or <key (space v) pressed?>> then\n        if <(falling) < [3]> then\n            set [speed y v] to (Jump Strength)\n        end\n        if <touching color (#00f9ff)?> then\n            set [speed y v] to ((Jump Strength) - (5))\n        end\n    end\n    if <<key (a v) pressed?> or <key (left arrow v) pressed?>> then\n        change [speed x v] by ((0) - (Speed))\n    end\n    if <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n        change [speed x v] by (Speed)\n    end\n    if <key (o v) pressed?> then\n        if <(Customise Menu) = [1]> then\n            set [customise menu v] to [0]\n        else\n            set [customise menu v] to [1]\n        end\n    end\n    if <touching color (#f5ff00)?> then\n        change [level v] by (1)\n        Go to start\n    end\n    if <touching color (#ff0000)?> then\n        Go to start\n    end\n    if <touching color (#8600ff)?> then\n        set size to (50) %\n    end\n    if <(Customise Menu) = [1]> then\n        show variable [speed v]\n        show variable [jump strength v]\n    else\n        hide variable [speed v]\n        hide variable [jump strength v]\n    end\n    change [speed y v] by (GRAVITY)\n    set [speed x v] to ((speed x) * (Resistance))\n    Move - in steps (([abs v] of (speed y) ) + ([abs v] of (speed x) ))\nend\n\ndefine Move - in steps (steps)\nchange [falling v] by (1)\nrepeat (steps)\n    set [last value v] to (x position)\n    change x by ((speed x) / (steps))\n    if <touching color (#000000)?> then\n        set x to (last value)\n        set [speed x v] to [0]\n    end\n    set [last value v] to (y position)\n    change y by ((speed y) / (steps))\n    if <touching color (#000000)?> then\n        set y to (last value)\n        if <(speed y) < [0]> then\n            set [falling v] to [0]\n        end\n        set [speed y v] to [0]\n    end\nend\n\ndefine Go to start\nset size to (100) %\nif <(LEVEL) = [4]> then\n    go to x: (-170) y: (-75)\nelse\n    if <(LEVEL) = [5]> then\n        go to x: (-210) y: (-40)\n    else\n        if <(LEVEL) = [11]> then\n            go to x: (0) y: (0)\n            set [level v] to [10]\n            switch costume to (well done! v)\n            set size to (200) %\n            stop [all v]\n        else\n            go to x: (-150) y: (-40)\n        end\n    end\nend\n\n
A basic platformer game that I made using this tutorial: https://www.youtube.com/watch?v=D16hTnDGweo\n\nNew version now out: https://scratch.mit.edu/projects/570230528/\n\nInstructions:\nTouch yellow to win\nDon't touch red\nFloat in water\nTouch purple to go smaller\n\nControls:\nWASD or Arrow Keys to move\nPress O to customise jumping and speed\n\nFeel free to remix and edit!