Simple Platformer Engine
@Stage\n\n@Sprite1\n\nwhen flag clicked\nset [x motion v] to [0]\nset [y motion v] to [0]\ngo to x: (-214) y: (-110)\nforever\n    if <key (right arrow v) pressed?> then\n        change [x motion v] by (1)\n    end\n    if <key (left arrow v) pressed?> then\n        change [x motion v] by (-1)\n    end\n    set [x motion v] to ((0.9) * (X motion))\n    change x by (X motion)\n    if <touching color (#ff9400)?> then\n        change y by (5)\n        if <touching color (#ff9400)?> then\n            change y by (-5)\n            change x by ((0) - (X motion))\n            set [x motion v] to [0]\n        end\n    end\n    change [y motion v] by (-1)\n    change y by (Y motion)\n    if <touching color (#ff9400)?> then\n        change y by ((0) - (Y motion))\n        set [y motion v] to [0]\n        if <key (up arrow v) pressed?> then\n            set [y motion v] to [10]\n        end\n    end\nend\n\n
Use the left and right arrow keys to move the character around the platforms. Press the up arrow key to jump.\n\n\n\n