2.5d platformer engine (remixable)
@Stage\n\n@Sprite2\n\nwhen flag clicked\nset [scrolly v] to [0]\nset [scrollx v] to [0]\nset [fd v] to [0]\ngo to x: (0) y: (0)\nset [yvel v] to [0]\n\ndefine land\nset [up v] to [0]\nrepeat until <<not <touching (hitbox v)?>> or >\n    change y by ((0) - ((yvel) / ([abs v] of (yvel) )))\n    change [up v] by (1)\nend\nset [yvel v] to [0]\n\ndefine wall\nchange x by ((xvel) / ([abs v] of (xvel) ))\nrepeat (8)\n    change y by (1)\n    if <not <touching (hitbox v)?>> then\n        stop [this script v]\n    end\nend\nchange y by (-8)\nchange y by (0)\nset [up v] to [0]\nrepeat until \n    change x by ((0) - ((xvel) / ([abs v] of (xvel) )))\n    change [up v] by (1)\nend\nif <key (up arrow v) pressed?> then\n    set [yvel v] to [13]\n    set [xvel v] to ((0) - (((xvel) / ([abs v] of (xvel) )) * (10)))\nelse\n    set [xvel v] to [0]\nend\n\nwhen I receive [message1 v]\nchange [fd v] by (1)\nchange [yvel v] by (-1)\nchange y by (yvel)\nif <touching (hitbox v)?> then\n    if <(yvel) < [0]> then\n        set [fd v] to [0]\n    end\n    land\nend\nif <<key (up arrow v) pressed?> and <(fd) < [6]>> then\n    set [yvel v] to [12]\nend\nset [xvel v] to ((xvel) * (0.9))\nif <key (right arrow v) pressed?> then\n    change [xvel v] by (1)\nend\nif <key (left arrow v) pressed?> then\n    change [xvel v] by (-1)\nend\nchange x by (round (xvel))\nif <touching (hitbox v)?> then\n    wall\nend\nchange [scrolly v] by ((y position) - (0))\nchange [scrollx v] by (x position)\nset y to (0)\nset x to (0)\n\n@platforms\n\nwhen flag clicked\nforever\n    erase all\n    switch costume to (costume1 v)\n    set size to (9999) %\n    switch costume to (costume1 v)\n    go to x: ((0) - (scrollx)) y: ((0) - (scrolly))\n    xy\n    set size to (100) %\n    set [brightness v] effect to (-61)\n    stamp\n    change [brightness v] effect by (0)\n    broadcast (message1 v)\nend\n\ndefine stamp\nrepeat (16)\n    stamp\n    change [brightness v] effect by (2)\n    set size to ((size) * (1.01)) %\n    set x to ((x position) * (1.01))\n    set y to ((y position) * (1.01))\nend\nset [bot c v] to (x position)\nset [skin b v] to (y position)\nset [skin c v] to (size)\nrepeat (17)\n    stamp\n    change [brightness v] effect by (2)\n    set size to ((size) * (1.01)) %\n    set x to ((x position) * (1.01))\n    set y to ((y position) * (1.01))\nend\n\nmove (10) steps\n\ndefine xy\nrepeat (16)\n    set x to ((x position) / (1.01))\n    set y to ((y position) / (1.01))\nend\n\n@hitbox\n\nwhen flag clicked\nforever\n    switch costume to (cheat v)\n    set size to (9999) %\n    switch costume to (costume1 v)\n    go to x: ((0) - (scrollx)) y: ((0) - (scrolly))\n    change y by (0)\n    set size to (116) %\n    set [ghost v] effect to (100)\nend\n\n
Arrow keys to move, this is an engine, not a full game.\nPlease don't comment that you can fall forehttps://scratch.mit.edu/mystuff/ver. This is just an engine. I didn't know if the people who were going to remix this would actually want you to die if you fell, and it's quite simple to add.