Realm-A Platformer#TagInTheTitle#Games#All#Platformer
@Stage\n\n@Blank\n\n@TB\n\nwhen flag clicked\nforever\n    set [ghost v] effect to (100)\n    show\n    go to [front v] layer\nend\n\n@3D\n\nwhen flag clicked\nforever\n    if <(Mouse Movement) = [1]> then\n        change [@rot x v] by ((-.02) * (mouse x))\n        change [@rot y v] by ((0.02) * (mouse y))\n    end\n    if <(Mouse Movement) = [2]> then\n        set [@rot x v] to ((-.8) * (mouse x))\n        set [@rot y v] to ((0.8) * (mouse y))\n    end\nend\n\ndefine Fill Tri (x0) (y0) (x1) (y1) (x2) (y2) (outline)\nset [_tri2 v] to ([sqrt v] of ((((x1) - (x2)) * ((x1) - (x2))) + (((y1) - (y2)) * ((y1) - (y2)))) )\nset [_tri3 v] to ([sqrt v] of ((((x0) - (x2)) * ((x0) - (x2))) + (((y0) - (y2)) * ((y0) - (y2)))) )\nset [_tri4 v] to ([sqrt v] of ((((x0) - (x1)) * ((x0) - (x1))) + (((y0) - (y1)) * ((y0) - (y1)))) )\nset [_tri1 v] to (((_tri2) + ((_tri3) + (_tri4))) / (2))\nset [_tri0 v] to ((2) * ([sqrt v] of ((((_tri1) - (_tri2)) * (((_tri1) - (_tri3)) * ((_tri1) - (_tri4)))) / (_tri1)) ))\nchange [_tri1 v] by (_tri1)\ngo to x: (((((_tri2) * (x0)) + ((_tri3) * (x1))) + ((_tri4) * (x2))) / (_tri1)) y: (((((_tri2) * (y0)) + ((_tri3) * (y1))) + ((_tri4) * (y2))) / (_tri1))\nset pen size to (_tri0)\npen down\nif <(_tri0) > [0]> then\n    if <<(_tri3) < (_tri2)> or <(_tri4) < (_tri2)>> then\n        if <<(_tri2) < (_tri3)> or <(_tri4) < (_tri3)>> then\n            set [_tri1 v] to ((x position) - (x2))\n            set [_tri2 v] to ((y position) - (y2))\n        else\n            set [_tri1 v] to ((x position) - (x1))\n            set [_tri2 v] to ((y position) - (y1))\n        end\n    else\n        set [_tri1 v] to ((x position) - (x0))\n        set [_tri2 v] to ((y position) - (y0))\n    end\n    set [_tri1 v] to (([sqrt v] of (((_tri1) * (_tri1)) + ((_tri2) * (_tri2))) ) / ((_tri0) / (2)))\n    set [_tri8 v] to (((_tri1) * (outline)) / ((_tri1) - (1)))\n    set [_tri1 v] to ((0.5) - ((.5) / (_tri1)))\n    set [_tri2 v] to (((x position) - (x0)) / (_tri0))\n    set [_tri3 v] to (((y position) - (y0)) / (_tri0))\n    set [_tri4 v] to (((x position) - (x1)) / (_tri0))\n    set [_tri5 v] to (((y position) - (y1)) / (_tri0))\n    set [_tri6 v] to (((x position) - (x2)) / (_tri0))\n    set [_tri7 v] to (((y position) - (y2)) / (_tri0))\n    repeat until <(_tri0) < (_tri8)>\n        set [_tri0 v] to ((_tri1) * (_tri0))\n        set pen size to ((_tri0) + (.5))\n        go to x: ((x0) + ((_tri0) * (_tri2))) y: ((y0) + ((_tri0) * (_tri3)))\n        go to x: ((x1) + ((_tri0) * (_tri4))) y: ((y1) + ((_tri0) * (_tri5)))\n        go to x: ((x2) + ((_tri0) * (_tri6))) y: ((y2) + ((_tri0) * (_tri7)))\n        go to x: ((x0) + ((_tri0) * (_tri2))) y: ((y0) + ((_tri0) * (_tri3)))\n    end\nend\nset pen size to (outline)\ngo to x: (x0) y: (y0)\ngo to x: (x1) y: (y1)\ngo to x: (x2) y: (y2)\ngo to x: (x0) y: (y0)\npen up\n\ndefine Fill 3d Tri (x1) (y1) (z1) (x2) (y2) (z2) (x3) (y3) (z3)\nCalc. Player Pos (x1) (y1) (z1) (x2) (y2) (z2) (x3) (y3) (z3)\nCalc. Turn\nif <not <<<(#z1) < [.1]> and <(#z2) < [.1]>> and <(#z3) < [.1]>>> then\n    Z-Clipping\n    Fill Tri ((!FOV) * ((#x1) / (#z1))) ((!FOV) * ((#y1) / (#z1))) ((!FOV) * ((#x2) / (#z2))) ((!FOV) * ((#y2) / (#z2))) ((!FOV) * ((#x3) / (#z3))) ((!FOV) * ((#y3) / (#z3))) [1]\nend\n\ndefine Set Point 3: (x3) (y3) (z3)\nset [#x3 v] to (x3)\nset [#y3 v] to (y3)\nset [#z3 v] to (z3)\n\ndefine Sort Lists\nset [passes v] to [0]\nset [switches v] to [0]\nrepeat until <<(Passes) > [0]> and <(Switches) = [0]>>\n    set [list_item v] to [0]\n    change [passes v] by (1)\n    set [switches v] to [0]\n    repeat ((length of [block distances v]) - (1))\n        change [list_item v] by (1)\n        if <(item ((List_Item) + (1)) of [block distances v]) > (item (List_Item) of [block distances v])> then\n            set [temp v] to (item ((List_Item) + (1)) of [block distances v])\n            replace item ((List_Item) + (1)) of [block distances v] with (item (List_Item) of [block distances v])\n            replace item (List_Item) of [block distances v] with (Temp)\n            set [temp v] to (item ((List_Item) + (1)) of [cube y pos v])\n            replace item ((List_Item) + (1)) of [cube y pos v] with (item (List_Item) of [cube y pos v])\n            replace item (List_Item) of [cube y pos v] with (Temp)\n            set [temp v] to (item ((List_Item) + (1)) of [cube x pos v])\n            replace item ((List_Item) + (1)) of [cube x pos v] with (item (List_Item) of [cube x pos v])\n            replace item (List_Item) of [cube x pos v] with (Temp)\n            set [temp v] to (item ((List_Item) + (1)) of [cube z pos v])\n            replace item ((List_Item) + (1)) of [cube z pos v] with (item (List_Item) of [cube z pos v])\n            replace item (List_Item) of [cube z pos v] with (Temp)\n            set [temp v] to (item ((List_Item) + (1)) of [cube type v])\n            replace item ((List_Item) + (1)) of [cube type v] with (item (List_Item) of [cube type v])\n            replace item (List_Item) of [cube type v] with (Temp)\n            change [switches v] by (1)\n        end\n    end\nend\n\ndefine Distance\ndelete all of [block distances v]\nset [~iii v] to [0]\nrepeat (length of [cube x pos v])\n    change [~iii v] by (1)\n    add (round ([sqrt v] of ((((@Player Z) - (item (~III) of [cube z pos v])) * ((@Player Z) - (item (~III) of [cube z pos v]))) + ((((@Player Y) - (item (~III) of [cube y pos v])) * ((@Player Y) - (item (~III) of [cube y pos v]))) + (((@Player X) - (item (~III) of [cube x pos v])) * ((@Player X) - (item (~III) of [cube x pos v]))))) )) to [block distances v]\nend\n\ndefine Set Point 1: (x1) (y1) (z1)\nset [#x1 v] to (x1)\nset [#y1 v] to (y1)\nset [#z1 v] to (z1)\n\ndefine Set Point 2: (x2) (y2) (z2)\nset [#x2 v] to (x2)\nset [#y2 v] to (y2)\nset [#z2 v] to (z2)\n\ndefine Draw Cube At (x) (y) (z) (platform type)\npen up\nCalculate Trig Values\nif <(platform type) = [platform]> then\n    set pen color to (#1c5dff)\nelse\n    if <(platform type) = [lava]> then\n        set pen color to (#ff1c1c)\n    else\n        if <(platform type) = [trampoline]> then\n            set pen color to (#fff71c)\n        else\n            if <(platform type) = [end]> then\n                set pen color to (#1cff45)\n            end\n        end\n    end\nend\nset pen (brightness v) to (100)\nif <(item (~II) of [block distances v]) > [200]> then\n    change pen (brightness v) by ((() - ((item (~II) of [block distances v]) - (200))) / (8))\nend\nif <(@Player X) > ((x) + (50))> then\n    Fill 3d Tri ((x) + (50)) ((y) + (50)) ((z) + (50)) ((x) + (50)) ((y) + (50)) ((z) + (-50)) ((x) + (50)) ((y) + (-50)) ((z) + (-50))\n    Fill 3d Tri ((x) + (50)) ((y) + (-50)) ((z) + (-50)) ((x) + (50)) ((y) + (-50)) ((z) + (50)) ((x) + (50)) ((y) + (50)) ((z) + (50))\nend\nif <(@Player Z) < ((z) - (50))> then\n    Fill 3d Tri ((x) + (-50)) ((y) + (-50)) ((z) + (-50)) ((x) + (50)) ((y) + (-50)) ((z) + (-50)) ((x) + (50)) ((y) + (50)) ((z) + (-50))\n    Fill 3d Tri ((x) + (50)) ((y) + (50)) ((z) + (-50)) ((x) + (-50)) ((y) + (50)) ((z) + (-50)) ((x) + (-50)) ((y) + (-50)) ((z) + (-50))\nend\nif <(@Player Z) > ((z) + (50))> then\n    Fill 3d Tri ((x) + (-50)) ((y) + (-50)) ((z) + (50)) ((x) + (50)) ((y) + (-50)) ((z) + (50)) ((x) + (50)) ((y) + (50)) ((z) + (50))\n    Fill 3d Tri ((x) + (50)) ((y) + (50)) ((z) + (50)) ((x) + (-50)) ((y) + (50)) ((z) + (50)) ((x) + (-50)) ((y) + (-50)) ((z) + (50))\nend\nif <(@Player X) < ((x) - (50))> then\n    Fill 3d Tri ((x) + (-50)) ((y) + (50)) ((z) + (50)) ((x) + (-50)) ((y) + (50)) ((z) + (-50)) ((x) + (-50)) ((y) + (-50)) ((z) + (-50))\n    Fill 3d Tri ((x) + (-50)) ((y) + (-50)) ((z) + (-50)) ((x) + (-50)) ((y) + (-50)) ((z) + (50)) ((x) + (-50)) ((y) + (50)) ((z) + (50))\nend\nif <(@Player Y) > ((y) + (50))> then\n    Fill 3d Tri ((x) + (50)) ((y) + (50)) ((z) + (-50)) ((x) + (-50)) ((y) + (50)) ((z) + (-50)) ((x) + (-50)) ((y) + (50)) ((z) + (50))\n    Fill 3d Tri ((x) + (-50)) ((y) + (50)) ((z) + (50)) ((x) + (50)) ((y) + (50)) ((z) + (50)) ((x) + (50)) ((y) + (50)) ((z) + (-50))\nend\nif <(@Player Y) < ((x) - (50))> then\n    Fill 3d Tri ((x) + (50)) ((y) + (-50)) ((z) + (-50)) ((x) + (-50)) ((y) + (-50)) ((z) + (-50)) ((x) + (-50)) ((y) + (-50)) ((z) + (50))\n    Fill 3d Tri ((x) + (-50)) ((y) + (-50)) ((z) + (50)) ((x) + (50)) ((y) + (-50)) ((z) + (50)) ((x) + (50)) ((y) + (-50)) ((z) + (-50))\nend\n\ndefine Calculate Trig Values\nset [sin x v] to ([sin v] of (@Rot Y) )\nset [cos x v] to ([cos v] of (@Rot Y) )\nset [sin y v] to ([sin v] of (@Rot X) )\nset [cos y v] to ([cos v] of (@Rot X) )\n\ndefine Turn and Move\nif <<key (w v) pressed?> or <key (up arrow v) pressed?>> then\n    change [@zvel v] by ((2) * (Cos Y))\n    change [@xvel v] by ((-2) * (Sin Y))\nend\nif <<key (s v) pressed?> or <key (down arrow v) pressed?>> then\n    change [@zvel v] by ((-2) * (Cos Y))\n    change [@xvel v] by ((2) * (Sin Y))\nend\nif <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n    change [@zvel v] by ((-2) * (Sin Y))\n    change [@xvel v] by ((-2) * (Cos Y))\nend\nif <<key (d v) pressed?> or <key (right arrow v) pressed?>> then\n    change [@zvel v] by ((2) * (Sin Y))\n    change [@xvel v] by ((2) * (Cos Y))\nend\nchange [@rot x v] by (@Rot X Vel)\nchange [@rot y v] by (@Rot Y Vel)\nif <(@Rot Y) < [-90]> then\n    set [@rot y v] to [-90]\nend\nif <[90] < (@Rot Y)> then\n    set [@rot y v] to [90]\nend\nset [@rot x vel v] to ((@Rot X Vel) * (.7))\nset [@rot y vel v] to ((@Rot Y Vel) * (.7))\n\ndefine Collisions\nset [touching platform? v] to [no]\nset [~i v] to [0]\nrepeat (length of [cube x pos v])\n    change [~i v] by (1)\n    if <<<not <(@Player Y) < ((item (~I) of [cube y pos v]) - (90))>> and <not <(@Player Y) > ((item (~I) of [cube y pos v]) + (130))>>> and <<<not <(@Player Z) < ((item (~I) of [cube z pos v]) - (60))>> and <not <(@Player Z) > ((item (~I) of [cube z pos v]) + (60))>>> and <<not <(@Player X) < ((item (~I) of [cube x pos v]) - (60))>> and <not <(@Player X) > ((item (~I) of [cube x pos v]) + (60))>>>>> then\n        set [item v] to (~I)\n        if <(item (~I) of [cube type v]) = [platform]> then\n            set [touching platform? v] to [yes]\n            stop [this script v]\n        else\n            if <(item (~I) of [cube type v]) = [lava]> then\n                Reset\n                stop [this script v]\n            else\n                if <(item (~I) of [cube type v]) = [trampoline]> then\n                    set [@yvel v] to [30]\n                    stop [this script v]\n                else\n                    if <(item (~I) of [cube type v]) = [end]> then\n                        change [level v] by (1)\n                        Reset\n                        stop [this script v]\n                    end\n                end\n            end\n        end\n    end\nend\n\ndefine Physics\nset [top? v] to [no]\nchange [falling? v] by (1)\nchange [@yvel v] by (-1)\nchange [@player y v] by ([floor v] of (@Yvel) )\nCollisions\nif <(Touching platform?) = [yes]> then\n    Y collision (@Yvel)\nend\nchange [@player z v] by (@Zvel)\nCollisions\nif <(Touching platform?) = [yes]> then\n    Z Collision (@Zvel)\nend\nchange [@player x v] by (@Xvel)\nCollisions\nif <(Touching platform?) = [yes]> then\n    X Collisions (@Xvel)\nend\nset [@zvel v] to ((@Zvel) * (0.7))\nset [@xvel v] to ((@Xvel) * (0.7))\nif <<key (space v) pressed?> and <(Falling?) < [5]>> then\n    set [@yvel v] to [14]\nend\nif <(@Player Y) < [-500]> then\n    Reset\nend\nset [@player y v] to ([floor v] of (@Player Y) )\n\ndefine Y collision (y)\nrepeat until <not <(Touching platform?) = [yes]>>\n    if <(y) > [0]> then\n        change [@player y v] by (-1)\n    else\n        change [@player y v] by (1)\n        set [falling? v] to [0]\n        set [top? v] to [yes]\n    end\n    set [@yvel v] to [0]\n    Collisions\nend\n\ndefine Z Collision (z)\nrepeat until <not <(Touching platform?) = [yes]>>\n    if <(z) > [0]> then\n        change [@player z v] by (-1)\n    else\n        change [@player z v] by (1)\n    end\n    set [@zvel v] to [0]\n    Collisions\nend\n\ndefine X Collisions (x)\nrepeat until <not <(Touching platform?) = [yes]>>\n    if <(x) > [0]> then\n        change [@player x v] by (-1)\n    else\n        change [@player x v] by (1)\n    end\n    set [@xvel v] to [0]\n    Collisions\nend\n\ndefine Reset\nswitch costume to (costume1 v)\nset size to (Infinity) %\nset [!fov v] to [200]\nset [@player x v] to [0]\nset [@player y v] to [300]\nset [@player z v] to [0]\nset [falling? v] to [50]\nset [@yvel v] to [0]\nset [@rot y v] to [0]\nset [@rot x v] to [0]\nset [@rot x vel v] to [0]\nset [@rot y vel v] to [0]\nset [sine v] to [0]\npen up\nGet data\n\nwhen flag clicked\nset [level v] to [1]\nerase all\nReset\nforever\n    Broadcast\n    Broadcast\nend\n\ndefine Get data\ndelete all of [xdif v]\ndelete all of [ydif v]\ndelete all of [zdif v]\ndelete all of [cube y pos v]\ndelete all of [cube x pos v]\ndelete all of [cube z pos v]\ndelete all of [cube type v]\nLevels\n\ndefine Render\nBackdrop\nDistance\nSort Lists\npen up\nset pen size to (2)\nset [~ii v] to [0]\nrepeat (length of [cube x pos v])\n    change [~ii v] by (1)\n    if <(item (~II) of [block distances v]) < [2000]> then\n        Draw Cube At (item (~II) of [cube x pos v]) (item (~II) of [cube y pos v]) (item (~II) of [cube z pos v]) (item (~II) of [cube type v])\n    end\nend\n\ndefine Level design (y) (x) (z) (type)\nadd (x) to [cube y pos v]\nadd (y) to [cube x pos v]\nadd (z) to [cube z pos v]\nadd (type) to [cube type v]\nadd [0] to [xdif v]\nadd [0] to [ydif v]\nadd [0] to [zdif v]\n\ndefine Backdrop\npen up\ngo to x: (0) y: (0)\nset pen color to (#000000)\nset pen size to (1000)\npen down\npen up\n\ndefine Broadcast\nbroadcast (Tick v)\nbroadcast (Tick v)\n\nwhen I receive [tick v]\nBroadcast\nBroadcast\nTick\nBroadcast\nBroadcast\n\ndefine Tick-2\nBroadcast\nBroadcast\nchange [sine v] by (1)\nerase all\npen up\nset pen size to (2)\nGet data\nTurn and Move\nPhysics\nm\nRender\nset [!fps v] to (round ((1) / ((timer) - (Ptimer))))\nset [ptimer v] to (timer)\nBroadcast\nBroadcast\n\ndefine Calc. Player Pos (x1) (y1) (z1) (x2) (y2) (z2) (x3) (y3) (z3)\nSet Point 1: ((x1) - (@Player X)) ((y1) - (@Player Y)) ((z1) - (@Player Z))\nSet Point 2: ((x2) - (@Player X)) ((y2) - (@Player Y)) ((z2) - (@Player Z))\nSet Point 3: ((x3) - (@Player X)) ((y3) - (@Player Y)) ((z3) - (@Player Z))\n\ndefine Calc. Turn\nSet Point 1: (((#z1) * (Sin Y)) + ((#x1) * (Cos Y))) (#y1) (((#z1) * (Cos Y)) - ((#x1) * (Sin Y)))\nSet Point 2: (((#z2) * (Sin Y)) + ((#x2) * (Cos Y))) (#y2) (((#z2) * (Cos Y)) - ((#x2) * (Sin Y)))\nSet Point 3: (((#z3) * (Sin Y)) + ((#x3) * (Cos Y))) (#y3) (((#z3) * (Cos Y)) - ((#x3) * (Sin Y)))\nSet Point 1: (#x1) (((#y1) * (Cos X)) - ((#z1) * (Sin X))) (((#y1) * (Sin X)) + ((#z1) * (Cos X)))\nSet Point 2: (#x2) (((#y2) * (Cos X)) - ((#z2) * (Sin X))) (((#y2) * (Sin X)) + ((#z2) * (Cos X)))\nSet Point 3: (#x3) (((#y3) * (Cos X)) - ((#z3) * (Sin X))) (((#y3) * (Sin X)) + ((#z3) * (Cos X)))\n\ndefine Z-Clipping\nif <(#z1) < [.2]> then\n    set [#z1 v] to [.2]\nend\nif <(#z2) < [.2]> then\n    set [#z2 v] to [.2]\nend\nif <(#z3) < [.2]> then\n    set [#z3 v] to [.2]\nend\n\ndefine Tick\nTick-2\n\ndefine Levels\nif <(level) = [1]> then\n    Level design [0] [0] [0] [Platform]\n    Level design [0] [0] [350] [end]\nend\nif <(level) = [2]> then\n    Level design [0] [0] [0] [platform]\n    Level design [0] [0] [100] [lava]\n    Level design [0] [0] [200] [platform]\n    Level design [0] [0] [300] [lava]\n    Level design [0] [0] [400] [platform]\n    Level design [0] [0] [500] [lava]\n    Level design [0] [0] [600] [end]\nend\nif <(level) = [3]> then\n    Level design [0] [0] [0] [trampoline]\n    Moving platform [0] [500] [100] [0] [-130] [100] [5] [lava]\n    Level design [0] [0] [200] [trampoline]\n    Moving platform [0] [500] [300] [0] [-130] [300] [5] [lava]\n    Level design [0] [0] [400] [trampoline]\n    Moving platform [0] [500] [500] [0] [-130] [500] [5] [lava]\n    Level design [0] [0] [600] [trampoline]\n    Moving platform [0] [500] [700] [0] [-130] [700] [5] [lava]\n    Level design [0] [0] [800] [end]\nend\nif <(level) = [4]> then\n    Level design [0] [0] [0] [platform]\n    Moving platform [0] [100] [100] [0] [-100] [100] [5] [lava]\n    Level design [0] [0] [200] [platform]\n    Moving platform [0] [100] [300] [0] [-100] [300] [5] [lava]\n    Level design [0] [0] [400] [platform]\n    Moving platform [0] [100] [500] [0] [-100] [500] [5] [lava]\n    Level design [0] [0] [600] [platform]\n    Moving platform [0] [100] [700] [0] [-100] [700] [5] [lava]\n    Level design [0] [0] [800] [end]\nend\nif <(level) = [5]> then\n    Level design [0] [0] [0] [platform]\n    Level design [0] [0] [100] [lava]\n    Level design [0] [0] [200] [lava]\n    Level design [0] [0] [300] [lava]\n    Level design [0] [0] [350] [end]\n    Level design [0] [0] [-250] [end]\nend\nif <(level) = [6]> then\n    Level design [0] [0] [0] [platform]\n    Moving platform [-500] [0] [120] [0] [0] [120] [4] [platform]\n    Moving platform [-550] [0] [120] [-550] [500] [120] [4] [platform]\n    Level design [-550] [500] [220] [trampoline]\n    Level design [-550] [750] [600] [end]\nend\nif <(level) = [7]> then\n    Level design [0] [0] [0] [trampoline]\n    Moving platform [-500] [0] [270] [200] [0] [270] [2] [platform]\n    Level design [-500] [0] [370] [platform]\n    Level design [-500] [0] [470] [lava]\n    Level design [-500] [0] [570] [platform]\n    Level design [-500] [0] [670] [lava]\n    Level design [-500] [0] [770] [end]\nend\nif <(level) = [8]> then\n    Level design [0] [0] [0] [trampoline]\n    Level design [200] [0] [350] [trampoline]\n    Level design [-200] [0] [600] [trampoline]\n    Level design [-200] [0] [1070] [trampoline]\n    Level design [-200] [0] [1540] [end]\nend\nif <(level) = [9]> then\n    Level design [0] [0] [0] [platform]\n    Moving platform [0] [0] [100] [500] [0] [100] [2] [trampoline]\n    Level design [500] [0] [200] [platform]\n    Level design [500] [0] [450] [platform]\n    Level design [500] [0] [700] [platform]\n    Level design [500] [0] [950] [platform]\n    Level design [500] [0] [1200] [end]\nend\nif <(level) = [10]> then\n    Level design [0] [0] [0] [platform]\n    Level design [-500] [0] [300] [platform]\n    Level design [-500] [100] [300] [platform]\n    Level design [-500] [200] [300] [platform]\n    Level design [-600] [300] [300] [platform]\n    Level design [-700] [400] [300] [platform]\n    Level design [-400] [300] [300] [platform]\n    Level design [-300] [400] [300] [platform]\n    Level design [-100] [0] [300] [platform]\n    Level design [-100] [100] [300] [platform]\n    Level design [-100] [200] [300] [platform]\n    Level design [0] [200] [300] [platform]\n    Level design [100] [200] [300] [platform]\n    Level design [100] [100] [300] [platform]\n    Level design [100] [0] [300] [platform]\n    Level design [0] [0] [300] [platform]\n    Level design [300] [0] [300] [platform]\n    Level design [300] [100] [300] [platform]\n    Level design [300] [200] [300] [platform]\n    Level design [500] [200] [300] [platform]\n    Level design [500] [100] [300] [platform]\n    Level design [500] [0] [300] [platform]\n    Level design [400] [0] [300] [platform]\n    Level design [400] [100] [0] [platform]\n    Level design [400] [0] [-100] [platform]\n    Level design [400] [100] [-200] [platform]\n    Level design [400] [0] [-300] [platform]\n    Level design [400] [100] [-400] [platform]\n    Level design [400] [100] [-600] [platform]\n    Level design [400] [0] [-600] [platform]\n    Level design [400] [300] [-600] [platform]\n    Level design [100] [0] [-600] [platform]\n    Level design [100] [100] [-600] [platform]\n    Level design [100] [200] [-600] [platform]\n    Level design [100] [300] [-600] [platform]\n    Level design [0] [200] [-600] [platform]\n    Level design [-100] [100] [-600] [platform]\n    Level design [-200] [0] [-600] [platform]\n    Level design [-200] [100] [-600] [platform]\n    Level design [-200] [200] [-600] [platform]\n    Level design [-200] [300] [-600] [platform]\nend\n\ndefine Moving platform (x1) (y1) (z1) (x2) (y2) (z2) (speed) (type)\nadd (type) to [cube type v]\nadd (((((x2) - (x1)) / (2)) * (([sin v] of ((sine) * (speed)) ) + (1))) + (x1)) to [cube x pos v]\nadd (((((y2) - (y1)) / (2)) * (([sin v] of ((sine) * (speed)) ) + (1))) + (y1)) to [cube y pos v]\nadd (((((z2) - (z1)) / (2)) * (([sin v] of ((sine) * (speed)) ) + (1))) + (z1)) to [cube z pos v]\nadd ((((((x2) - (x1)) / (2)) * (([sin v] of ((sine) * (speed)) ) + (1))) + (x1)) - (((((x2) - (x1)) / (2)) * (([sin v] of (((sine) - (1)) * (speed)) ) + (1))) + (x1))) to [xdif v]\nadd ((((((y2) - (y1)) / (2)) * (([sin v] of ((sine) * (speed)) ) + (1))) + (y1)) - (((((y2) - (y1)) / (2)) * (([sin v] of (((sine) - (1)) * (speed)) ) + (1))) + (y1))) to [ydif v]\nadd ((((((z2) - (z1)) / (2)) * (([sin v] of ((sine) * (speed)) ) + (1))) + (z1)) - (((((z2) - (z1)) / (2)) * (([sin v] of (((sine) - (1)) * (speed)) ) + (1))) + (z1))) to [zdif v]\n\ndefine m\nif <(top?) = [yes]> then\n    change [@player x v] by (item (item) of [xdif v])\n    change [@player z v] by (item (item) of [zdif v])\n    change [@player y v] by (item (item) of [ydif v])\nend\n\nwhen I receive [free rewards v]\nif <not <(level) = [10]>> then\n    wait until <key (x v) pressed?>\n    change [level v] by (1)\n    Levels\nend\n\nif <(platform type) = [trampoline]> then\n    set pen color to (#fff71c)\nelse\n    if <(platform type) = [end]> then\n        set pen color to (#1cff45)\n    end\nend\n\n@highscore\n\ndefine encode\nset [leader temp v] to []\nset [random: i v] to [1]\nrepeat until <(random: i) > (length of (leader))>\n    find charcode (letter (random: i) of (leader))\n    set [leader temp v] to (join (LEADER temp) (random: charcode))\n    change [random: i v] by (1)\nend\nset [☁ leader v] to (LEADER temp)\n\nwhen flag clicked\nset [high score me v] to [0]\nforever\n    if <<(level) = [8]> and <(☁ HIGH SCORE) > (timer)>> then\n        set [leader v] to (username)\n        encode\n        set [high score me v] to [0]\n    end\n    decode\nend\n\ndefine find charcode (letter)\nset [random: charcode v] to [1]\nrepeat until <<(letter) = (letter (random: charcode) of (_Chars))> or <(random: charcode) > (length of (_Chars))>>\n    change [random: charcode v] by (1)\nend\nif <(random: charcode) < [10]> then\n    set [random: charcode v] to (join [0] (random: charcode))\nend\n\ndefine decode\nset [leader temp v] to (☁ LEADER)\nset [leader v] to []\nset [random: i v] to [1]\nrepeat until <(random: i) > (length of (LEADER temp))>\n    set [random: charcode v] to (join (letter (random: i) of (LEADER temp)) (letter ((random: i) + (1)) of (LEADER temp)))\n    set [leader v] to (join (leader) (letter (random: charcode) of (_Chars)))\n    change [random: i v] by (2)\nend\n\nwhen flag clicked\nset [_chars v] to [ !"#$%&'\(\)*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz\[\\]^_`{|}~]\n\nwhen flag clicked\n\nset [_chars v] to [0]\n\nwhen flag clicked\nforever\n    decode\nend\n\nwhen flag clicked\nset [high score me v] to [0]\nwait (.5) seconds\nforever\n    if <<(level) = [8]> and <(☁ HIGH SCORE) > (timer)>> then\n        set [☁ high score v] to (timer)\n    end\nend\n\nwhen flag clicked\n\n@Love fave\n\nwhen flag clicked\nset [costume v] to [0]\nhide\nforever\n    if <not <<(LOVED__) = [1]> and <(FAVED___) = [1]>>> then\n        wait (pick random (10) to (30)) seconds\n        switch costume to (costume1 v)\n        go to x: (0) y: (50)\n        show\n        go to [front v] layer\n        start sound [pop v]\n        repeat (9)\n            change y by (-6)\n        end\n        repeat (5)\n            change y by (3)\n        end\n        repeat (5)\n            change y by (-1)\n        end\n        wait (2) seconds\n        repeat (15)\n            change y by (7)\n        end\n        hide\n    end\n    if <(Costume) > [0]> then\n        hide\n        stop [this script v]\n    end\nend\n\nwhen I receive [free rewards v]\nshow\nswitch costume to (costume2 v)\ngo to x: (0) y: (50)\nrepeat (9)\n    change y by (-6)\nend\nrepeat (5)\n    change y by (3)\nend\nrepeat (5)\n    change y by (-1)\nend\nwait (2) seconds\nrepeat (15)\n    change y by (7)\nend\nhide\n\n@Detector\n\nwhen flag clicked\nhide\nset [faved___ v] to [0]\nset [loved__ v] to [0]\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 (1) seconds\nbroadcast (FREE REWARDS v)\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            set [loved__ v] to [1]\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            set [faved___ v] to [1]\n        end\n    end\nend\n\n
　　　　　　　　　PLATFORMER\n\n日本語は下です\n\nEnglish\n▶About this work\n　This is a simple platformer!\n　Please enjoy it!\n\n▶Controls\n　Use arrow keys to control.\n　Tap the direction you want to go to advance the mobile.\n\n　Avoid getting hit by needles and magma!\n\nDifficulty\nPC ★★★☆☆☆☆\nMobile ★★★★\n\nCredits\n　BGM @-xaf-\n　Sound Effects Sound Effects Lab\n\n　日本語\n▶この作品について\n　シンプルなプラットフォーマーです!!\n　ぜひ楽しんでください!!\n\n▶操作方法\n　矢印キーで操作します。\n　モバイルはいきたい方向をタップで進めます\n\n　針やマグマに当たらないようにしてください!\n\n▶難易度\nPC　　　★★★☆☆\nモバイル  ★★★★☆\n\n▶クレジット\n　BGM @-xaf-\n　効果音 効果音ラボ\n　NEXT素材、参考 @goriraf0612\n　背景　@hati32\n　\n　　\n▶tag/タグ\n#game #all #platformer