buttercup platformer parallax test
@Stage\n\nwhen flag clicked\nforever\n    play sound [Hippo Campus - Buttercup v] until done\nend\n\n@buttercup test\n\ndefine run player\nerase all\ngo to x: (0) y: (0)\nswitch costume to (terrain_collision v)\nset size to (100) %\nstamp\nswitch costume to (player_collision v)\nset size to (100) %\nshow\ngo to x: (px) y: (py)\nchange [pyv v] by (-3)\nif <key (up arrow v) pressed?> then\n    if <(ground) = [1]> then\n        set [pyv v] to [17]\n    end\n    if <(wall) = [1]> then\n        set [pyv v] to [10]\n        set [pxv v] to [-20]\n    end\n    if <(wall) = [-1]> then\n        set [pyv v] to [10]\n        set [pxv v] to [20]\n    end\nend\nif <key (right arrow v) pressed?> then\n    change [pxv v] by (3)\nend\nif <key (left arrow v) pressed?> then\n    change [pxv v] by (-3)\nend\nset [pxv v] to ((pxv) * (0.65))\nif <not <(pxv) = [0]>> then\n    change x by (pxv)\n    repeat (5)\n        if <touching color (#000000)?> then\n            change y by (1)\n        end\n    end\n    if <touching color (#000000)?> then\n        change y by (-5)\n    end\n    set [wall v] to [0]\n    if <(pxv) > [0]> then\n        repeat until <not <touching color (#000000)?>>\n            change x by (-1)\n            set [pxv v] to [0]\n            set [wall v] to [1]\n        end\n    else\n        repeat until <not <touching color (#000000)?>>\n            change x by (1)\n            set [pxv v] to [0]\n            set [wall v] to [-1]\n        end\n    end\nend\nif <not <(pyv) = [0]>> then\n    change y by (pyv)\n    set [ground v] to [0]\n    if <(pyv) > [0]> then\n        repeat until <not <touching color (#000000)?>>\n            change y by (-1)\n            set [pyv v] to [0]\n        end\n    else\n        repeat until <not <touching color (#000000)?>>\n            change y by (1)\n            set [pyv v] to [0]\n            set [ground v] to [1]\n        end\n    end\nend\nset [px v] to (x position)\nset [py v] to (y position)\nchange [pø v] by ((pxv) * (3.14159))\n\ndefine None\nerase all\nhide\nswitch costume to (. v)\nset size to (200) %\nswitch costume to (\[\] v)\ngo to x: (0) y: (0)\nswitch costume to (join [buttercup sky back ] ((([floor v] of ((tick) * (0.3)) ) mod (3)) + (1)))\nstamp\nswitch costume to (\[\] v)\ngo to x: ((x) * (0.1)) y: (((y) * (0.1)) + (0))\nswitch costume to (join [buttercup sky front ] ((([floor v] of ((tick) * (0.3)) ) mod (3)) + (1)))\nstamp\nswitch costume to (\[\] v)\ngo to x: ((x) * (0.9)) y: (((y) * (0.9)) + (0))\nswitch costume to (join [buttercup terrain back ] ((([floor v] of ((tick) * (0.3)) ) mod (3)) + (1)))\nstamp\nswitch costume to (\[\] v)\ngo to x: ((x) - ((px) * (-2))) y: (((y) - ((py) * (-2))) - (0))\npoint in direction (pø)\nswitch costume to (player base v)\nstamp\npoint in direction (90)\nswitch costume to (player eyes v)\nstamp\nswitch costume to (\[\] v)\ngo to x: ((x) * (1)) y: (((y) * (1)) + (0))\nswitch costume to (join [buttercup terrain middle ] ((([floor v] of ((tick) * (0.3)) ) mod (3)) + (1)))\nstamp\nswitch costume to (\[\] v)\ngo to x: ((x) * (1.1)) y: (((y) * (1.1)) + (0))\nswitch costume to (join [buttercup terrain front ] ((([floor v] of ((tick) * (0.3)) ) mod (3)) + (1)))\nstamp\n\nset [px v] to [0]\nset [py v] to [1000]\n\nwhen flag clicked\nset [px v] to [-50]\nset [py v] to [180]\nset [pxv v] to [0]\nset [pyv v] to [0]\npoint in direction (90)\nforever\n    detect\n    run player\n    run camera\n    draw (camX) ((camY) + (-180))\n    change [tick v] by (1)\nend\n\ndefine detect\nswitch costume to (. v)\ngo to x: (1000) y: (0)\nif <(x position) = [1000]> then\n    set [?? v] to [0]\nelse\n    set [?? v] to [1]\nend\n\ndefine run camera\nchange [camx v] by ((((px) * (-2)) - (camX)) / (5))\nchange [camy v] by (((((py) * (-2)) + (180)) - (camY)) / (5))\nif <(camY) > [340]> then\n    set [camy v] to [340]\nend\nif <(camX) < [-110]> then\n    set [camx v] to [-110]\nend\nif <(camX) > [110]> then\n    set [camx v] to [110]\nend\n\nchange [tick v] by (1)\n\n
wow this blew up thanks griffpatch haha\nthis is just an art demo, while you're here i have actual games if that's your thing~\nhttps://scratch.mit.edu/projects/263387822/\nhttps://scratch.mit.edu/projects/254511243/\nhttps://scratch.mit.edu/projects/114563396/