Complete Platformer Engine (92 Blocks)
@Stage\n\n@Player\n\nwhen flag clicked\nswitch backdrop to (level 1 v)\nReset\nforever\n    Run\nend\n\ndefine Run\nrepeat (10)\n    change x by (xvel)\n    if <touching color (#ff0000)?> then\n        Reset\n    end\n    change y by <touching color (#000000)?>\n    if <touching color (#000000)?> then\n        change y by (-1)\n        change x by ((-1) * (xvel))\n    end\n    if <((<key (right arrow v) pressed?> - <key (left arrow v) pressed?>) / (xvel)) < [0]> then\n        change x by (xvel)\n        set [tmp v] to (xvel)\n        if <touching color (#000000)?> then\n            change y by (10)\n            if <touching color (#000000)?> then\n                set [xvel v] to ((-2) * (xvel))\n                set [yvel v] to <key (up arrow v) pressed?>\n            end\n            change y by (-10)\n        end\n        change x by ((-1) * (tmp))\n    end\n    change y by (yvel)\n    if <<touching color (#ff0000)?> or <(y position) < [-178]>> then\n        Reset\n    end\n    if <touching color (#000000)?> then\n        change x by (-1)\n        if <touching color (#000000)?> then\n            change x by (2)\n            if <touching color (#000000)?> then\n                change x by (-1)\n                change y by ((-1) * (yvel))\n                set [yvel v] to (<(yvel) < [0]> * <key (up arrow v) pressed?>)\n            end\n        end\n    end\n    if <touching color (#fd00ff)?> then\n        set [yvel v] to [1.8]\n    end\nend\nset [xvel v] to ((0.75) * ((xvel) + ((0.2) * (<key (right arrow v) pressed?> - <key (left arrow v) pressed?>))))\nchange [yvel v] by (-0.08)\nif <touching color (#10ff00)?> then\n    next backdrop\n    Reset\nend\n\ndefine Reset\nset [xvel v] to [0]\nset [yvel v] to [0]\ngo to x: (-220) y: (-120)\n\nwhen [r v] key pressed\nReset\n\n@Thumbnail\n\nwhen flag clicked\nhide\n\nwhen [t v] key pressed\nThumbnail\n\ndefine Thumbnail\ngo to x: (0) y: (0)\ngo to [front v] layer\nshow\nstop [all v]\n\n