3D platformer online                                                           #games #all
@Stage\n\n@3D Engine\n\nset pen color to (#1cde3f)\nset [-x v] to ((x) - (0))\nset [-y v] to ((y) - (0))\nset [-z v] to ((z) - (0))\nset [+x v] to ((x) - (0))\nset [+y v] to ((y) - (0))\nset [+z v] to ((z) - (0))\n\nadd ([sqrt v] of ((((CAM X) - (player x)) * ((CAM X) - (player x))) + ((((CAM Y) - (player y)) * ((CAM Y) - (player y))) + (((CAM Z) - (player z)) * ((CAM Z) - (player z))))) ) to [distance v]\n\ndelete (1) of [distance v]\n\nposition [80] [100] [50] block [other player]\n\ncubo relleno [] [] [] modo []\n\ndefine online\nrepeat until <not <[modo v] contains [other player]?>>\n    delete (item # of [other player] in [modo v]) of [x v]\n    delete (item # of [other player] in [modo v]) of [y v]\n    delete (item # of [other player] in [modo v]) of [z v]\n    delete (item # of [other player] in [modo v]) of [modo v]\nend\nset [player n# v] to [1]\nrepeat (5)\n    if <<(item (player n#) of [player hors ligne? v]) = [actif]> and <(item (player n#) of [level player online v]) = (-level)>> then\n        position (item (player n#) of [x player online v]) (item (player n#) of [y player online v]) (item (player n#) of [z player online v]) block [other player]\n    end\n    change [player n# v] by (1)\nend\n\ndefine fill (ax) (ay) (bx) (by) (cx) (cy) resolution: (res)\nset [lena v] to ([sqrt v] of ((((bx) - (cx)) * ((bx) - (cx))) + (((by) - (cy)) * ((by) - (cy)))) )\nset [lenb v] to ([sqrt v] of ((((ax) - (cx)) * ((ax) - (cx))) + (((ay) - (cy)) * ((ay) - (cy)))) )\nset [lenc v] to ([sqrt v] of ((((ax) - (bx)) * ((ax) - (bx))) + (((ay) - (by)) * ((ay) - (by)))) )\nset [peri v] to ((1) / (((lena) + (lenb)) + (lenc)))\nset [incx v] to (((((lena) * (ax)) + ((lenb) * (bx))) + ((lenc) * (cx))) * (peri))\nset [incy v] to (((((lena) * (ay)) + ((lenb) * (by))) + ((lenc) * (cy))) * (peri))\nset [ind v] to ([sqrt v] of ((((((lenb) + (lenc)) - (lena)) * (((lenc) + (lena)) - (lenb))) * (((lena) + (lenb)) - (lenc))) * (peri)) )\nset [aox v] to ((incx) - (ax))\nset [aoy v] to ((incy) - (ay))\nset [box v] to ((incx) - (bx))\nset [boy v] to ((incy) - (by))\nset [cox v] to ((incx) - (cx))\nset [coy v] to ((incy) - (cy))\nif <<(lena) < (lenb)> and <(lena) < (lenc)>> then\n    set [td v] to ([sqrt v] of (((Aox) * (Aox)) + ((Aoy) * (Aoy))) )\nelse\n    if <<(lenb) > (lena)> or <(lenb) > (lenc)>> then\n        set [td v] to ([sqrt v] of (((Cox) * (Cox)) + ((Coy) * (Coy))) )\n    else\n        set [td v] to ([sqrt v] of (((Box) * (Box)) + ((Boy) * (Boy))) )\n    end\nend\nset [rate v] to ((((td) * (2)) - (ind)) / ((td) * (4)))\nset [td v] to ((1) + (rate))\ngo to x: (round (incx)) y: (round (incy))\nset pen size to (ind)\npen down\nrepeat ([ceiling v] of (([log v] of ((res) / (ind)) ) / ([log v] of (rate) )) )\n    set [td v] to ((td) * (rate))\n    set pen size to ((ind) * (td))\n    go to x: (((Aox) * (td)) + (ax)) y: (((Aoy) * (td)) + (ay))\n    go to x: (((Box) * (td)) + (bx)) y: (((Boy) * (td)) + (by))\n    go to x: (((Cox) * (td)) + (cx)) y: (((Coy) * (td)) + (cy))\n    go to x: (((Aox) * (td)) + (ax)) y: (((Aoy) * (td)) + (ay))\nend\nset pen size to (res)\ngo to x: (ax) y: (ay)\ngo to x: (bx) y: (by)\ngo to x: (cx) y: (cy)\ngo to x: (ax) y: (ay)\npen up\n\nwhen flag clicked\nbroadcast (connexion?... v)\nset [-level v] to [1]\nreset\nforever\n    erase all\n    change [fps_2 v] by (1)\n    online\n    mover\n    dibujar\n    player\nend\n\ndefine point 1 (x1) (y1) (z1)\nset [x1 v] to (x1)\nset [y1 v] to (y1)\nset [z1 v] to (z1)\n\ndefine point 2 (x2) (y2) (z2)\nset [x2 v] to (x2)\nset [y2 v] to (y2)\nset [z2 v] to (z2)\n\ndefine dibujar\nCalcular valores trig.\nadd distances\nsort\nset [@yo v] to (length of [distance v])\nrepeat (length of [distance v])\n    if <(item (@YO) of [distance v]) < [1100]> then\n        cubo relleno (item (@YO) of [x v]) (item (@YO) of [y v]) (item (@YO) of [z v]) modo (item (@YO) of [modo v])\n    end\n    change [@yo v] by (-1)\nend\ndelete (item # of [player] in [modo v]) of [x v]\ndelete (item # of [player] in [modo v]) of [y v]\ndelete (item # of [player] in [modo v]) of [z v]\ndelete (item # of [player] in [modo v]) of [modo v]\n\ndefine Calcular valores trig.\nset [sin x v] to ([sin v] of (ROT X) )\nset [cos x v] to ([cos v] of (ROT X) )\nset [sin y v] to ([sin v] of (ROT Y) )\nset [cos y v] to ([cos v] of (ROT Y) )\n\ndefine position (x) (y) (z) block (modo)\nadd (x) to [x v]\nadd (y) to [y v]\nadd (z) to [z v]\nadd (modo) to [modo v]\nif <(modo) = [ground]> then\n    add (((x) * (100)) - (50)) to [ground v]\n    add (((y) * (100)) - (50)) to [ground v]\n    add (((z) * (100)) - (50)) to [ground v]\n    add (((x) * (100)) - (-50)) to [ground v]\n    add (((y) * (100)) - (-50)) to [ground v]\n    add (((z) * (100)) - (-50)) to [ground v]\nelse\n    if <(modo) = [bounce]> then\n        add (((x) * (100)) - (50)) to [bounce v]\n        add (((y) * (100)) - (50)) to [bounce v]\n        add (((z) * (100)) - (50)) to [bounce v]\n        add (((x) * (100)) - (-50)) to [bounce v]\n        add (((y) * (100)) - (-50)) to [bounce v]\n        add (((z) * (100)) - (-50)) to [bounce v]\n    else\n        if <(modo) = [lava]> then\n            add (((x) * (100)) - (50)) to [lava v]\n            add (((y) * (100)) - (50)) to [lava v]\n            add (((z) * (100)) - (50)) to [lava v]\n            add (((x) * (100)) - (-50)) to [lava v]\n            add (((y) * (100)) - (-50)) to [lava v]\n            add (((z) * (100)) - (-50)) to [lava v]\n        else\n            if <(modo) = [end]> then\n                add (((x) * (100)) - (50)) to [end v]\n                add (((y) * (100)) - (50)) to [end v]\n                add (((z) * (100)) - (50)) to [end v]\n                add (((x) * (100)) - (-50)) to [end v]\n                add (((y) * (100)) - (-50)) to [end v]\n                add (((z) * (100)) - (-50)) to [end v]\n            else\n                if <(modo) = [pierre]> then\n                    add (((x) * (100)) - (50)) to [ground v]\n                    add (((y) * (100)) - (50)) to [ground v]\n                    add (((z) * (100)) - (50)) to [ground v]\n                    add (((x) * (100)) - (-50)) to [ground v]\n                    add (((y) * (100)) - (-50)) to [ground v]\n                    add (((z) * (100)) - (-50)) to [ground v]\n                end\n            end\n        end\n    end\nend\n\ndefine fill 3D tri (x1) (y1) (z1) (x2) (y2) (z2) (x3) (y3) (z3)\nxyz SetUp (x1) (y1) (z1)\npoint 1 (x3) (y3) (z3)\nxyz SetUp (x2) (y2) (z2)\npoint 2 (x3) (y3) (z3)\nxyz SetUp (x3) (y3) (z3)\nif <not <<(z1) < (plano cercano)> and <<(z2) < (plano cercano)> and <(z3) < (plano cercano)>>>> then\n    if <(z1) < (plano cercano)> then\n        set [z1 v] to (plano cercano)\n    end\n    if <(z2) < (plano cercano)> then\n        set [z2 v] to (plano cercano)\n    end\n    if <(z3) < (plano cercano)> then\n        set [z3 v] to (plano cercano)\n    end\n    set [-1 v] to ((TAMAÑO) * ((1) / (z1)))\n    set [-2 v] to ((TAMAÑO) * ((1) / (z2)))\n    set [-3 v] to ((TAMAÑO) * ((1) / (z3)))\n    fill ((x1) * (-1)) (((y1) * (-1)) * (1)) ((x2) * (-2)) (((y2) * (-2)) * (1)) ((x3) * (-3)) ((y3) * (-3)) resolution: (5)\nend\n\ndefine xyz SetUp (x) (y) (z)\npoint 3 ((x) - (CAM X)) [] ((z) - (CAM Z))\npoint 3 (((x3) * (Cos Y)) + ((z3) * (Sin Y))) ((y) - (CAM Y)) (((z3) * (Cos Y)) - ((x3) * (Sin Y)))\npoint 3 (x3) ((((y3) * (0.9)) * (Cos X)) - ((z3) * (Sin X))) ((((y3) * (0.9)) * (Sin X)) + ((z3) * (Cos X)))\n\ndefine point 3 (x) (y) (z)\nset [x3 v] to (x)\nset [y3 v] to ((y) + (-20))\nset [z3 v] to (z)\n\ndefine rect (x1) (y1) (z1) (x2) (y2) (z2) res. (res)\nfill 3D tri (x1) (y1) (z1) (x1) (y2) (z2) (x2) (y2) (z2)\nfill 3D tri (x1) (y1) (z1) (x2) (y2) (z1) (x2) (y2) (z2)\n\ndefine cubo relleno (x) (y) (z) modo (modo)\nif <(modo) = [other player]> then\n    set pen color to (#1000ff)\nelse\n    if <(modo) = [ground]> then\n        set pen color to (#b56900)\n    else\n        if <(modo) = [bounce]> then\n            set pen color to (#eeff00)\n        else\n            if <(modo) = [lava]> then\n                set pen color to (#ff1818)\n            else\n                if <(modo) = [end]> then\n                    set pen color to (#ffffff)\n                else\n                    if <(modo) = [pierre]> then\n                        set pen color to (#8b8b8b)\n                    end\n                end\n            end\n        end\n    end\nend\nif <(modo) = [other player]> then\n    set [-x v] to ((x) - (50))\n    set [-y v] to ((y) - (50))\n    set [-z v] to ((z) - (50))\n    set [+x v] to ((x) - (-50))\n    set [+y v] to ((y) - (-50))\n    set [+z v] to ((z) - (-50))\nelse\n    set [-x v] to (((x) * (100)) - (50))\n    set [-y v] to (((y) * (100)) - (50))\n    set [-z v] to (((z) * (100)) - (50))\n    set [+x v] to (((x) * (100)) - (-50))\n    set [+y v] to (((y) * (100)) - (-50))\n    set [+z v] to (((z) * (100)) - (-50))\nend\nchange pen (brightness v) by (10)\nif <(CAM X) > (+x)> then\n    fill 3D tri (+x) (+y) (+z) (+x) (+y) (-z) (+x) (-y) (-z)\n    fill 3D tri (+x) (+y) (+z) (+x) (-y) (+z) (+x) (-y) (-z)\nend\nchange pen (brightness v) by (-10)\nif <(CAM Z) > (+z)> then\n    fill 3D tri (+x) (+y) (+z) (+x) (-y) (+z) (-x) (-y) (+z)\n    fill 3D tri (+x) (+y) (+z) (-x) (+y) (+z) (-x) (-y) (+z)\nend\nchange pen (brightness v) by (-15)\nif <(-x) > (CAM X)> then\n    fill 3D tri (-x) (+y) (+z) (-x) (+y) (-z) (-x) (-y) (-z)\n    fill 3D tri (-x) (+y) (+z) (-x) (-y) (+z) (-x) (-y) (-z)\nend\nchange pen (brightness v) by (15)\nif <(-z) > (CAM Z)> then\n    fill 3D tri (+x) (+y) (-z) (+x) (-y) (-z) (-x) (-y) (-z)\n    fill 3D tri (+x) (+y) (-z) (-x) (+y) (-z) (-x) (-y) (-z)\nend\nchange pen (brightness v) by (-25)\nif <(-y) > (CAM Y)> then\n    rect (-x) (-y) (-z) (+x) (-y) (+z) res. [1]\nend\nchange pen (brightness v) by (50)\nchange pen (saturation v) by (-5)\nif <(CAM Y) > (+y)> then\n    if < and <(modo) = [ground]>> then\n        set pen color to (#1cde40)\n    end\n    rect (-x) (+y) (-z) (+x) (+y) (+z) res. [1]\nend\nchange pen (saturation v) by (5)\n\nset pen color to (#2830ff)\n\ndefine mover\nif <(Souris?) = [0]> then\n    change [rot x v] by ((3) * (<key (up arrow v) pressed?> - <key (down arrow v) pressed?>))\n    change [rot y v] by ((-3) * (<key (right arrow v) pressed?> - <key (left arrow v) pressed?>))\nelse\n    change [rot x v] by ((1) * ((mouse y) - (souris y)))\n    change [rot y v] by ((-1) * ((mouse x) - (sourisx)))\nend\nif <(ROT X) < [-90]> then\n    set [rot x v] to [-90]\nend\nif <[90] < (ROT X)> then\n    set [rot x v] to [90]\nend\nset [sourisx v] to (mouse x)\nset [souris y v] to (mouse y)\n\ndefine add distances\ndelete all of [distance v]\nset [-i v] to [0]\nrepeat (length of [x v])\n    change [-i v] by (1)\n    if <not <(item (-i) of [modo v]) = [other player]>> then\n        add ([sqrt v] of ((((CAM X) - ((item (-i) of [x v]) * (100))) * ((CAM X) - ((item (-i) of [x v]) * (100)))) + ((((CAM Y) - ((item (-i) of [y v]) * (100))) * ((CAM Y) - ((item (-i) of [y v]) * (100)))) + (((CAM Z) - ((item (-i) of [z v]) * (100))) * ((CAM Z) - ((item (-i) of [z v]) * (100)))))) ) to [distance v]\n    else\n        add (([sqrt v] of ((((CAM X) - ((item (-i) of [x v]) * (1))) * ((CAM X) - ((item (-i) of [x v]) * (1)))) + ((((CAM Y) - ((item (-i) of [y v]) * (1))) * ((CAM Y) - ((item (-i) of [y v]) * (1)))) + (((CAM Z) - ((item (-i) of [z v]) * (1))) * ((CAM Z) - ((item (-i) of [z v]) * (1)))))) ) - (50)) to [distance v]\n    end\nend\nadd (player x) to [x v]\nadd (player y) to [y v]\nadd (player z) to [z v]\nadd [player] to [modo v]\n\ndefine sort\nset [--lenght v] to (length of [distance v])\nrepeat until <(--lenght) = [1]>\n    set [--highest v] to [1]\n    set [--i v] to [0]\n    repeat (--lenght)\n        change [--i v] by (1)\n        if <(item (--i) of [distance v]) > (item (--highest) of [distance v])> then\n            set [--highest v] to (--i)\n        end\n    end\n    add to sorting\nend\n\nwhen flag clicked\nforever\n    wait (1) seconds\n    set [fps v] to (fps_2)\n    set [fps_2 v] to [0]\nend\n\ndefine create level\ndelete all of [ground v]\ndelete all of [bounce v]\ndelete all of [lava v]\ndelete all of [end v]\ndelete all of [x v]\ndelete all of [y v]\ndelete all of [z v]\ndelete all of [modo v]\nposition [0] [0] [0] block [ground]\nif <(-level) = [1]> then\n    position [0] [0] [1] block [ground]\n    position [1] [0] [1] block [ground]\n    position [1] [0] [1] block [ground]\n    position [0] [0] [-1] block [ground]\n    position [1] [0] [-1] block [ground]\n    position [-1] [0] [-1] block [ground]\n    position [1] [0] [0] block [ground]\n    position [-1] [0] [0] block [ground]\n    position [-1] [0] [1] block [ground]\n    position [-1] [1] [1] block [ground]\n    position [-1] [1] [3] block [ground]\n    position [-1] [1] [6] block [ground]\n    position [-1] [6] [10] block [ground]\n    position [-1] [2] [9] block [bounce]\n    position [-1] [7] [11] block [lava]\n    position [-1] [6] [13] block [ground]\n    position [-1] [6] [11] block [pierre]\n    position [-1] [6] [12] block [ground]\n    position [-3] [6] [14] block [ground]\n    position [-4] [6] [14] block [ground]\n    position [-5] [6] [14] block [ground]\n    position [-6] [6] [14] block [ground]\n    position [-5] [8] [14] block [pierre]\n    position [-5] [7] [14] block [pierre]\n    position [-6] [6] [13] block [ground]\n    position [-7] [6] [13] block [ground]\n    position [-8] [6] [13] block [bounce]\n    position [-5] [9] [15] block [ground]\n    position [-5] [9] [14] block [lava]\n    position [-5] [9] [16] block [ground]\n    position [-5] [9] [17] block [bounce]\n    position [-5] [12] [19] block [End]\n    position [-5] [13] [19] block [End]\nelse\n    if <(-level) = [2]> then\n        position [0] [0] [0] block [ground]\n        position [1] [0] [0] block [ground]\n        position [0] [0] [1] block [ground]\n        position [0] [0] [2] block [bounce]\n        position [0] [5] [0] block [ground]\n        position [3] [5] [0] block [ground]\n        position [7] [0] [5] block [ground]\n        position [7] [5] [5] block [ground]\n        position [7] [5] [0] block [ground]\n        position [2] [0] [5] block [ground]\n        broadcast (lvl2 v)\n    else\n        broadcast (hop v)\n    end\nend\n\ndefine ground?\nset [@collision v] to [0]\nset [@yo v] to [0]\nrepeat ((length of [ground v]) / (6))\n    change [@yo v] by (6)\n    if <<((player x) + (50)) > (item ((@YO) - (5)) of [ground v])> and <(item ((@YO) - (2)) of [ground v]) > ((player x) + (-50))>> then\n        if <<((player y) + (50)) > (item ((@YO) - (4)) of [ground v])> and <(item ((@YO) - (1)) of [ground v]) > ((player y) + (-50))>> then\n            if <<((player z) + (50)) > (item ((@YO) - (3)) of [ground v])> and <(item (@YO) of [ground v]) > ((player z) + (-50))>> then\n                set [@collision v] to [1]\n            end\n        end\n    end\nend\n\ndefine player\nchange [cambiar y v] by (-1)\nchange [player y v] by (cambiar y)\nground?\nif <(@Collision) = [1]> then\n    repeat until <(@Collision) = [0]>\n        if <(cambiar y) > [0]> then\n            change [player y v] by (-1)\n        else\n            change [player y v] by (1)\n        end\n        ground?\n    end\n    set [cambiar y v] to [0]\n    change [player y v] by (-3)\n    ground?\n    if <<key (space v) pressed?> and <(@Collision) = [1]>> then\n        set [cambiar y v] to [20]\n    end\n    change [player y v] by (3)\nend\nchange [player y v] by (-3)\nbounce?\nif <(@Collision) = [1]> then\n    set [cambiar y v] to [35]\nend\nlava?\nif <<(@Collision) = [1]> or <(player y) < [-500]>> then\n    reset\nend\nEnd?\nif <(@Collision) = [1]> then\n    change [-level v] by (1)\n    reset\nend\nchange [player y v] by (3)\nif <<key (z v) pressed?> or <key (w v) pressed?>> then\n    change [player z v] by (((1) * (---speed)) * (Cos Y))\n    change [player x v] by (((-1) * (---speed)) * (Sin Y))\nend\nground?\nif <(@Collision) = [1]> then\n    repeat until <(@Collision) = [0]>\n        change [player x v] by ((1) * (Sin Y))\n        change [player z v] by ((-1) * (Cos Y))\n        ground?\n    end\nend\nif <key (s v) pressed?> then\n    change [player x v] by (((1) * (---speed)) * (Sin Y))\n    change [player z v] by (((-1) * (---speed)) * (Cos Y))\nend\nground?\nif <(@Collision) = [1]> then\n    repeat until <(@Collision) = [0]>\n        change [player x v] by ((-1) * (Sin Y))\n        change [player z v] by ((1) * (Cos Y))\n        ground?\n    end\nend\nif <<key (q v) pressed?> or <key (a v) pressed?>> then\n    change [player x v] by (((-1) * (---speed)) * (Cos Y))\n    change [player z v] by (((-1) * (---speed)) * (Sin Y))\nend\nground?\nif <(@Collision) = [1]> then\n    repeat until <(@Collision) = [0]>\n        change [player x v] by ((1) * (Cos Y))\n        change [player z v] by ((1) * (Sin Y))\n        ground?\n    end\nend\nif <key (d v) pressed?> then\n    change [player x v] by (((1) * (---speed)) * (Cos Y))\n    change [player z v] by (((1) * (---speed)) * (Sin Y))\nend\nground?\nif <(@Collision) = [1]> then\n    repeat until <(@Collision) = [0]>\n        change [player x v] by ((-1) * (Cos Y))\n        change [player z v] by ((-1) * (Sin Y))\n        ground?\n    end\nend\nchange [cam x v] by ((((player x) + (((Sin Y) * (Cos X)) * (1))) - (CAM X)) / (5))\nchange [cam y v] by (((((player y) + (75)) + ((Sin X) * (1))) - (CAM Y)) / (5))\nchange [cam z v] by ((((player z) + (((Cos Y) * (Cos X)) * (1))) - (CAM Z)) / (5))\n\ndefine bounce?\nset [@collision v] to [0]\nset [@yo v] to [0]\nrepeat ((length of [bounce v]) / (6))\n    change [@yo v] by (6)\n    if <<((player x) + (50)) > (item ((@YO) - (5)) of [bounce v])> and <(item ((@YO) - (2)) of [bounce v]) > ((player x) + (-50))>> then\n        if <<((player y) + (50)) > (item ((@YO) - (4)) of [bounce v])> and <(item ((@YO) - (1)) of [bounce v]) > ((player y) + (-50))>> then\n            if <<((player z) + (50)) > (item ((@YO) - (3)) of [bounce v])> and <(item (@YO) of [bounce v]) > ((player z) + (-50))>> then\n                set [@collision v] to [1]\n            end\n        end\n    end\nend\n\ndefine lava?\nset [@collision v] to [0]\nset [@yo v] to [0]\nrepeat ((length of [lava v]) / (6))\n    change [@yo v] by (6)\n    if <<((player x) + (50)) > (item ((@YO) - (5)) of [lava v])> and <(item ((@YO) - (2)) of [lava v]) > ((player x) + (-50))>> then\n        if <<((player y) + (50)) > (item ((@YO) - (4)) of [lava v])> and <(item ((@YO) - (1)) of [lava v]) > ((player y) + (-50))>> then\n            if <<((player z) + (50)) > (item ((@YO) - (3)) of [lava v])> and <(item (@YO) of [lava v]) > ((player z) + (-50))>> then\n                set [@collision v] to [1]\n            end\n        end\n    end\nend\n\ndefine add to sorting\nset [--value v] to (item (--highest) of [distance v])\nreplace item (--highest) of [distance v] with (item (--lenght) of [distance v])\nreplace item (--lenght) of [distance v] with (--value)\nset [--value v] to (item (--highest) of [x v])\nreplace item (--highest) of [x v] with (item (--lenght) of [x v])\nreplace item (--lenght) of [x v] with (--value)\nset [--value v] to (item (--highest) of [y v])\nreplace item (--highest) of [y v] with (item (--lenght) of [y v])\nreplace item (--lenght) of [y v] with (--value)\nset [--value v] to (item (--highest) of [z v])\nreplace item (--highest) of [z v] with (item (--lenght) of [z v])\nreplace item (--lenght) of [z v] with (--value)\nset [--value v] to (item (--highest) of [modo v])\nreplace item (--highest) of [modo v] with (item (--lenght) of [modo v])\nreplace item (--lenght) of [modo v] with (--value)\nchange [--lenght v] by (-1)\n\ndefine reset\ncreate level\nset [---speed v] to [10]\nset [player x v] to [0]\nset [player y v] to [150]\nset [player z v] to [0]\nset [rot x v] to [0]\nset [rot y v] to [0]\nset [vel. cam. v] to [3]\nset [plano cercano v] to [50]\nset [tamaño v] to [300]\nset [cambiar y v] to [0]\n\ndefine End?\nset [@collision v] to [0]\nset [@yo v] to [0]\nrepeat ((length of [end v]) / (6))\n    change [@yo v] by (6)\n    if <<((player x) + (50)) > (item ((@YO) - (5)) of [end v])> and <(item ((@YO) - (2)) of [end v]) > ((player x) + (-50))>> then\n        if <<((player y) + (50)) > (item ((@YO) - (4)) of [end v])> and <(item ((@YO) - (1)) of [end v]) > ((player y) + (-50))>> then\n            if <<((player z) + (50)) > (item ((@YO) - (3)) of [end v])> and <(item (@YO) of [end v]) > ((player z) + (-50))>> then\n                set [@collision v] to [1]\n            end\n        end\n    end\nend\n\nset pen color to (#2830ff)\nset [-x v] to ((x) - (40))\nset [-y v] to ((y) - (50))\nset [-z v] to ((z) - (40))\nset [+x v] to ((x) - (-40))\nset [+y v] to ((y) - (-50))\nset [+z v] to ((z) - (-40))\nset pen color to (#000000)\nset [-x v] to ((x) - (0))\nset [-y v] to ((y) - (50))\nset [-z v] to ((z) - (50))\nset [+x v] to ((x) - (0))\nset [+y v] to ((y) - (-50))\nset [+z v] to ((z) - (-50))\n\nset pen color to (#acacac)\nset [-x v] to (((x) * (100)) - (50))\nset [-y v] to (((y) * (100)) - (50))\nset [-z v] to (((z) * (100)) - (50))\nset [+x v] to (((x) * (100)) - (-50))\nset [+y v] to (((y) * (100)) - (0))\nset [+z v] to (((z) * (100)) - (-50))\n\nposition [0] [3] [2] block [ground]\n\nposition [-5] [6] [14] block []\n\nposition [-7] [6] [13] block [bounce]\n\nwhen [1 v] key pressed\nif <(username) = [maDU59_]> then\n\nrepeat (10)\n    stop [other scripts in sprite v]\n    broadcast (message1 v) and wait\nend\n\nbroadcast (message1 v) and wait\n\nwhen I receive [hop v]\nstop [other scripts in sprite v]\nwait (0.1) seconds\nbroadcast (message1 v)\nstop [this script v]\n\nreset\n\nif <not <(username) = [maDU59_]>> then\nend\n\nwhen I receive [lvl2 v]\nwait until <<<(round ((player x) / (100))) = [2]> and <(round ((player y) / (100))) = [1]>> and <(round ((player z) / (100))) = [5]>>\nposition [0] [1] [0] block [end]\nposition [0] [2] [0] block [end]\n\n@Scoreboard\n\ndefine DisplayScores (score) & SaveToCloud? <save>\nif <(score) > [0]> then\n    set [color v] effect to (150)\n    Encode (join [Score ] (score)) to number. \n    Write text (Output) at X (-65) Y (150)\n    wait (0) seconds\nend\nset [color v] effect to (0)\nEncode [WORLD HIGH SCORES] to number. \nWrite text (Output) at X (-110) Y (115)\nwait (0) seconds\nwait (0) seconds\nchange [color v] effect by (16)\nset [tempdata v] to []\nset [i v] to [1]\nrepeat (10)\n    if <not <(i) = [1]>> then\n        if <not <(item (i) of [scores v]) = (item ((i) - (1)) of [scores v])>> then\n            change [color v] effect by (16)\n        end\n    end\n    if <<(item (i) of [names v]) = [IIIIIIIIIIIIIIIIIIII]> and <<(item (i) of [names v]) = [IIIIIIIIIIIIIIIIII  ]> and <(item (i) of [names v]) = [8cwIKn89IIII        ]>>> then\n        replace item (i) of [scores v] with [0]\n    end\n    if <not <(item (i) of [scores v]) = [0]>> then\n        Write Score (item (i) of [scores v]) at X (-70) Y ((100) - ((i) * (23))) (i)\n        Encode (item (i) of [names v]) to number. \n        if <<not <(item (i) of [names v]) = [IIIIIIIIIIIIIIIIIIII]>> and <<not <(item (i) of [names v]) = [IIIIIIIIIIIIIIIIII  ]>> and <not <(item (i) of [names v]) = [8cwIKn89IIII        ]>>>> then\n            Write text (Output) at X (-40) Y ((100) - ((i) * (23)))\n        end\n    end\n    set [tempdata v] to (join (join (tempData) (item (i) of [scores v])) (Output))\n    change [i v] by (1)\nend\nif <save> then\n    set [tempdata2 v] to []\n    set [i v] to [1]\n    repeat (256)\n        set [tempdata2 v] to (join (tempData2) (letter (i) of (tempData)))\n        change [i v] by (1)\n    end\n    set [☁ data1 v] to (tempData2)\n    set [tempdata2 v] to []\n    repeat (194)\n        set [tempdata2 v] to (join (tempData2) (letter (i) of (tempData)))\n        change [i v] by (1)\n    end\n    set [☁ data2 v] to (tempData2)\nend\n\ndefine CloudToLists\ndelete (all) of [scores v]\ndelete (all) of [names v]\nset [tempdata v] to (join (☁ Data1) (☁ Data2))\nset [i v] to [1]\nrepeat (10)\n    set [temp. v] to []\n    repeat (5)\n        set [temp. v] to (join (Temp.) (letter (i) of (tempData)))\n        change [i v] by (1)\n    end\n    add (Temp.) to [scores v]\n    set [temp. v] to []\n    repeat (40)\n        set [temp. v] to (join (Temp.) (letter (i) of (tempData)))\n        change [i v] by (1)\n    end\n    Decode (Temp.) to text.\n    add (Output) to [names v]\nend\n\ndefine Write Score (score) at X (x) Y (y) (position)\ngo to x: (x) y: (y)\nset [iii v] to (length of (score))\nrepeat (length of (score))\n    switch costume to (letter (iii) of (score))\n    if <(costume [number v]) = [54]> then\n        change x by (2)\n    end\n    set size to (60) %\n    stamp\n    change x by (-12)\n    change [iii v] by (-1)\nend\nset x to ((x) - (70))\nif <<(position) = [1]> or <not <(item (position) of [scores v]) = (item ((position) - (1)) of [scores v])>>> then\n    set [iii v] to ((2) * (position))\n    repeat (2)\n        switch costume to (join [l] (letter (iii) of (Positions)))\n        set size to (60) %\n        stamp\n        change x by (-11)\n        change [iii v] by (-1)\n    end\n    switch costume to (letter ((53) + (position)) of (Alphabet))\n    change x by (-1)\n    if <(position) = [1]> then\n        change x by (2)\n    end\n    set size to (60) %\n    stamp\n    if <(position) = [10]> then\n        change x by (-10)\n        switch costume to (1 v)\n        set size to (60) %\n        stamp\n    end\nelse\n    change x by (-8)\n    switch costume to (= v)\n    set size to (60) %\n    stamp\nend\n\ndefine Encode (name) to number. \nset [output v] to []\nset [letter# v] to [1]\nrepeat (20)\n    switch costume to (costume1 v)\n    switch costume to (letter (Letter#) of (name))\n    if <(costume [number v]) = [1]> then\n        set [findcharacter v] to [28]\n    else\n        set [findcharacter v] to [2]\n    end\n    repeat until <<(letter (Letter#) of (name)) = (letter (FindCharacter) of (Alphabet))> or <(FindCharacter) > [66]>>\n        change [findcharacter v] by (1)\n    end\n    if <(FindCharacter) > [66]> then\n        set [findcharacter v] to [01]\n    else\n        if <(length of (FindCharacter)) = [1]> then\n            set [findcharacter v] to (join [0] (FindCharacter))\n        end\n    end\n    set [output v] to (join (Output) (FindCharacter))\n    change [letter# v] by (1)\nend\n\ndefine CheckScore (score)\nif <(score) > [0]> then\n    set [wintype v] to [1]\nelse\n    set [wintype v] to [0]\n    stop [this script v]\nend\nset [temp. v] to (username)\nrepeat until <(length of (Temp.)) = [20]>\n    set [temp. v] to (join (Temp.) [ ])\nend\nset [i v] to [1]\nrepeat until <<(i) = [11]> or <(Temp.) = (item (i) of [names v])>>\n    change [i v] by (1)\nend\nif <(i) < [11]> then\n    if <(item (i) of [scores v]) > (score)> then\n        delete (i) of [scores v]\n        delete (i) of [names v]\n        add [0] to [scores v]\n        add [-] to [names v]\n    else\n        set [wintype v] to [2]\n        stop [this script v]\n    end\nend\nset [i v] to [1]\nrepeat until <<(i) = [11]> or <(item (i) of [scores v]) > (score)>>\n    change [i v] by (1)\nend\nif <(i) < [12]> then\n    insert (score) at (i) of [scores v] \n    repeat ((5) - (length of (score)))\n        replace item (i) of [scores v] with (join [0] (item (i) of [scores v]))\n    end\n    insert (username) at (i) of [names v] \n    delete (last) of [scores v]\n    delete (last) of [names v]\n    if <(i) = [1]> then\n        set [wintype v] to [5]\n    else\n        if <(item # of (i) in [scores v]) = (item (1) of [scores v])> then\n            set [wintype v] to [4]\n        else\n            set [wintype v] to [3]\n        end\n    end\nend\n\ndefine Decode (40 digit number) to text.\nset [output v] to []\nset [ii v] to [1]\nrepeat (20)\n    set [output v] to (join (Output) (letter (join (letter (ii) of (40 digit number)) (letter ((ii) + (1)) of (40 digit number))) of (Alphabet)))\n    change [ii v] by (2)\nend\n\ndefine Write text (encoded text) at X (x) Y (y)\ngo to x: (x) y: (y)\nset [iii v] to [1]\nrepeat (length of ((encoded text) / (2)))\n    switch costume to (join (letter (iii) of (encoded text)) (letter ((iii) + (1)) of (encoded text)))\n    set size to (60) %\n    stamp\n    if <(costume [number v]) < [28]> then\n        change x by (13)\n    else\n        change x by (11)\n    end\n    if <<(costume [number v]) = [14]> or <(costume [number v]) = [24]>> then\n        change x by (7)\n    else\n        if <<(costume [number v]) = [40]> or <(costume [number v]) = [50]>> then\n            change x by (8)\n        else\n            if <<(costume [number v]) = [10]> or <<(costume [number v]) = [36]> or <(costume [number v]) = [37]>>> then\n                change x by (-5)\n            else\n                if <<(costume [number v]) = [39]> or <(costume [number v]) = [54]>> then\n                    change x by (-3)\n                end\n            end\n        end\n    end\n    change [iii v] by (2)\nend\n\nwhen I receive [hidehighscore v]\n\nwhen I receive [showhighscore v]\nCloudToLists\nCheckScore (round (timer))\nDisplayScores (round (timer)) & SaveToCloud? <(winType) > [2]>\nif <(winType) > [2]> then\n    play sound [Ta Da-SoundBible.com-1884170640 v] until done\n    if <(winType) > [3]> then\n        start sound [Oh Yeah Female Voice-SoundBible.com-187589915 v]\n    end\nelse\n    if <(winType) = [1]> then\n        start sound [Sad_Trombone-Joe_Lamb-665429450 v]\n    end\nend\n\nwhen flag clicked\nerase all\nhide\ngo to x: (0) y: (0)\nbroadcast (hidehighscore v)\nset [alphabet v] to [ ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890-_= ]\nset [positions v] to [stndrdththththththth]\n\nwhen flag clicked\nbroadcast (hidehighscore v)\n\nwhen I receive [message1 v]\nswitch costume to (costume1 v)\nset size to (80) %\nerase all\nwait (1) seconds\nbroadcast (showhighscore v)\n\nset [☁ data1 v] to [0]\nset [☁ data2 v] to [0]\n\nset [☁ data1 v] to []\n\nset [☁ data2 v] to []\n\nEncode [] to number. \nWrite text (Output) at X (-110) Y (-165)\n\nstop [all v]\n\n@online\n\ndefine value = read from encoded\nset [valeur v] to []\nforever\n    set [idx v] to (join (letter (lettre #) of (encode)) (letter ((lettre #) + (1)) of (encode)))\n    change [lettre # v] by (2)\n    if <(IDX) < [1]> then\n        stop [this script v]\n    end\n    set [valeur v] to (join (valeur) (item (IDX) of [code v]))\nend\n\ndefine begin decode of (encoded)\nset [encode v] to (encoded)\nset [lettre # v] to [1]\n\nwhen flag clicked\nset [my player v] to [0]\nset [max player v] to [5]\n\nwhen I start as a clone\ngo to (random position v)\n\ndefine setup players\nhide\nset [hors ligne v] to [100]\nset [color v] effect to (90)\nset [player # v] to [1]\nrepeat ((max player) - (1))\n    create clone of (_myself_ v)\n    change [player # v] by (1)\nend\n\nwhen I receive [c parti v]\nforever\n    if <(MY player) = (player #)> then\n        set [hors ligne v] to [100]\n    else\n        tick\n    end\nend\n\ndefine valeur = cloud (player#)\nif <(player#) = [1]> then\n    set [valeur v] to (☁ player1)\nelse\n    if <(player#) = [2]> then\n        set [valeur v] to (☁ player2)\n    else\n        if <(player#) = [3]> then\n            set [valeur v] to (☁ player3)\n        else\n            if <(player#) = [4]> then\n                set [valeur v] to (☁ player4)\n            else\n                if <(player#) = [5]> then\n                    set [valeur v] to (☁ player5)\n                end\n            end\n        end\n    end\nend\n\nset [my player v] to [1]\n\nwhen I receive [set up v]\nsetup players\n\ndefine tick\nvaleur = cloud (player #)\nif <(join [A] (valeur)) = (derniere valeur.)> then\n    change [hors ligne v] by (1)\n    if <(hors ligne) > [99]> then\n        hide\n        replace item (player #) of [player hors ligne? v] with [hors ligne]\n    end\nelse\n    set [derniere valeur. v] to (join [A] (valeur))\n    if <[100] > (hors ligne)> then\n        show\n        replace item (player #) of [player hors ligne? v] with [actif]\n    end\n    set [hors ligne v] to [0]\nend\nbegin decode of (valeur)\nvalue = read from encoded\nvalue = read from encoded\nreplace item (player #) of [x player online v] with (valeur)\nvalue = read from encoded\nreplace item (player #) of [y player online v] with (valeur)\nvalue = read from encoded\nreplace item (player #) of [z player online v] with (valeur)\nvalue = read from encoded\nreplace item (player #) of [player rotation v] with (valeur)\nvalue = read from encoded\nreplace item (player #) of [level player online v] with (valeur)\nreplace item (MY player) of [x player online v] with (player x)\nreplace item (MY player) of [y player online v] with (player y)\nreplace item (MY player) of [z player online v] with (player z)\nreplace item (MY player) of [player rotation v] with (ROT Y)\nreplace item (MY player) of [player hors ligne? v] with [C moi]\nreplace item (MY player) of [level player online v] with (-level)\n\nwhen I receive [rejoindre v]\nvaleur = cloud (player #)\nset [derniere valeur. v] to (join [A] (valeur))\nwait (3) seconds\nvaleur = cloud (player #)\nif <(join [A] (valeur)) = (derniere valeur.)> then\n    set [my player v] to (player #)\nend\n\nset [my player v] to [0]\n\nset [player # v] to [1]\n\nwhen I receive [connexion?... v]\nbroadcast (set up v) and wait\nbroadcast (rejoindre v) and wait\nbroadcast (C parti v)\n\ndefine cloud data\nset [encode v] to []\nwrite ((round (timer)) * (10)) to encoded\nwrite (player x) to encoded\nwrite (player y) to encoded\nwrite (player z) to encoded\nwrite (ROT Y) to encoded\nwrite (-level) to encoded\nset cloud (MY player) à (encode)\n\nwhen I receive [c parti v]\nforever\n    if <(MY player) > [0]> then\n        cloud data\n    end\nend\n\ndefine set cloud (player#) à (valeur)\nif <(player#) = [1]> then\n    set [☁ player1 v] to (valeur)\nelse\n    if <(player#) = [2]> then\n        set [☁ player2 v] to (valeur)\n    else\n        if <(player#) = [3]> then\n            set [☁ player3 v] to (valeur)\n        else\n            if <(player#) = [4]> then\n                set [☁ player4 v] to (valeur)\n            else\n                if <(player#) = [5]> then\n                    set [☁ player5 v] to (valeur)\n                end\n            end\n        end\n    end\nend\n\ndefine write (val) to encoded\nset [lettre # v] to [1]\nrepeat (length of (val))\n    set [encode v] to (join (encode) (item # of (letter (lettre #) of (val)) in [code v]))\n    change [lettre # v] by (1)\nend\nset [encode v] to (join (encode) [00])\n\nadd [] to [x player online v]\nadd [] to [y player online v]\nadd [] to [player hors ligne? v]\nadd [] to [z player online v]\nadd [] to [player rotation v]\nadd [] to [level player online v]\n\n@th\n\nwhen flag clicked\nset [souris? v] to [0]\nshow\nset [ghost v] effect to (100)\nforever\n    go to [front v] layer\nend\n\nwhen [l v] key pressed\nif <(Souris?) = [0]> then\n    set [souris? v] to [1]\n    set [control v] to [mouse]\nelse\n    set [souris? v] to [0]\n    set [control v] to [arrow keys]\nend\n\nwhen [l v] key pressed\nshow variable [control v]\nwait (5) seconds\nhide variable [control v]\n\nset [ghost v] effect to (0)\n\n
Un platformer en ligne\nCe jeu est possible\nLes autres joueurs sont bleus\nLe rouge c'est de la lave\nLe jaune c'est un trampoline\n\nAn online platformer\nThis game is possible\nOther player are blue\nred is lava\nYellow is bouncer