[1 Sprite] Fingerdash Platformer
@Stage\n\n@Game\n\nwhen [timer v] > (Timer)\nif <not <(♡&☆) = [11]>> then\n    broadcast (♡&☆ v)\nend\nforever\n    set [timer v] to (timer)\nend\n\nwhen I receive [shake v]\nswitch costume to (thumbnail v)\ngo to [front v] layer\nset size to (100) %\nshow\ngo to x: (-40) y: (0)\nset [brightness v] effect to (100)\nset [縦 v] to [35]\nset [横 v] to [20]\nrepeat (10)\n    change [brightness v] effect by (-10)\n    change size by (((130) - (size)) / (5))\n    set [縦 v] to (((縦) * (0.75)) + (((0) - (x position)) / (8.5)))\n    set [横 v] to (((横) * (0.75)) + (((0) - (y position)) / (7)))\n    change x by (縦)\n    change y by (横)\nend\nrepeat (20)\n    change size by (((100) - (size)) / (5))\n    set [縦 v] to (((縦) * (0.75)) + (((0) - (x position)) / (8.5)))\n    set [横 v] to (((横) * (0.75)) + (((0) - (y position)) / (5)))\n    change x by (縦)\n    change y by (横)\nend\n\ndefine Collisions (input)\nchange [negative v] by (1)\nrepeat (input)\n    set [value v] to (x position)\n    change x by ((X) / (input))\n    if <<touching color (#254c9d)?> or <touching color (#ffffff)?>> then\n        set x to (Value)\n        set [x v] to [0]\n    end\n    set [value v] to (y position)\n    change y by ((Y) / (input))\n    if <<touching color (#254c9d)?> or <touching color (#ffffff)?>> then\n        set y to (Value)\n        set [y v] to [0]\n        set [negative v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    play sound [Fingerdash v] until done\nend\n\nwhen flag clicked\nhide\nbroadcast (Setup v)\n\nwhen I receive [setup v]\nset [level v] to [1]\nset [gravity v] to [-1]\nset [x v] to [0]\nset [y v] to [0]\nbroadcast (Start Game v)\nbroadcast (New Level v)\n\ndefine Clone Game (clone) Number (number)\nset [clone id v] to (number)\nrepeat (clone)\n    change [clone id v] by (1)\n    create clone of (_myself_ v)\nend\n\nwhen I receive [new level v]\nClone Game (AOI) Number [0]\n\nwhen I start as a clone\nshow\nif <(Clone ID) = [1]> then\n    if <(N) = [0]> then\n        switch costume to (player \(r\) v)\n        go to x: (-152) y: (-41)\n        forever\n            if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>> then\n                if <[5] > (Negative)> then\n                    set [y v] to [12]\n                end\n            end\n            if <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(x position) > (mouse x)>>>> then\n                change [x v] by (-2)\n            end\n            if <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>>> then\n                change [x v] by (2)\n            end\n            set [x v] to ((X) * (0.8))\n            change [y v] by (Gravity)\n            Collisions (([abs v] of (X) ) + ([abs v] of (Y) ))\n            set [playerx v] to (x position)\n            set [playery v] to (y position)\n        end\n    else\n        go to x: (-239) y: ((y position) + (1))\n        switch costume to (player \(r\) v)\n        forever\n            if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > (y position)>>>> then\n                if <[5] > (Negative)> then\n                    set [y v] to [12]\n                end\n            end\n            if <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(x position) > (mouse x)>>>> then\n                change [x v] by (-2)\n            end\n            if <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>>> then\n                change [x v] by (2)\n            end\n            set [x v] to ((X) * (0.8))\n            change [y v] by (Gravity)\n            Collisions (([abs v] of (X) ) + ([abs v] of (Y) ))\n            set [playerx v] to (x position)\n            set [playery v] to (y position)\n        end\n    end\nend\nif <(Clone ID) = [2]> then\n    forever\n        switch costume to (join [Level ] (Level))\n        go to x: (0) y: (-30)\n    end\nend\n\nwhen flag clicked\nset [aoi v] to [2]\n\nwhen I start as a clone\nif <(Clone ID) = [1]> then\n    forever\n        if <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(x position) > (mouse x)>>>> then\n            switch costume to (player \(l\) v)\n        end\n        if <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(mouse x) > (x position)>>>> then\n            switch costume to (player \(r\) v)\n        end\n    end\nend\n\nwhen flag clicked\nforever\n    set [value v] to ([ceiling v] of (Value) )\nend\n\nwhen flag clicked\nset size to (100) %\n\nwhen flag clicked\nset [n v] to [0]\nforever\n    set [timer v] to (timer)\nend\n\nwhen [timer v] > (Timer)\nbroadcast (Shake v)\n\nwhen I start as a clone\nif <(Clone ID) = [1]> then\n    forever\n        if <(x position) > [239]> then\n            go to x: (-239) y: ((y position) + (1))\n            broadcast (Next Level v)\n        end\n        if <<not <(Level) = [1]>> and <[-239] > (x position)>> then\n            go to x: (230) y: ((y position) + (1))\n            broadcast (Back Level v)\n        end\n    end\nend\n\nwhen I receive [next level v]\nchange [level v] by (1)\nchange [level v] by (-0.655)\nset [n v] to [1]\n\nwhen flag clicked\nforever\n    set [level v] to (round (Level))\nend\n\nwhen I start as a clone\nif <(Clone ID) = [1]> then\n    forever\n        if <touching color (#e6e6e6)?> then\n            set [n v] to [0]\n            set [level v] to [1]\n            go to x: (-151) y: (-41)\n        end\n    end\nend\n\nwhen I receive [back level v]\nchange [level v] by (-1)\nchange [level v] by (0.655)\n\nwhen I start as a clone\nif <(Clone ID) = [1]> then\n    forever\n        if <key (space v) pressed?> then\n            go to x: (-152) y: (-41)\n        end\n    end\nend\n\n
Welcome to Fingerdash, a Platformer made in One Sprite!\nMove with WASD, Arrow Keys, or Tap on Mobile\nHope you enjoy ;)\nStuck? Click Space to Respawn!