☁️ Scratch Blocks || Multiplayer Platformer #games #all
@Stage\n\nwhen flag clicked\ndelete all of [tracks order v]\nadd (pick random (1) to (2)) to [tracks order v]\nadd [empty] to [tracks order v]\nif <(item (1) of [tracks order v]) = [1]> then\n    replace item (2) of [tracks order v] with [2]\nelse\n    replace item (2) of [tracks order v] with [1]\nend\nforever\n    play sound (item (1) of [tracks order v]) until done\n    play sound (item (2) of [tracks order v]) until done\nend\n\nwhen [m v] key pressed\nset volume to ((100) - (volume)) %\n\n@u\n\nwhen flag clicked\ngo to [front v] layer\nbroadcast (Setup opponents v) and wait\nset [max players v] to [4]\nset [my player # v] to [0]\ndelete all of [buffer v]\nset [y vel v] to [0]\nset [x vel v] to [0]\nhide\nbroadcast (Setup opponents v) and wait\nswitch backdrop to (joining v)\nbroadcast (Join game v) and wait\ngo to x: (-155) y: (6)\nif <(MY PLAYER #) > [0]> then\n    switch backdrop to (joined v)\nelse\n    switch backdrop to (full v)\n    wait (2.5) seconds\n    stop [all v]\nend\nwait (1.5) seconds\nswitch backdrop to (nothing v)\nbroadcast (Begin v)\nshow\n\ndefine write (string) to encoded\nset [letter # v] to [1]\nrepeat (length of (string))\n    set [encoded v] to (join (encoded) (item # of (letter (letter #) of (string)) in [code v]))\n    change [letter # v] by (1)\nend\nset [encoded v] to (join (encoded) [00])\n\nwhen I receive [begin v]\n\nforever\n    if <(MY PLAYER #) > [0]> then\nend\n\ndefine Set cloud # (player) to (value)\nif <(player) = [1]> then\n    set [☁ p1 v] to (value)\nelse\n    if <(player) = [2]> then\n        set [☁ p2 v] to (value)\n    else\n        if <(player) = [3]> then\n            set [☁ p3 v] to (value)\n        else\n            if <(player) = [4]> then\n                set [☁ p4 v] to (value)\n            end\n        end\n    end\nend\n\ndefine Send cloud data\nset [encoded v] to []\nwrite (username) to encoded\nwrite (round ((timer) * (10))) to encoded\nwrite (x position) to encoded\nwrite (y position) to encoded\nwrite (LEVEL) to encoded\nSet cloud # (MY PLAYER #) to (encoded)\n\nif <(MY PLAYER #) < [1]> then\n    stop [this script v]\nend\n\nchange [cloud timer v] by (1)\nif <(cloud timer) < [3]> then\n    stop [this script v]\nend\nset [cloud timer v] to [0]\nset [encoded v] to []\nwrite (username) to encoded\nwrite ((timer) * (10)) to encoded\n\nSet cloud # (MY PLAYER #) to (encoded)\n\ndefine Player tick\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<(mouse x) > (x position)> and <mouse down?>>> then\n    change [x vel v] by (1)\nend\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<(mouse x) < (x position)> and <mouse down?>>> then\n    change [x vel v] by (-1)\nend\nchange x by (X vel)\nif <touching (idk v)?> then\n    change x by ((-1) * (X vel))\n    set [x vel v] to [0]\nelse\n    set [x vel v] to ((X vel) * (0.8))\nend\nchange y by (Y vel)\nif <touching (idk v)?> then\n    change y by ((-1) * (Y vel))\n    set [y vel v] to [0]\n    if <(lock) = [0]> then\n        if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<(mouse y) > [0]> and <mouse down?>>> then\n            set [y vel v] to [11]\n            set [lock v] to [1]\n        end\n    end\nelse\n    change [y vel v] by (-0.9)\n    set [lock v] to [0]\nend\n\nPlatformer physics\n\ndefine Platformer physics\n\nwhen I receive [death v]\ngo to x: (-170) y: (-40)\n\nwhen I receive [new level v]\ngo to x: (-170) y: (-40)\n\nwhen I receive [begin v]\nset size to (45) %\nforever\n    Send cloud data\n    Player tick\nend\n\nPlatformer physics\n\nchange y by (Y vel)\nif <touching (idk v)?> then\n    repeat ([abs v] of (Y vel) )\n        if <touching (idk v)?> then\n            change y by ((-1) * ((Y vel) / ([abs v] of (Y vel) )))\n        end\n    end\n    if <touching (idk v)?> then\n        change y by (1)\n    end\n    set [y vel v] to [0]\n    if <<<key (up arrow v) pressed?> or <key (w v) pressed?>> or <<(mouse y) > [0]> and <mouse down?>>> then\n        set [y vel v] to [11]\n    end\nelse\n    change [y vel v] by (-1)\nend\nchange x by (X vel)\nif <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<(mouse x) > (x position)> and <mouse down?>>> then\n    change [x vel v] by (1)\nend\nif <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<(mouse x) < (x position)> and <mouse down?>>> then\n    change [x vel v] by (-1)\nend\nif <touching (idk v)?> then\n    repeat ([abs v] of (X vel) )\n        if <touching (idk v)?> then\n            change x by ((-1) * ((X vel) / ([abs v] of (X vel) )))\n        end\n    end\n    if <touching (idk v)?> then\n        change x by (X vel)\n    end\n    set [x vel v] to [0]\nend\nset [x vel v] to ((X vel) * (0.8))\n\n@not u\n\ndefine begin decode of (encoded string)\nset [encoded v] to (encoded string)\nset [letter # v] to [1]\n\ndefine value = read from encoded\nset [value v] to []\nforever\n    set [idx v] to (join (letter (letter #) of (encoded)) (letter ((letter #) + (1)) of (encoded)))\n    change [letter # v] by (2)\n    if <(idX) < [1]> then\n        stop [this script v]\n    end\n    set [value v] to (join (value) (item (idX) of [code v]))\nend\n\ndefine Setup players\nset [color v] effect to (0)\nhide\nset [offline v] to [100]\nset [player # v] to [1]\nrepeat ((MAX PLAYERS) - (1))\n    create clone of (_myself_ v)\n    change [player # v] by (1)\nend\n\nwhen I receive [begin v]\nforever\n    if <(MY PLAYER #) = (Player #)> then\n        set [offline v] to [100]\n        hide\n    else\n        Tick\n    end\nend\n\ndefine value = cloud # (player)\nif <(player) = [1]> then\n    set [value v] to (☁ P1)\nelse\n    if <(player) = [2]> then\n        set [value v] to (☁ P2)\n    else\n        if <(player) = [3]> then\n            set [value v] to (☁ P3)\n        else\n            if <(player) = [4]> then\n                set [value v] to (☁ P4)\n            end\n        end\n    end\nend\n\nwhen I receive [setup opponents v]\nSetup players\n\ndefine Tick\nif <(join [A] (value)) = (last value)> then\n    change [offline v] by (1)\n    if <(offline) = [100]> then\n        hide\n    end\nelse\n    set [last value v] to (join [A] (value))\n    if <(offline) > [99]> then\n        show\n    end\n    set [offline v] to [0]\nend\nbegin decode of (value)\nvalue = read from encoded\nsay (value)\nvalue = read from encoded\nvalue = read from encoded\nset x to (value)\nvalue = read from encoded\nset y to (value)\nvalue = read from encoded\nif <(value) = (LEVEL)> then\n    set [ghost v] effect to (0)\nelse\n    set [ghost v] effect to (100)\n    say []\nend\nvalue = cloud # (Player #)\n\nif <touching (flag v)?> then\n    change [oppo level v] by (1)\nend\n\nwhen I receive [join game v]\nvalue = cloud # (Player #)\nset [last value v] to (join [A] (value))\nwait (3) seconds\nvalue = cloud # (Player #)\nif <(join [A] (value)) = (last value)> then\n    set [my player # v] to (Player #)\nend\n\nwhen flag clicked\nset [oppo global level v] to [1]\nset [oppo level v] to [1]\n\nwhen I receive [begin v]\nforever\n\nwhen I receive [begin v]\n\nwhen flag clicked\nset size to (45) %\nset [opponent level v] to [1]\n\nvalue = cloud # (Player #)\nwait until <not <touching (flag v)?>>\n\n@idk\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\nforever\n    switch costume to (LEVEL)\nend\n\nwhen I receive [begin v]\nshow\n\n@numbthail\n\nwhen flag clicked\nset [ghost v] effect to (100)\ngo to x: (0) y: (0)\ngo to [front v] layer\nswitch costume to (costume2 v)\n\n@flag\n\nwhen flag clicked\nforever\n    switch costume to (LEVEL)\nend\n\nwhen I receive [begin v]\nshow\n\nwhen I receive [begin v]\nshow\n\nwhen flag clicked\nhide\nset [level v] to [1]\ngo to x: (0) y: (0)\nforever\n    if <touching (u v)?> then\n        broadcast (new level v)\n        change [level v] by (1)\n    end\nend\n\nwhen flag clicked\nforever\n    switch costume to (LEVEL)\nend\n\nwhen I receive [begin v]\nshow\n\nchange [opponent level v] by (1)\n\n@text\n\nwhen I receive [begin v]\nshow\n\nwhen flag clicked\nhide\ngo to x: (0) y: (0)\nforever\n    switch costume to (LEVEL)\nend\n\n@bad\n\nwhen flag clicked\nhide\nset [level v] to [1]\ngo to x: (0) y: (0)\nforever\n    if <touching (u v)?> then\n        broadcast (death v)\n    end\nend\n\nwhen flag clicked\nforever\n    switch costume to (LEVEL)\nend\n\nwhen I receive [begin v]\nshow\n\n
☁️ Scratch Blocks - Multiplayer Platformer ☁️\n▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬\nMove with arrow keys or WASD (on mobile: tap the right half to move and jump, tap the left half to move and jump backwards.) There are 10 levels. Avoid lava.  Press M to mute or unmute. Touch the green flag to get to the next level. Play, enjoy, and have more fun by playing with other Scratchers online!\n▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬\nNOTE: You must be a Scratcher (Not a New Scratcher) to play with other people, as New Scratchers don't have access to cloud data.\n\nIf this is full or there is much lag, go to server 2: https://scratch.mit.edu/projects/468833245/\n\nFull screen mode highly recommended!\n\nIf you don't see anyone else it means that nobody is online at this moment!\n\n\n⭐ Notes and Credits ⭐\n\n60% of my credit goes to @griffpatch for the cloud game engine.\n5% of my credit goes to Tobu and Itro for the music.\n20% of my credit goes to you for playing this game and ❤️ + ⭐ it.\n15% of my credit goes to @UnicornMable (me) for the other code and level design.\n\nAnd special thanks to the Scratch Team for the Scratch blocks!\n\nReport any ads please!\n\nWarning: This may be laggy on mobile. Play on pc.\n\nDon't forget to follow @UnicornMable for more ebik games... and maybe propose it to be featured here? https://scratch.mit.edu/studios/4228481/comments/\n\nTags: #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #games #all #all #all #all #all #all #all #all #all #all #all #all #all #all #all #all #all #all #all #all #multiplayer #multiplayer #multiplayer #multiplayer #multiplayer #multiplayer #multiplayer #multiplayer #multiplayer #multiplayer #multiplayer #multiplayer #multiplayer #multiplayer #multiplayer #multiplayer #multiplayer #multiplayer #multiplayer #multiplayer #online #online #online #online #online #online #online #online #online #online #online #online #online #online #online #online #online #online #online #online  #platformer #platformer #platformer #platformer #platformer #platformer #platformer #platformer #platformer #platformer #platformer #platformer #platformer #platformer #platformer #platformer #platformer #platformer #platformer #platformer #UnicornMable #UnicornMable #UnicornMable #UnicornMable #UnicornMable #UnicornMable #UnicornMable #UnicornMable #UnicornMable #U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