Dot Platformer
@Stage\n\n@Sprite2\n\nwhen flag clicked\ngo to x: (0) y: (0)\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nforever\n    if <(Life) = [0]> then\n        wait (0.2) seconds\n        set [life v] to (life level)\n        switch costume to (costume1 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Scene #) = [7]> then\n        play sound [Clapping v] until done\n        set [scene # v] to [0]\n    end\nend\n\nwhen flag clicked\nset [scene # v] to [0]\nset [music v] to [1]\n\nwhen flag clicked\nshow\n\nwhen flag clicked\nhide\nwait (12) seconds\nshow\n\n@Sprite1\n\ndefine handle ground <moving up>\nset [last value v] to (x position)\nrepeat until <not <touching (sprite2 v)?>>\n    if <moving up> then\n        change y by (-5)\n    else\n        change y by (1)\n        set [in air? v] to [0]\n    end\n    set [y vel v] to [0]\nend\n\ndefine walk (steps)\nchange x by (steps)\nset [ground lift v] to [0]\nrepeat until <<not <touching (sprite2 v)?>> or <(Ground Lift) = [8]>>\n    change y by (1)\n    change [ground lift v] by (1)\nend\nif <(Ground Lift) = [8]> then\n    change x by ((-1) * (steps))\n    change y by (-8)\nend\n\nwhen flag clicked\nshow\ngo to x: (-214) y: (-108)\nset rotation style [left-right v]\nset [y vel v] to [0]\nforever\n    Set costume\n    change [y vel v] by (-2)\n    change y by (Y vel)\n    change [in air? v] by (1)\n    handle ground <[0] < (Y vel)>\nend\n\nwhen flag clicked\nset [life level v] to [1]\nset [life v] to (life level)\nset volume to (100) %\n\nwhen flag clicked\nforever\n    if <(Music) = [1]> then\n        set volume to (0) %\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Music) = [0]> then\n        set volume to (100) %\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Music) = [2]> then\n        set [music v] to [0]\n    end\nend\n\ndefine Set costume\nswitch costume to (costume2 v)\nif <touching (sprite2 v)?> then\n    set y to (Last value)\n    if <touching (sprite2 v)?> then\n        set x to (Last value 2)\n    end\nend\nswitch costume to (costume1 v)\n\nwhen I receive [level picked v]\nforever\n    set [last value 2 v] to (x position)\n    if <key (a v) pressed?> then\n        walk [-5]\n    end\n    if <key (d v) pressed?> then\n        walk [5]\n    end\n    if <key (right arrow v) pressed?> then\n        walk [5]\n    end\n    if <key (left arrow v) pressed?> then\n        walk [-5]\n    end\n    if <<<key (w v) pressed?> or <<key (space v) pressed?> or <key (up arrow v) pressed?>>> and <(in air?) < [8]>> then\n        set [y vel v] to [14]\n        start sound [Boing v]\n    end\n    if <<[235] < (x position)> or <(x position) = [235]>> then\n        go to x: (-214) y: (-108)\n        broadcast (Next level v)\n        change [scene # v] by (1)\n    end\n    if <touching (danger sprite v)?> then\n        go to x: (-214) y: (-108)\n        change [life v] by (-1)\n    end\n    if <key (m v) pressed?> then\n        change [music v] by (1)\n    end\nend\n\nwhen flag clicked\nhide\nwait (12) seconds\nshow\n\n@Danger Sprite\n\nwhen flag clicked\nforever\n    go to x: (0) y: (0)\nend\n\nwhen flag clicked\nswitch costume to (costume1 v)\n\nwhen I receive [next level v]\nnext costume\n\nwhen flag clicked\nforever\n    if <(Life) = [0]> then\n        switch costume to (costume1 v)\n    end\nend\n\nwhen flag clicked\nhide\nwait (12) seconds\nshow\n\n@Sprite3\n\nwhen flag clicked\nswitch costume to (button1 v)\nhide\n\nwhen this sprite clicked\nbroadcast (Settings open v)\n\nwhen I receive [level picked v]\nhide\n\nwhen I receive [settings open v]\nhide\n\nwhen I receive [setting closed v]\nshow\n\nwhen I receive [level picked v]\nshow\n\n@Sprite4\n\nwhen flag clicked\nhide\n\nwhen I receive [settings open v]\nshow\n\nwhen I receive [setting closed v]\nhide\n\n@AAMUSIC\n\nwhen flag clicked\nswitch costume to (costume1 v)\nhide\nset [music v] to [1]\n\nwhen this sprite clicked\nwait (0.1) seconds\nnext costume\nchange [music v] by (1)\n\nwhen I receive [setting closed v]\nhide\n\nwhen I receive [settings open v]\nshow\n\nwhen flag clicked\nforever\n    if <(Music) = [2]> then\n        set [music v] to [0]\n    end\nend\n\nwhen flag clicked\nforever\n    if <(Music) = [1]> then\n        start sound [Dance Magic v]\n        set volume to (100) %\n        wait (8.53) seconds\n    else\n        set volume to (0) %\n    end\nend\n\nwhen flag clicked\nset volume to (0) %\nwait (17) seconds\nset volume to (100) %\n\n@Sprite5\n\nwhen flag clicked\nshow\n\nwhen this sprite clicked\nbroadcast (Easy picked v)\nbroadcast (Level picked v)\n\nwhen I receive [easy picked v]\nset [life level v] to [10]\nset [life v] to [10]\nhide\n\nwhen I receive [level picked v]\nhide\n\nwhen flag clicked\nhide\nwait (12) seconds\nshow\n\n@Sprite6\n\nwhen flag clicked\nshow\n\nwhen this sprite clicked\nbroadcast (Medium Picked v)\nbroadcast (Level picked v)\n\nwhen I receive [medium picked v]\nset [life level v] to [5]\nset [life v] to (life level)\nhide\n\nwhen I receive [level picked v]\nhide\n\nwhen flag clicked\nhide\nwait (12) seconds\nshow\n\n@Sprite7\n\nwhen this sprite clicked\nbroadcast (Hard picked v)\nbroadcast (Level picked v)\n\nwhen I receive [hard picked v]\nset [life level v] to [3]\nset [life v] to (life level)\nhide\n\nwhen flag clicked\nshow\n\nwhen I receive [level picked v]\nhide\n\nwhen flag clicked\nhide\nwait (12) seconds\nshow\n\n@Sprite8\n\nwhen this sprite clicked\nbroadcast (HARDCORE PICKED v)\nbroadcast (Level picked v)\n\nwhen flag clicked\nshow\n\nwhen I receive [hardcore picked v]\nset [life level v] to [1]\nset [life v] to (life level)\nhide\n\nwhen I receive [level picked v]\nhide\n\nwhen flag clicked\nhide\nwait (12) seconds\nshow\n\nwhen flag clicked\nhide variable [life v]\nwait (12) seconds\nshow variable [life v]\n\n@Sprite9\n\nwhen this sprite clicked\nbroadcast (Setting Closed v)\n\nwhen flag clicked\nhide\n\nwhen I receive [settings open v]\nshow\n\nwhen I receive [setting closed v]\nhide\n\n@love and like detector\n\nwhen flag clicked\nhide\nset [clone id v] to [0]\ncreate clone of (_myself_ v)\nwait (0.2) seconds\nset [clone id v] to [1]\ncreate clone of (_myself_ v)\nwait until <<(LOVED__) = [1]> and <(FAVED___) = [1]>>\nwait (0.5) seconds\nshow\ngo to x: (0) y: (-100)\nreset timer\nswitch costume to (pick random (1) to (4))\nset [ghost v] effect to (100)\nrepeat until <(timer) > [3.5]>\n    change y by ((y position) / (-15))\n    change [ghost v] effect by (-3)\nend\nreset timer\nrepeat until <(timer) > [3.5]>\n    change y by (((y position) - (-100)) / (-15))\n    change [ghost v] effect by (10)\nend\n\nwhen I start as a clone\nif <(clone id) = [0]> then\n    go to x: (-15) y: (0)\n    set [loved__ v] to [0]\n    switch costume to (love v)\n    forever\n        set [love? v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            wait (0.2) seconds\n            if <touching (mouse-pointer v)?> then\n                set [loved__ v] to [1]\n            end\n        end\n    end\nend\nif <(clone id) = [1]> then\n    go to x: (0) y: (0)\n    switch costume to (fave v)\n    set [faved___ v] to [0]\n    forever\n        set [fav v] to <touching (mouse-pointer v)?>\n        if <touching (mouse-pointer v)?> then\n            wait (0.2) seconds\n            if <touching (mouse-pointer v)?> then\n                set [faved___ v] to [1]\n            end\n        end\n    end\nend\n\n@Intro\n\nwhen I start as a clone\nif <(Clone ID) = [watermark]> then\n    go to [front v] layer\n    show\n    switch costume to (watermark v)\n    set size to (0) %\n    set [watermark v] to [0]\n    set [watermark 2 v] to [0]\n    point in direction (-90)\n    repeat until <<(round (direction)) = [90]> and <<(round (Watermark)) = [0]> and <<(round (Watermark 2)) = [0]> and <(size) = [100]>>>>\n        set [watermark v] to (((Watermark) * (0.8)) + (((100) - (size)) / (5)))\n        set [watermark 2 v] to (((Watermark 2) * (0.8)) + (((90) - (direction)) / (5)))\n        turn right (Watermark 2) degrees\n        change size by (Watermark)\n    end\n    set size to (100) %\n    point in direction (90)\n    smooth glide [0] [196] [50] [4] [1]\nend\n\ndefine Clone (id)\nset [clone id v] to (id)\ncreate clone of (_myself_ v)\n\nwhen I start as a clone\ngo to x: (0) y: (0)\npoint in direction (90)\nset size to (100) %\nclear graphic effects\n\ndefine Chevrons (#) (clone id)\nset [clone id v] to (clone id)\nif <(clone id) = [Chevron1]> then\n    set [var 1 v] to [0]\nelse\n    set [var 1 v] to [-80]\nend\nrepeat (#)\n    create clone of (_myself_ v)\n    change [var 1 v] by (-160)\nend\n\nwhen I receive [sync v]\nif <(Clone ID) = [Chevron1]> then\n    change [var 1 v] by ((80) + ((size) / (20)))\nend\nif <(Clone ID) = [Chevron2]> then\n    change [var 1 v] by ((80) + ((size) / (20)))\nend\nif <(Clone ID) = [BG2]> then\n    set [ghost v] effect to (50)\nend\nif <(Clone ID) = [Chevron3]> then\n    change [var 1 v] by (60)\nend\n\nwhen I receive [end v]\nrepeat (10)\n    change [ghost v] effect by (10)\nend\ndelete this clone\n\nwhen flag clicked\nreset timer\nstart sound [Barlas & Mert - Astronaut in the Ocean \(feat4 v]\nwait until <(timer) > [14]>\nbroadcast (End v)\n\nwhen flag clicked\nset [clone id v] to [0]\nset [var 1 v] to [0]\nset [var 2 v] to [0]\nswitch costume to (name v)\nhide\nwait (4.9) seconds\nClone [BG]\nClone [Name]\nClone [Grid]\nClone [BG2]\nChevrons [7] [Chevron1]\nChevrons [7] [Chevron2]\nChevrons [12] [Chevron3]\n\nwhen I start as a clone\nif <(Clone ID) = [Name]> then\n    switch costume to (name v)\n    set size to (600) %\n    point in direction (-90)\n    show\n    broadcast (Sync v)\n    repeat (1)\n        repeat (20)\n            go to [front v] layer\n            turn right (((90) - (direction)) / (12)) degrees\n            change size by (((200) - (size)) / (12))\n        end\n        change size by (30)\n        broadcast (Sync v)\n    end\n    repeat (1)\n        repeat (22)\n            turn right (((90) - (direction)) / (12)) degrees\n            change size by (((200) - (size)) / (12))\n        end\n        change size by (30)\n        broadcast (Sync v)\n    end\n    repeat (2)\n        repeat (22)\n            turn right (((90) - (direction)) / (12)) degrees\n            change size by (((200) - (size)) / (12))\n        end\n        set size to (230) %\n        broadcast (Sync v)\n    end\n    set [var 1 v] to [90]\n    repeat (3)\n        repeat (22)\n            change [var 1 v] by (((450) - (Var 1)) / (12))\n            point in direction (Var 1)\n            change size by (((200) - (size)) / (12))\n        end\n        set size to (230) %\n        broadcast (Sync v)\n    end\n    repeat (1)\n        repeat (22)\n            change [var 1 v] by (((450) - (Var 1)) / (12))\n            point in direction (Var 1)\n            change size by (((200) - (size)) / (12))\n        end\n    end\nend\n\nwhen I start as a clone\nif <(Clone ID) = [Chevron1]> then\n    set size to (Var 1) %\n    set [brightness v] effect to (0)\n    go [forward v] (4) layers\n    show\n    repeat (1000)\n        switch costume to (circle v)\n        change size by (((Var 1) - (size)) / (4))\n        change [var 1 v] by ((1) + ((size) / (20)))\n        switch costume to (chev2 v)\n    end\nend\n\nwhen I start as a clone\nif <(Clone ID) = [Chevron2]> then\n    set size to (Var 1) %\n    set [brightness v] effect to (0)\n    go [backward v] (([abs v] of ((Var 1) / (160)) ) + (5)) layers\n    show\n    repeat (1000)\n        switch costume to (circle v)\n        change size by (((Var 1) - (size)) / (4))\n        change [var 1 v] by ((1) + ((size) / (20)))\n        switch costume to (chevron v)\n    end\nend\n\nwhen I start as a clone\nif <(Clone ID) = [Grid]> then\n    set size to (144) %\n    switch costume to (grid v)\n    go [forward v] (1) layers\n    show\nend\n\nwhen I start as a clone\nif <(Clone ID) = [BG]> then\n    set size to (100) %\n    switch costume to (bg v)\n    go [backward v] (40) layers\n    show\nend\n\nwhen I start as a clone\nif <(Clone ID) = [BG2]> then\n    switch costume to (bg v)\n    set [brightness v] effect to (100)\n    set [ghost v] effect to (100)\n    go [forward v] (40) layers\n    show\n    repeat (1000)\n        change [ghost v] effect by (3)\n        go to [front v] layer\n    end\nend\n\nwhen I start as a clone\nif <(Clone ID) = [Chevron3]> then\n    set size to (140) %\n    switch costume to (bg v)\n    go to x: (0) y: (((Var 1) * (1.2)) + (220))\n    show\n    go [backward v] (7) layers\n    set [ghost v] effect to (80)\n    repeat (1000)\n        switch costume to (bg v)\n        change y by (((((Var 1) * (1.2)) + (220)) - (y position)) / (4))\n        change [var 1 v] by (4)\n        switch costume to (arrow v)\n    end\nend\n\nwhen I start as a clone\nif <(Clone ID) = [Shutter]> then\n    show\n    set [ghost v] effect to (0)\n    set [brightness v] effect to (0)\n    switch costume to (pos hack v)\n    go to [front v] layer\n    go to x: (480) y: (0)\n    switch costume to (shutter v)\n    repeat (25)\n        switch costume to (size hack v)\n        set size to (100) %\n        switch costume to (pos hack v)\n        change x by (((-350) - (x position)) / (12))\n        go to [front v] layer\n        switch costume to (shutter v)\n    end\nend\n\nwhen flag clicked\nwait until <(timer) > [11]>\nClone [Shutter]\n\ndefine smooth glide (x) (y) (size) (smooth) (ghost)\nset [ghost v] to [0]\nset [watermark v] to (costume [name v])\nif <(size) = (size)> then\n    set [watermark 2 v] to [1]\nelse\n    set [watermark 2 v] to [0]\nend\nrepeat until <<<(round (x position)) = (x)> and <(round (y position)) = (y)>> and <(round (size)) = (size)>>\n    switch costume to (pos hack v)\n    change x by (((x) - (x position)) / (smooth))\n    change y by (((y) - (y position)) / (smooth))\n    switch costume to (Watermark)\n    if <(Watermark 2) = [0]> then\n        change size by (((size) - (size)) / (smooth))\n    end\n    if <(ghost) = [1]> then\n        change [ghost v] by (((100) - (ghost)) / (smooth))\n        set [ghost v] effect to (ghost)\n    end\nend\nswitch costume to (pos hack v)\ngo to x: (x) y: (y)\nset size to (size) %\nswitch costume to (Watermark)\nif <(ghost) = [1]> then\n    hide\nend\n\nwhen I start as a clone\nif <(Clone ID) = [Circle]> then\n    set [brightness v] effect to (0)\n    switch costume to (pos hack v)\n    go to x: (0) y: (200)\n    go to [back v] layer\n    go [forward v] (2) layers\n    switch costume to (circle2 v)\n    set [y vel v] to [-1]\n    show\n    repeat until <(y position) < [-180]>\n        switch costume to (pos hack v)\n        change y by (y vel)\n        switch costume to (circle2 v)\n        change [y vel v] by ((y vel) / (5))\n    end\n    switch costume to (pos hack v)\n    go to x: (0) y: (-240)\n    point in direction (-90)\n    go to [back v] layer\n    go [forward v] (2) layers\n    repeat until <(size) > [4500]>\n        switch costume to (size hack v)\n        change size by (((4501) - (size)) / (10))\n        go to [back v] layer\n        go [forward v] (2) layers\n        switch costume to (circle2 v)\n    end\n    delete this clone\nend\n\nwhen flag clicked\nwait until <(timer) > [3.3]>\nClone [Circle]\n\nwhen I start as a clone\nif <(Clone ID) = [Circle2]> then\n    set [brightness v] effect to (100)\n    switch costume to (pos hack v)\n    go to x: (0) y: (-200)\n    go to [back v] layer\n    go [forward v] (1) layers\n    switch costume to (circle2 v)\n    set [y vel v] to [1]\n    show\n    repeat until <[180] < (y position)>\n        switch costume to (pos hack v)\n        change y by (y vel)\n        switch costume to (circle2 v)\n        change [y vel v] by ((y vel) / (5))\n    end\n    switch costume to (pos hack v)\n    go to x: (0) y: (240)\n    point in direction (-90)\n    go to [back v] layer\n    go [forward v] (1) layers\n    repeat until <(size) > [4500]>\n        switch costume to (size hack v)\n        change size by (((4501) - (size)) / (10))\n        go to [back v] layer\n        go [forward v] (1) layers\n        switch costume to (circle2 v)\n    end\n    delete this clone\nend\n\nwhen flag clicked\nwait until <(timer) > [2.7]>\nClone [Circle2]\n\nwhen I start as a clone\nif <(Clone ID) = [BG111]> then\n    set [brightness v] effect to (0)\n    switch costume to (bg111 v)\n    go to x: (0) y: (0)\n    go to [back v] layer\n    go [backward v] (400) layers\n    set [brightness v] effect to (0)\n    show\n    repeat (20)\n        change [brightness v] effect by (-5)\n        go to [back v] layer\n        go [backward v] (400) layers\n    end\n    repeat until <(timer) > [4.9]>\n        go to [back v] layer\n        go [backward v] (400) layers\n    end\n    delete this clone\nend\n\nwhen flag clicked\nClone [BG111]\n\nwhen I start as a clone\nif <(Clone ID) = [Fractal Burst]> then\n    show\n    switch costume to (fractal burst v)\n    set size to (0) %\n    set [color v] effect to (-20)\n    go to [front v] layer\n    set [color v] effect to (-20)\n    clear graphic effects\n    go to x: (0) y: (0)\n    point in direction (90)\n    set [ghost v] effect to (20)\n    set [brightness v] effect to (20)\n    set [color v] effect to (-20)\n    repeat until <(size) > [1000]>\n        switch costume to (size hack v)\n        set [color v] effect to (-20)\n        set [color v] effect to (-20)\n        go to [front v] layer\n        change size by (50)\n        switch costume to (fractal burst v)\n        set [color v] effect to (-20)\n    end\n    delete this clone\nend\n\nwhen flag clicked\nwait until <(timer) > [4.85]>\nClone [Fractal Burst]\n\nwhen flag clicked\nwait until <(timer) > [9.68]>\nClone [Fractal Burst]\n\nwhen I start as a clone\nif <(Clone ID) = [Fractal Burst 2]> then\n    show\n    switch costume to (fractal burst v)\n    set size to (0) %\n    go to [front v] layer\n    set [color v] effect to (0)\n    clear graphic effects\n    go to x: (0) y: (0)\n    point in direction (90)\n    set [ghost v] effect to (20)\n    set [brightness v] effect to (20)\n    repeat until <(size) > [1000]>\n        switch costume to (size hack v)\n        set [color v] effect to (0)\n        go to [front v] layer\n        change size by (50)\n        switch costume to (fractal burst v)\n    end\n    delete this clone\nend\n\nwhen flag clicked\nwait until <(timer) > [7.2]>\nClone [Fractal Burst 2]\n\nwhen I start as a clone\nwait until <(timer) > [7.2]>\nset [color v] effect to (20)\nwait until <(timer) > [9.75]>\nset [color v] effect to (0)\n\ndefine Particle Physics\nmove ((yv) + (1)) steps\nset [yv v] to ((yv) * (0.95))\nchange x by (xv)\nset [xv v] to ((xv) * (0.8))\nif <([abs v] of (direction) ) < [90]> then\n    turn right (((0) - (direction)) / (30)) degrees\nelse\n    if <(direction) < [0]> then\n        turn right (((-180) - (direction)) / (30)) degrees\n    else\n        turn right (((180) - (direction)) / (30)) degrees\n    end\nend\n\nwhen I start as a clone\nif <(Clone ID) = [Particle]> then\n    go to [front v] layer\n    set size to (50) %\n    switch costume to (join [Particle] (pick random (1) to (4)))\n    show\n    set [brightness v] effect to (b)\n    set [ghost v] effect to (25)\n    go to x: (0) y: (0)\n    point in direction (pick random (-179) to (179))\n    set [xv v] to (pick random (10) to (-10))\n    set [yv v] to (pick random (5) to (15))\n    repeat (50)\n        go to [front v] layer\n        Particle Physics\n        if <touching (_edge_ v)?> then\n            change [ghost v] effect by (10)\n            go to [front v] layer\n        end\n    end\n    if <not <touching (_edge_ v)?>> then\n        repeat (10)\n            go to [front v] layer\n            Particle Physics\n            change [ghost v] effect by (10)\n        end\n    end\n    delete this clone\nend\n\ndefine Particles (amount)\nrepeat (amount)\n    Clone [Particle]\nend\n\nwhen flag clicked\nwait until <(timer) > [4.85]>\nset [b v] to [40]\nParticles [50]\n\nwhen flag clicked\nwait until <(timer) > [7.2]>\nset [b v] to [25]\nParticles [50]\n\nwhen flag clicked\nwait until <(timer) > [9.75]>\nset [b v] to [40]\nParticles [50]\n\nwhen flag clicked\nClone [watermark]\n\nwhen flag clicked\nwait until <(timer) > [11]>\nstart sound [Slice v]\nbroadcast (Start game v)\n\nwhen flag clicked\nif <(timer) = [11]> then\n    broadcast (Start game v)\nend\n\n
wasd or arrow keys to move.\nM to mute.\n\nGoals:\n10/19/22: 100 visits\n10/19/22: front page\n10/21/22: 150 visits\n10/22/22: 500 visits\n11/6/22: 1000 visits\n11/6/22: 1500 visits