Abstract World || Scrolling Platformer || #games #all
@Stage\n\nwhen [m v] key pressed\nset [mouse x, y v] to (join ((mouse x) + (SCROLL X)) (join [, ] ((mouse y) + (SCROLL Y))))\n\n@Blank\n\n@Intro\n\nwhen flag clicked\nset [ended v] to [1]\nbroadcast (Play Game v)\nbroadcast (Start Game v)\n\nhide\nset [color v] effect to (90)\nstart sound [Vexento - Forever v]\nset [my variable v] to [1]\nset [cam rot v] to [0]\nset [size v] to [100]\nset [ended v] to [0]\nset [direction v] to [90]\nset [follow cam v] to [1]\nset [i1 v] to [0]\nswitch costume to (screen v)\ncreate clone of (_myself_ v)\nswitch costume to (square v)\ncreate clone of (_myself_ v)\nswitch costume to (square2 v)\ncreate clone of (_myself_ v)\nswitch costume to (name v)\ncreate clone of (_myself_ v)\nswitch costume to (control v)\ncreate clone of (_myself_ v)\nCam Shake\ngo to [back v] layer\ngo [forward v] (2) layers\nrepeat (3)\n    set [size v] to [0]\n    switch costume to (square v)\n    create clone of (_myself_ v)\n    switch costume to (square2 v)\n    create clone of (_myself_ v)\n    Cam Shake\nend\nrepeat (1)\n    set [size v] to [0]\n    switch costume to (square v)\n    create clone of (_myself_ v)\n    switch costume to (square2 v)\n    create clone of (_myself_ v)\n    repeat (20)\n        change [cam rot v] by (round (((360) - (Cam Rot)) / (4)))\n    end\nend\nCam Shake\n\ndefine Cam Shake\nset [my variable v] to [1]\nset [cam rot v] to [0]\nset [cam shake var v] to [0]\nrepeat (3)\n    change [my variable v] by (((1.2) - (my variable)) / (2))\n    change [cam rot v] by (((8) - (Cam Rot)) / (2))\nend\nrepeat (17)\n    change [my variable v] by (((1) - (my variable)) / (3))\n    set [cam shake var v] to (((Cam Shake Var) * (0.8)) + ((Cam Rot) / (-3)))\n    change [cam rot v] by (Cam Shake Var)\nend\nset [my variable v] to [1]\nset [cam rot v] to [0]\n\nwhen I start as a clone\nshow\nset [costume v] to (costume [number v])\nforever\n    switch costume to (costume)\n    if <((size) * (my variable)) > [100]> then\n        switch costume to (control v)\n    end\n    if <(Follow Cam) = [1]> then\n        set size to ((size) * (my variable)) %\n        go to x: (0) y: (0)\n    else\n        set size to (size) %\n    end\n    switch costume to (costume)\n    point in direction ((Direction) + ((Cam Rot) * <<(Follow Cam) = [1]> and <not <(costume) = [4]>>>))\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [2]> then\n    set [size v] to [0]\n    repeat (20)\n        change [size v] by (round (((100) - (size)) / (4)))\n    end\n    repeat (20)\n        change [size v] by (round (((400) - (size)) / (4)))\n    end\n    repeat (20)\n        change [size v] by (round (((700) - (size)) / (4)))\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [3]> then\n    set [size v] to [0]\n    repeat (20)\n        change [size v] by (round (((100) - (size)) / (4)))\n    end\n    repeat (20)\n        change [size v] by (round (((400) - (size)) / (4)))\n    end\n    repeat (20)\n        change [size v] by (round (((700) - (size)) / (4)))\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [1]> then\n    set [size v] to [200]\n    repeat (10)\n        change [size v] by (round (((100) - (size)) / (4)))\n    end\nend\n\ndefine Line Explosion\ngo to (random position v)\ngo to x: ((x position) * (0.8)) y: ((y position) * (0.6))\nswitch costume to (le1 v)\nset [follow cam v] to [0]\nrepeat (15)\n    create clone of (_myself_ v)\n    change [direction v] by (24)\nend\nset [follow cam v] to [1]\n\nwhen I start as a clone\nif <(costume [number v]) = [6]> then\n    set [size v] to [100]\n    repeat (10)\n        change [costume v] by (1)\n        move (((150) - (i1)) / (3)) steps\n        change [i1 v] by (((150) - (i1)) / (3))\n        wait (0) seconds\n    end\n    delete this clone\nend\n\nwhen I start as a clone\nif <(costume [number v]) = [5]> then\n    repeat (20)\n        set [i1 v] to [0]\n    end\n    repeat (4)\n        Line Explosion\n        repeat (20)\n            set [i1 v] to [0]\n        end\n    end\nend\n\nwhen I start as a clone\nwait until <(Ended) = [1]>\nif <not <(costume [number v]) = [1]>> then\n    delete this clone\nend\nrepeat (30)\n    change [size v] by (((40) - (size)) / (10))\n    change [direction v] by (((80) - (Direction)) / (10))\n    change [ghost v] effect by (3.5)\n    change [brightness v] effect by (10)\nend\ndelete this clone\n\n@PlayerHitbox\n\ndefine Game - Die\nset [exit v] to []\nstart sound [Crunch v]\nswitch costume to (costume4 v)\nrepeat (20)\n    change [ghost v] effect by (5)\nend\nhide\nwait (0.5) seconds\n\ndefine Change Player y by (sy)\nchange [y v] by (sy)\nchange [in air v] by (1)\nPosition\nrepeat until <not <touching (platforms v)?>>\n    if <(sy) > [0]> then\n        change [y v] by (([abs v] of ((sy) / (sy)) ) * (-1))\n        Position\n    else\n        change [y v] by (1)\n        set [in air v] to [0]\n    end\n    Position\n    set [sy v] to [0]\nend\nif <touching (jumpthrough v)?> then\n    if <(sy) < [0]> then\n        change [y v] by ((sy) * (-1))\n        set [sy v] to [0]\n        set [in air v] to [0]\n        Position\n    end\nend\n\ndefine Test - Die\nif <touching (danger v)?> then\n    set [exit v] to [die]\nend\n\ndefine Game - Win\nrepeat (50)\n    point towards (exit v)\n    turn right (65) degrees\n    move ((distance to [exit v]) / (2)) steps\n    change size by (-1)\n    change [ghost v] effect by (2)\nend\nhide\nchange [level v] by (1)\nwait (1) seconds\n\ndefine Change Player x by (sx)\nchange [x v] by (sx)\nPosition\nif <touching (platforms v)?> then\n    repeat (12)\n        change [y v] by (1)\n        Position\n        if <not <touching (platforms v)?>> then\n            stop [this script v]\n        end\n    end\n    change [y v] by (-12)\n    if <<key (up arrow v) pressed?> or <<(mouse y) > [0]> and <mouse down?>>> then\n        if <(sx) > [0]> then\n            set [sx v] to [-16]\n        else\n            set [sx v] to [16]\n        end\n        set [in air v] to [0]\n    else\n        set [sx v] to [0]\n    end\n    repeat until <not <touching (platforms v)?>>\n        if <(sx) > [0]> then\n            change [x v] by (-1)\n        else\n            change [x v] by (1)\n        end\n        Position\n    end\nend\n\ndefine Tick\nset [time v] to ((round ((timer) * (10))) / (10))\nif <<key (left arrow v) pressed?> or <<[0] > (mouse x)> and <mouse down?>>> then\n    change [sx v] by (-2)\nend\nif <<key (right arrow v) pressed?> or <<(mouse x) > [0]> and <mouse down?>>> then\n    change [sx v] by (2)\nend\nset [sx v] to ((sx) * (0.8))\nif <([abs v] of (sx) ) > [0.9]> then\n    Change Player x by (round (sx))\nend\nif <<key (up arrow v) pressed?> or <<(mouse y) > [0]> and <mouse down?>>> then\n    if <(in air) < [4]> then\n        set [sy v] to [16]\n    end\nend\nif <(sy) > [-20]> then\n    change [sy v] by (-2)\nend\nChange Player y by (sy)\nTest - Die\nset [scroll x v] to (x)\nif <(SCROLL X) < [0]> then\n    set [scroll x v] to [0]\nend\nchange [scroll y v] by (round (((y) - (SCROLL Y)) / (10)))\nif <(SCROLL Y) < [0]> then\n    set [scroll y v] to [0]\nend\nPosition\nif <(y) < [-180]> then\n    set [exit v] to [die]\nend\n\ndefine Position\ngo to x: ((x) - (SCROLL X)) y: ((y) - (SCROLL Y))\n\nwhen I receive [play game v]\nset [level v] to [1]\nforever\n    broadcast (Reset v) and wait\n    broadcast (Setup v) and wait\n    Game On\n    repeat until <(EXIT) > []>\n        Tick\n        broadcast (Tick v) and wait\n    end\n    if <(EXIT) = [win]> then\n        Game - Win\n    else\n        Game - Die\n    end\nend\n\nwhen I receive [green flag v]\nhide\ngo to [front v] layer\n\ndefine Game On\nshow variable [points/collected max v]\nshow variable [time v]\nset [sx v] to [0]\nset [sy v] to [0]\nset [in air v] to [0]\nset [exit v] to []\nset rotation style [all around v]\npoint in direction (90)\nset [ghost v] effect to (0)\nset size to (100) %\nshow\nif <(CHECKPOINT) = [0]> then\n    set [x v] to [0]\n    set [y v] to [100]\n    set [scroll x v] to (x)\n    set [scroll y v] to (y)\nelse\n    if <(CHECKPOINT) = [1]> then\n        set [x v] to [1511]\n        set [y v] to [17]\n        set [scroll x v] to (x)\n        set [scroll y v] to (y)\n    else\n        if <(CHECKPOINT) = [2]> then\n            set [x v] to [3200]\n            set [y v] to [10]\n            set [scroll x v] to (x)\n            set [scroll y v] to (y)\n        end\n    end\nend\n\nset [scroll y v] to [0]\nset [scroll x v] to [0]\nset [y v] to [100]\nset [x v] to [0]\n\nwhen I receive [start game v]\nbroadcast (Play Game v) and wait\n\nwhen flag clicked\nhide\nbroadcast (Green Flag v) and wait\n\nwhen I receive [play game v]\nshow\n\nwhen I receive [tick v]\nif <<key (left arrow v) pressed?> or <<(mouse x) < [0]> and <mouse down?>>> then\n    switch costume to (costume2 v)\nelse\n    if <<key (right arrow v) pressed?> or <<[0] < (mouse x)> and <mouse down?>>> then\n        switch costume to (costume1 v)\n    else\n        switch costume to (costume3 v)\n    end\nend\n\nwhen I receive [win v]\nstop [other scripts in sprite v]\n\nwhen I receive [green flag v]\nreset timer\n\n@Platforms\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (level 1 1 v)\nif <(LEVEL) = [1]> then\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [580] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [580] y: [0]\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\n@Collectables\n\nwhen I receive [green flag v]\nhide variable [points/collected max v]\nhide variable [time v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nset [points/collected max v] to (join (POINTS) (join [ / ] (COLLECTED MAX)))\nif <touching (playerhitbox v)?> then\n    change [points v] by (1)\n    if <(POINTS) = (COLLECTED MAX)> then\n        broadcast (Open Portal v)\n    end\n    start sound [Collect v]\n    delete this clone\nend\n\nwhen I receive [setup v]\nhide\nshow variable [points/collected max v]\nshow variable [time v]\nset [collected max v] to [0]\nif <(CHECKPOINT) = [0]> then\n    set [points v] to [0]\nelse\n    if <(CHECKPOINT) = [1]> then\n        set [points v] to [9]\n    else\n        set [points v] to [14]\n    end\nend\nset [x v] to [0]\nset [y v] to [0]\nif <(LEVEL) = [1]> then\n    if <(CHECKPOINT) = [0]> then\n        Clone at x: [151] y: [73]\n        Clone at x: [362] y: [101]\n        Clone at x: [601] y: [85]\n        Clone at x: [1033] y: [96]\n        Clone at x: [1217] y: [21]\n        Clone at x: [1104] y: [425]\n        Clone at x: [1406] y: [237]\n        Clone at x: [1431] y: [137]\n        Clone at x: [1456] y: [37]\n    end\n    if <(CHECKPOINT) < [2]> then\n        Clone at x: [1620] y: [90]\n        Clone at x: [2125] y: [87]\n        Clone at x: [2606] y: [85]\n        Clone at x: [2873] y: [86]\n        Clone at x: [3087] y: [101]\n    end\n    set [collected max v] to [14]\nend\nset [x v] to [-99999]\n\ndefine position (x) (y)\nchange [y v] by ([sin v] of ((timer) * (300)) )\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen I receive [hide v]\nforever\n    hide\nend\n\nset [y v] to [0]\n\nwhen I receive [green flag v]\n\nif  then\n\n@Exit\n\nwhen I receive [green flag v]\nswitch costume to (exit closed v)\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <<(POINTS) = [14]> and <(costume [number v]) = [1]>> then\n    broadcast (Open Portal v)\nend\nif <<(costume [number v]) = [2]> and <touching (playerhitbox v)?>> then\n    set [exit v] to [win]\nend\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (exit closed v)\nif <(LEVEL) = [1]> then\n    Clone at x: [3595] y: [895]\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\nset [x v] to (x)\nset [y v] to (y)\n\nwhen I receive [open portal v]\nswitch costume to (exit open v)\n\nwhen I receive [hide v]\nforever\n    hide\nend\n\nClone at x: [3595] y: [375]\n\n@Danger\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\ngo to [back v] layer\ngo [forward v] (1) layers\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (level 1 1 v)\nif <(LEVEL) = [1]> then\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [120] y: [300]\n    Clone at x: [460] y: [-300]\n    Clone at x: [480] y: [0]\n    Clone at x: [480] y: [0]\n    Clone at x: [580] y: [0]\n    Clone at x: [300] y: [0]\n    Clone at x: [0] y: [525]\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen I receive [hide v]\nforever\n    hide\nend\n\n@PlatformArt\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (level 1 1 v)\nif <(LEVEL) = [1]> then\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [120] y: [300]\n    Clone at x: [460] y: [-300]\n    Clone at x: [480] y: [0]\n    Clone at x: [1060] y: [0]\n    Clone at x: [300] y: [0]\n    Clone at x: [0] y: [525]\nend\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\nwhen I receive [reset v]\ndelete this clone\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nClone at x: [0] y: [240]\n\n@Music\n\nwhen I receive [start game v]\nwait (1) seconds\nforever\n    play sound [Sunshine v] until done\nend\n\n@JumpThrough\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine Clone at x: (x) y: (y)\ncreate clone of (_myself_ v)\nchange [x v] by (x)\nchange [y v] by (y)\nnext costume\n\nwhen I receive [setup v]\nhide\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (level 1 1 v)\nif <(LEVEL) = [1]> then\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [360] y: [0]\n    Clone at x: [120] y: [300]\n    Clone at x: [2300] y: [-300]\n    Clone at x: [0] y: [525]\nend\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nset [ghost v] effect to (100)\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [reset v]\ndelete this clone\n\nClone at x: [360] y: [0]\n\n@Foreground\n\nwhen I receive [tick v]\ngo to [back v] layer\ngo [forward v] (3) layers\nGo to (((((Movement ID) * (480)) - ((SCROLL X) / (4))) mod (960)) - (480)) (Y)\n\nwhen I start as a clone\npoint in direction (90)\nset [ghost v] effect to (0)\ngo to [back v] layer\nset [movement id v] to [0]\nhide\n\ndefine Go to (x) (y)\ngo to x: (x) y: (y)\nif <<(x position) = (x)> and <(y position) = (y)>> then\n    show\nelse\n    hide\nend\n\nwhen flag clicked\ncreate clone of (_myself_ v)\nset [movement id v] to [-1]\nrepeat (1)\n    delete this clone\nend\ncreate clone of (_myself_ v)\nset [movement id v] to [-1]\n\n@Background3\n\nwhen I receive [tick v]\nGo to (((((Movement ID) * (480)) - ((SCROLL X) / (6))) mod (960)) - (480)) (Y)\n\nwhen I start as a clone\npoint in direction (90)\nset [ghost v] effect to (0)\ngo to [back v] layer\nset [movement id v] to [0]\nhide\n\ndefine Go to (x) (y)\ngo to x: (x) y: (y)\nif <<(x position) = (x)> and <(y position) = (y)>> then\n    show\nelse\n    hide\nend\ngo to [back v] layer\n\nwhen flag clicked\ncreate clone of (_myself_ v)\nset [movement id v] to [-1]\nrepeat (1)\n    delete this clone\nend\ncreate clone of (_myself_ v)\nset [movement id v] to [-1]\n\n@Thumbnail\n\nwhen flag clicked\nset [ghost v] effect to (100)\nshow\ngo to [front v] layer\n\nwhen I receive [tick v]\nset [ghost v] effect to (100)\nshow\ngo to [front v] layer\n\n@WinScreen\n\nwhen flag clicked\nwait (1) seconds\nforever\n    if <(EXIT) = [win]> then\n        wait (0.5) seconds\n        go to [front v] layer\n        go [backward v] (1) layers\n        repeat (10)\n            change [ghost v] effect by (-10)\n        end\n        broadcast (Win v)\n        stop [this script v]\n    end\nend\n\nwhen I receive [tick v]\nshow\nset [ghost v] effect to (100)\ngo to [front v] layer\ngo [backward v] (1) layers\n\n\n\n@Checkpoint\n\nwhen I receive [green flag v]\nhide\n\nwhen I receive [tick v]\nposition ((x) - (SCROLL X)) ((y) - (SCROLL Y))\nif <(costume [number v]) = [1]> then\n    if <<touching (playerhitbox v)?> and <<<(POINTS) = [9]> and <(CHECKPOINT) = [0]>> or <<(POINTS) = [14]> and <(CHECKPOINT) = [1]>>>> then\n        start sound [Wand v]\n        switch costume to (open v)\n        change [checkpoint v] by (1)\n    end\nend\ngo to [back v] layer\ngo [forward v] (4) layers\n\ndefine position (x) (y)\ngo to x: (x) y: (y)\nif <<(x) = (x position)> and <(y) = (y position)>> then\n    show\nelse\n    hide\nend\n\ndefine Clone at (x) (y)\nset [x v] to (x)\nset [y v] to (y)\ncreate clone of (_myself_ v)\n\nwhen flag clicked\nhide\nset [checkpoint v] to [0]\nset [x v] to [0]\nset [y v] to [0]\nswitch costume to (closed v)\nClone at [1536] [17]\nClone at [3225] [20]\nset [x v] to [-99999]\n\n
NEW GAME!!!\nhttps://scratch.mit.edu/projects/639881234/\n\n♦ Abstract World ♦\n♦ Scrolling Platformer ♦\n♦ #games #all ♦\n\n♦ Instructions ♦\nArrow keys to move\nMobile: Touch to move\nWelcome to abstract world! Make your way through the foliage, treasures, and dangers of this strange place. Can you make it to the end?