Greenlands, a 3d platformer, 100% pen!      [games, art , all)
@Stage\n\n@Sprite1\n\n@intro\n\nwhen I receive [intro v]\npen up\nerase all\ngo to x: (-75) y: (60)\nset pen color to (#0083ff)\nset pen size to (25)\npen down\nrepeat (2)\n    glide (0.2) secs to x: (75) y: (y position)\n    change y by (-20)\n    glide (0.2) secs to x: (-75) y: (y position)\n    change y by (-20)\nend\nglide (0.2) secs to x: (75) y: (y position)\nchange y by (-20)\nglide (0.2) secs to x: (-75) y: (y position)\nchange y by (-20)\nglide (0.2) secs to x: (75) y: (y position)\npen up\nset pen color to (#0097ff)\nset pen size to (25)\ngo to x: (75) y: (60)\npen down\nglide (0.2) secs to x: (0) y: (10)\nglide (0.2) secs to x: (75) y: (-20)\nglide (0.2) secs to x: (75) y: (40)\nglide (0.2) secs to x: (30) y: (10)\nglide (0.2) secs to x: (60) y: (10)\ngo to x: (0) y: (10)\nglide (0.2) secs to x: (-40) y: (-75)\nglide (0.2) secs to x: (-60) y: (-75)\nglide (0.2) secs to x: (-20) y: (10)\nglide (0.2) secs to x: (0) y: (10)\nglide (0.2) secs to x: (-75) y: (50)\nglide (0.2) secs to x: (-75) y: (-75)\nglide (0.2) secs to x: (-40) y: (20)\nglide (0.2) secs to x: (-52) y: (25)\nglide (0.2) secs to x: (-50) y: (0)\npen up\ngo to x: (75) y: (-75)\nset pen color to (#00acff)\nset pen size to (25)\npen down\nglide (0.2) secs to x: (75) y: (-40)\nglide (0.2) secs to x: (10) y: (-10)\nglide (0.2) secs to x: (-20) y: (-75)\nglide (0.2) secs to x: (75) y: (-75)\nglide (0.2) secs to x: (10) y: (-10)\nglide (0.2) secs to x: (10) y: (-75)\nglide (0.2) secs to x: (20) y: (-30)\nglide (0.2) secs to x: (30) y: (-60)\nchange x by (10)\npen up\npen up\ngo to x: (-75) y: (75)\nset pen color to (#000000)\nset pen size to (25)\npen down\nglide (0.2) secs to x: (75) y: (75)\nglide (0.2) secs to x: (75) y: (-75)\nglide (0.2) secs to x: (-75) y: (-75)\nglide (0.2) secs to x: (-75) y: (75)\npen up\nset pen color to (#000000)\nset pen size to (15)\ngo to x: (-50) y: (50)\npen down\nglide (0.2) secs to x: (-50) y: (-50)\nglide (0.2) secs to x: (-50) y: (0)\nglide (0.2) secs to x: (-15) y: (0)\nglide (0.2) secs to x: (-15) y: (50)\nglide (0.2) secs to x: (-15) y: (-50)\npen up\nset pen color to (#000000)\nset pen size to (8)\ngo to x: (25) y: (12)\npen down\nglide (0.2) secs to x: (25) y: (45)\nglide (0.2) secs to x: (6) y: (18)\nglide (0.2) secs to x: (30) y: (18)\npen up\ngo to x: (53) y: (43)\npoint in direction (-90)\npen down\nrepeat (25)\n    move (2) steps\n    turn left (8) degrees\nend\nrepeat (20)\n    move (1) steps\n    turn left (8) degrees\nend\nrepeat (10)\n    move (1) steps\nend\npen up\nset pen color to (#ffffff)\nset pen (transparency v) to (50)\nset pen size to (25)\ngo to x: (-55) y: (75)\npen down\ngo to x: (-75) y: (55)\npen up\ngo to x: (55) y: (-75)\npen down\ngo to x: (75) y: (-55)\npen up\nwait (1) seconds\nbroadcast (Start v)\n\n@engine\n\ndefine Draw letter (letter) at x (x) y (y) Size (s)\ngo to x: (x) y: (y)\nset pen size to ((2) * (s))\nif <[a] = (letter)> then\n    pen down\n    go to x: (((5) * (s)) + (x position)) y: (((20) * (s)) + (y position))\n    go to x: (((5) * (s)) + (x position)) y: ((y position) - ((20) * (s)))\n    go to x: (((-2) * (s)) + (x position)) y: (((7) * (s)) + (y position))\n    change x by ((-5) * (s))\n    pen up\nend\nif <[b] = (letter)> then\n    pen down\n    change y by ((20) * (s))\n    change y by ((-20) * (s))\n    change x by ((10) * (s))\n    change y by ((9) * (s))\n    change x by ((-10) * (s))\n    change y by ((2) * (s))\n    change x by ((7) * (s))\n    change y by ((9) * (s))\n    change x by ((-7) * (s))\n    pen up\nend\nif <[c] = (letter)> then\n    pen down\n    change y by ((20) * (s))\n    change y by ((-20) * (s))\n    change x by ((10) * (s))\n    change x by ((-10) * (s))\n    change y by ((20) * (s))\n    change x by ((10) * (s))\n    pen up\nend\nif <[d] = (letter)> then\n    pen down\n    change y by ((20) * (s))\n    change x by ((8) * (s))\n    go to x: (((2) * (s)) + (x position)) y: (((-5) * (s)) + (y position))\n    change y by ((-10) * (s))\n    go to x: (((-2) * (s)) + (x position)) y: (((-5) * (s)) + (y position))\n    change x by ((-8) * (s))\n    pen up\nend\nif <[e] = (letter)> then\n    pen down\n    change y by ((20) * (s))\n    change y by ((-20) * (s))\n    change x by ((10) * (s))\n    change x by ((-10) * (s))\n    change y by ((10) * (s))\n    change x by ((10) * (s))\n    change x by ((-10) * (s))\n    change y by ((10) * (s))\n    change x by ((10) * (s))\n    change x by ((-10) * (s))\n    pen up\nend\nif <[f] = (letter)> then\n    pen down\n    change y by ((20) * (s))\n    change y by ((-20) * (s))\n    change y by ((10) * (s))\n    change x by ((10) * (s))\n    change x by ((-10) * (s))\n    change y by ((10) * (s))\n    change x by ((10) * (s))\n    change x by ((-10) * (s))\n    pen up\nend\nif <[g] = (letter)> then\n    pen down\n    change y by ((20) * (s))\n    change y by ((-20) * (s))\n    change x by ((7) * (s))\n    change y by ((5) * (s))\n    change x by ((-2) * (s))\n    change x by ((4) * (s))\n    change x by ((-2) * (s))\n    change y by ((-5) * (s))\n    change x by ((-7) * (s))\n    change y by ((20) * (s))\n    change x by ((7) * (s))\n    pen up\nend\nif <[h] = (letter)> then\n    pen down\n    change y by ((20) * (s))\n    change y by ((-10) * (s))\n    change x by ((10) * (s))\n    change y by ((10) * (s))\n    change y by ((-20) * (s))\n    pen up\nend\nif <[i] = (letter)> then\n    change x by ((5) * (s))\n    pen down\n    change y by ((20) * (s))\n    change x by ((5) * (s))\n    change x by ((-10) * (s))\n    change x by ((5) * (s))\n    change y by ((-20) * (s))\n    change x by ((5) * (s))\n    change x by ((-10) * (s))\n    change x by ((5) * (s))\n    pen up\nend\nif <[j] = (letter)> then\n    pen down\n    change y by ((10) * (s))\n    change y by ((-10) * (s))\n    change x by ((5) * (s))\n    change y by ((20) * (s))\n    change x by ((-5) * (s))\n    change x by ((10) * (s))\n    pen up\nend\nif <[k] = (letter)> then\n    pen down\n    change y by ((20) * (s))\n    change y by ((-10) * (s))\n    go to x: (((10) * (s)) + (x position)) y: (((-10) * (s)) + (y position))\n    go to x: (((-10) * (s)) + (x position)) y: (((10) * (s)) + (y position))\n    go to x: (((10) * (s)) + (x position)) y: (((10) * (s)) + (y position))\n    pen up\nend\nif <[l] = (letter)> then\n    pen down\n    change y by ((20) * (s))\n    change y by ((-20) * (s))\n    change x by ((10) * (s))\n    pen up\nend\nif <[m] = (letter)> then\n    pen down\n    change y by ((20) * (s))\n    go to x: (((5) * (s)) + (x position)) y: (((-10) * (s)) + (y position))\n    go to x: (((5) * (s)) + (x position)) y: (((10) * (s)) + (y position))\n    change y by ((-20) * (s))\n    pen up\nend\nif <[n] = (letter)> then\n    pen down\n    change y by ((20) * (s))\n    go to x: (((10) * (s)) + (x position)) y: (((-20) * (s)) + (y position))\n    change y by ((20) * (s))\n    pen up\nend\nif <[o] = (letter)> then\n    change y by ((5) * (s))\n    pen down\n    change y by ((10) * (s))\n    go to x: (((2) * (s)) + (x position)) y: (((5) * (s)) + (y position))\n    change x by ((6) * (s))\n    go to x: (((2) * (s)) + (x position)) y: (((-5) * (s)) + (y position))\n    change y by ((-10) * (s))\n    go to x: (((-2) * (s)) + (x position)) y: (((-5) * (s)) + (y position))\n    change x by ((-6) * (s))\n    go to x: (((-2) * (s)) + (x position)) y: (((5) * (s)) + (y position))\n    pen up\nend\nif <[p] = (letter)> then\n    pen down\n    change y by ((15) * (s))\n    go to x: (((2) * (s)) + (x position)) y: (((5) * (s)) + (y position))\n    change x by ((6) * (s))\n    go to x: (((2) * (s)) + (x position)) y: (((-5) * (s)) + (y position))\n    change y by ((-1) * (s))\n    go to x: (((-2) * (s)) + (x position)) y: (((-5) * (s)) + (y position))\n    change x by ((-6) * (s))\n    go to x: (((-2) * (s)) + (x position)) y: (((5) * (s)) + (y position))\n    pen up\nend\nif <[q] = (letter)> then\n    change y by ((5) * (s))\n    pen down\n    change y by ((10) * (s))\n    go to x: ((2) + (x position)) y: (((5) * (s)) + (y position))\n    change x by ((6) * (s))\n    go to x: ((2) + (x position)) y: (((-5) * (s)) + (y position))\n    change y by ((-10) * (s))\n    go to x: ((-2) + (x position)) y: ((-5) + (y position))\n    change x by ((-6) * (s))\n    go to x: ((-2) + (x position)) y: (((5) * (s)) + (y position))\n    pen up\n    change x by ((6) * (s))\n    pen down\n    go to x: (((5) * (s)) + (x position)) y: (((-5) * (s)) + (y position))\n    pen up\nend\nif <[r] = (letter)> then\n    pen down\n    change y by ((15) * (s))\n    go to x: (((2) * (s)) + (x position)) y: (((5) * (s)) + (y position))\n    change x by ((6) * (s))\n    go to x: (((2) * (s)) + (x position)) y: (((-5) * (s)) + (y position))\n    change y by ((-1) * (s))\n    go to x: (((-2) * (s)) + (x position)) y: (((-5) * (s)) + (y position))\n    change x by ((-6) * (s))\n    go to x: (((-2) * (s)) + (x position)) y: (((5) * (s)) + (y position))\n    change y by ((-3) * (s))\n    go to x: (((10) * (s)) + (x position)) y: (((-11) * (s)) + (y position))\n    pen up\nend\nif <[s] = (letter)> then\n    pen down\n    change y by ((2) * (s))\n    change y by ((-2) * (s))\n    change x by ((10) * (s))\n    change y by ((10) * (s))\n    change x by ((-10) * (s))\n    change y by ((10) * (s))\n    change x by ((10) * (s))\n    change y by ((-2) * (s))\n    change y by ((2) * (s))\n    pen up\nend\nif <[t] = (letter)> then\n    change x by ((5) * (s))\n    pen down\n    change y by ((20) * (s))\n    change x by ((5) * (s))\n    change x by ((-10) * (s))\n    pen up\nend\nif <[u] = (letter)> then\n    change y by ((5) * (s))\n    pen down\n    change y by ((15) * (s))\n    pen up\n    change x by ((10) * (s))\n    pen down\n    change y by ((-15) * (s))\n    go to x: (((-2) * (s)) + (x position)) y: (((-5) * (s)) + (y position))\n    change x by ((-6) * (s))\n    go to x: (((-2) * (s)) + (x position)) y: (((5) * (s)) + (y position))\n    pen up\n    change x by ((10) * (s))\n    pen down\n    change y by ((-5) * (s))\n    pen up\nend\nif <[v] = (letter)> then\n    change y by ((20) * (s))\n    pen down\n    go to x: (((5) * (s)) + (x position)) y: (((-20) * (s)) + (y position))\n    go to x: (((5) * (s)) + (x position)) y: (((20) * (s)) + (y position))\n    pen up\nend\nif <[w] = (letter)> then\n    change y by ((20) * (s))\n    pen down\n    go to x: (((2.5) * (s)) + (x position)) y: (((-20) * (s)) + (y position))\n    go to x: (((2.5) * (s)) + (x position)) y: (((20) * (s)) + (y position))\n    go to x: (((2.5) * (s)) + (x position)) y: (((-20) * (s)) + (y position))\n    go to x: (((2.5) * (s)) + (x position)) y: (((20) * (s)) + (y position))\n    pen up\nend\nif <[x] = (letter)> then\n    change y by ((20) * (s))\n    pen down\n    go to x: (((10) * (s)) + (x position)) y: (((-20) * (s)) + (y position))\n    pen up\n    change x by ((-10) * (s))\n    pen down\n    go to x: (((10) * (s)) + (x position)) y: (((20) * (s)) + (y position))\n    pen up\nend\nif <[y] = (letter)> then\n    change x by ((5) * (s))\n    pen down\n    change y by ((10) * (s))\n    go to x: (((5) * (s)) + (x position)) y: (((10) * (s)) + (y position))\n    go to x: (((-5) * (s)) + (x position)) y: (((-10) * (s)) + (y position))\n    go to x: (((-5) * (s)) + (x position)) y: (((10) * (s)) + (y position))\n    pen up\nend\nif <[z] = (letter)> then\n    pen down\n    change x by ((10) * (s))\n    go to x: (((-10) * (s)) + (x position)) y: (((20) * (s)) + (y position))\n    change x by ((10) * (s))\n    pen up\nend\nif <[:] = (letter)> then\n    change x by ((5) * (s))\n    change y by ((5) * (s))\n    pen down\n    pen up\n    change y by ((10) * (s))\n    pen down\n    pen up\nend\nif <[1] = (letter)> then\n    change x by ((5) * (s))\n    pen down\n    change y by ((20) * (s))\n    go to x: (((-5) * (s)) + (x position)) y: (((-5) * (s)) + (y position))\n    pen up\nend\nif <[2] = (letter)> then\n    pen down\n    change x by ((10) * (s))\n    change x by ((-10) * (s))\n    change y by ((10) * (s))\n    change x by ((10) * (s))\n    change y by ((10) * (s))\n    change x by ((-10) * (s))\n    pen up\nend\nif <[3] = (letter)> then\n    pen down\n    change x by ((10) * (s))\n    change y by ((10) * (s))\n    change x by ((-10) * (s))\n    change x by ((10) * (s))\n    change y by ((10) * (s))\n    change x by ((-10) * (s))\n    pen up\nend\nif <[4] = (letter)> then\n    change x by ((10) * (s))\n    pen down\n    change y by ((10) * (s))\n    change x by ((-10) * (s))\n    change y by ((10) * (s))\n    change y by ((-10) * (s))\n    change x by ((10) * (s))\n    change y by ((10) * (s))\n    pen up\nend\nif <[5] = (letter)> then\n    pen down\n    change x by ((10) * (s))\n    change y by ((10) * (s))\n    change x by ((-10) * (s))\n    change y by ((10) * (s))\n    change x by ((10) * (s))\n    pen up\nend\nif <[6] = (letter)> then\n    pen down\n    change x by ((10) * (s))\n    change y by ((10) * (s))\n    change x by ((-10) * (s))\n    change y by ((-10) * (s))\n    change y by ((20) * (s))\n    pen up\nend\nif <[7] = (letter)> then\n    change y by ((20) * (s))\n    pen down\n    change x by ((10) * (s))\n    change y by ((-20) * (s))\n    pen up\nend\nif <[8] = (letter)> then\n    pen down\n    change x by ((10) * (s))\n    change y by ((10) * (s))\n    change x by ((-10) * (s))\n    change y by ((-10) * (s))\n    change y by ((20) * (s))\n    change x by ((10) * (s))\n    change y by ((-10) * (s))\n    pen up\nend\nif <[9] = (letter)> then\n    change x by ((10) * (s))\n    pen down\n    change y by ((20) * (s))\n    change x by ((-10) * (s))\n    change y by ((-10) * (s))\n    change x by ((10) * (s))\n    pen up\nend\nif <[0] = (letter)> then\n    pen down\n    change y by ((20) * (s))\n    change x by ((10) * (s))\n    change y by ((-20) * (s))\n    change x by ((-10) * (s))\n    pen up\nend\nif <[/] = (letter)> then\n    pen down\n    go to x: (((10) * (s)) + (x position)) y: (((20) * (s)) + (y position))\n    pen up\nend\nif <[?] = (letter)> then\n    pen down\n    pen up\n    change y by ((5) * (s))\n    pen down\n    change y by ((7) * (s))\n    change x by ((5) * (s))\n    change y by ((8) * (s))\n    change x by ((-5) * (s))\n    pen up\nend\n\ndefine Phrase (p) starting at (x) (y) size: (s)\nset [x3 v] to (x)\nset [y3 v] to (y)\nset [letter v] to [0]\nrepeat (length of (p))\n    change [letter v] by (1)\n    Draw letter (letter (Letter) of (p)) at x (X3) y (Y3) Size (s)\n    change [x3 v] by ((15) * (s))\nend\n\ndefine XY Clipping\nset [m v] to (((y2) - (y1)) / ((x2) - (x1)))\nif <(x1) > [240]> then\n    if <(x2) > [240]> then\n        stop [this script v]\n    else\n        Set Screen Point 1: (240) ((y1) + (((240) - (x1)) * (m)))\n    end\nend\nif <(y1) > [180]> then\n    if <(y2) > [180]> then\n        stop [this script v]\n    else\n        Set Screen Point 1: ((x1) + (((180) - (y1)) / (m))) (180)\n    end\nend\nif <(x1) < [-240]> then\n    if <(x2) < [-240]> then\n        stop [this script v]\n    else\n        Set Screen Point 1: (-240) ((y1) + (((-240) - (x1)) * (m)))\n    end\nend\nif <(y1) < [-180]> then\n    if <(y2) < [-180]> then\n        stop [this script v]\n    else\n        Set Screen Point 1: ((x1) + (((-180) - (y1)) / (m))) (-180)\n    end\nend\nif <(x2) > [240]> then\n    Set Screen Point 2: (240) ((y1) + (((240) - (x1)) * (m)))\nend\nif <(y2) > [180]> then\n    Set Screen Point 2: ((x1) + (((180) - (y1)) / (m))) (180)\nend\nif <(x2) < [-240]> then\n    Set Screen Point 2: (-240) ((y1) + (((-240) - (x1)) * (m)))\nend\nif <(y2) < [-180]> then\n    Set Screen Point 2: ((x1) + (((-180) - (y1)) / (m))) (-180)\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) + (0))\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\ndefine Sort\nset [dummy variable v] to [0]\nrepeat (length of [distance info v])\n    change [dummy variable v] by (1)\n    if <(Dummy Variable) < [10]> then\n        set [dummy variable v] to (join [0] (Dummy Variable))\n    end\n    replace item (Dummy Variable) of [distance info v] with (((item (Dummy Variable) of [distance info v]) * (100)) + (Dummy Variable))\nend\nrepeat (length of [distance info v])\n    set [dummy variable v] to [0]\n    set [dummy 2 v] to [0]\n    repeat ((length of [distance info v]) - (1))\n        change [dummy variable v] by (1)\n        if <(item (Dummy Variable) of [distance info v]) < (item ((Dummy Variable) + (1)) of [distance info v])> then\n            set [dummy 2 v] to (item ((Dummy Variable) + (1)) of [distance info v])\n            replace item ((Dummy Variable) + (1)) of [distance info v] with (item (Dummy Variable) of [distance info v])\n            replace item (Dummy Variable) of [distance info v] with (Dummy 2)\n        end\n    end\nend\n\ndefine Draw Cube at (x) (y) (z) length of each side (xl) (yl) (zl) t (t)\nset pen size to (5)\nset [distance v] to (round ([sqrt v] of ((((x) - (cam x)) * ((x) - (cam x))) + ((((y) - (cam y)) * ((y) - (cam y))) + (((z) - (cam z)) * ((z) - (cam z))))) ))\nif <[green] = (t)> then\n    set pen color to (#00ff21)\nend\nif <[player] = (t)> then\n    set pen color to (#00ffd8)\nend\nif <[end] = (t)> then\n    set pen (color v) to ((timer) * (10))\nend\nif <[bounce] = (t)> then\n    set pen color to (#ffe900)\nend\nif <[lava] = (t)> then\n    set pen (color v) to ((([cos v] of (((timer) - (3)) * (100)) ) * (2)) - (-3))\nend\nif <[front] = (t)> then\n    set pen color to (#dac700)\nend\nif <[gravity] = (t)> then\n    set pen color to (#ff9400)\nend\nif <((z) + ((zl) / (2))) < (cam z)> then\n    Draw square ((x) + ((xl) / (2))) ((y) + ((yl) / (2))) ((z) + ((zl) / (2))) - ((x) - ((xl) / (2))) ((y) - ((yl) / (2))) ((z) + ((zl) / (2)))\nend\nif <(cam z) < ((z) - ((zl) / (2)))> then\n    Draw square ((x) + ((xl) / (2))) ((y) + ((yl) / (2))) ((z) - ((zl) / (2))) - ((x) - ((xl) / (2))) ((y) - ((yl) / (2))) ((z) - ((zl) / (2)))\nend\nif <((x) + ((xl) / (2))) < (cam x)> then\n    Draw square ((x) + ((xl) / (2))) ((y) + ((yl) / (2))) ((z) + ((zl) / (2))) - ((x) + ((xl) / (2))) ((y) - ((yl) / (2))) ((z) - ((zl) / (2)))\nend\nif <(cam x) < ((x) - ((xl) / (2)))> then\n    Draw square ((x) - ((xl) / (2))) ((y) + ((yl) / (2))) ((z) + ((zl) / (2))) - ((x) - ((xl) / (2))) ((y) - ((yl) / (2))) ((z) - ((zl) / (2)))\nend\nif <((y) + ((yl) / (2))) < (cam y)> then\n    3d Tri ((x) - ((xl) / (2))) ((y) + ((yl) / (2))) ((z) + ((zl) / (2))) ((x) + ((xl) / (2))) ((y) + ((yl) / (2))) ((z) - ((zl) / (2))) ((x) - ((xl) / (2))) ((y) + ((yl) / (2))) ((z) - ((zl) / (2)))\n    3d Tri ((x) - ((xl) / (2))) ((y) + ((yl) / (2))) ((z) + ((zl) / (2))) ((x) + ((xl) / (2))) ((y) + ((yl) / (2))) ((z) - ((zl) / (2))) ((x) + ((xl) / (2))) ((y) + ((yl) / (2))) ((z) + ((zl) / (2)))\nend\nif <(cam y) < ((y) - ((yl) / (2)))> then\n    3d Tri ((x) - ((xl) / (2))) ((y) - ((yl) / (2))) ((z) + ((zl) / (2))) ((x) + ((xl) / (2))) ((y) - ((yl) / (2))) ((z) - ((zl) / (2))) ((x) - ((xl) / (2))) ((y) - ((yl) / (2))) ((z) - ((zl) / (2)))\n    3d Tri ((x) - ((xl) / (2))) ((y) - ((yl) / (2))) ((z) + ((zl) / (2))) ((x) + ((xl) / (2))) ((y) - ((yl) / (2))) ((z) - ((zl) / (2))) ((x) + ((xl) / (2))) ((y) - ((yl) / (2))) ((z) + ((zl) / (2)))\nend\n\nwhen flag clicked\nbroadcast (Intro v)\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 Line (x1) (y1) (z1) to (x2) (y2) (z2)\nSet Point 1: ((x1) - (cam x)) ((y1) - (cam y)) ((z1) - (cam z))\nSet Point 2: ((x2) - (cam x)) ((y2) - (cam y)) ((z2) - (cam z))\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 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)))\nif <not <<(z1) < (near plane)> and <(z2) < (near plane)>>> then\n    Z Clipping\n    Set Screen Point 1: ((view factor) * ((x1) / (z1))) ((view factor) * ((y1) / (z1)))\n    Set Screen Point 2: ((view factor) * ((x2) / (z2))) ((view factor) * ((y2) / (z2)))\n    go to x: (x1) y: (y1)\n    pen down\n    go to x: (x2) y: (y2)\n    pen up\nend\n\ndefine Set Screen Point 1: (x1) (y1)\nset [x1 v] to (x1)\nset [y1 v] to (y1)\n\ndefine Set Screen Point 2: (x2) (y2)\nset [x2 v] to (x2)\nset [y2 v] to (y2)\n\ndefine Draw cubes\nset pen size to (5)\nCalculate Trig Values\nset [loop v] to [0]\nrepeat (length of [distance info v])\n    change [loop v] by (1)\n    set [dummy 2 v] to (join (letter ((length of (item (Loop) of [distance info v])) - (1)) of (item (Loop) of [distance info v])) (letter (length of (item (Loop) of [distance info v])) of (item (Loop) of [distance info v])))\n    Draw Cube at (item (Dummy 2) of [x v]) (item (Dummy 2) of [y v]) (item (Dummy 2) of [z v]) length of each side (item (Dummy 2) of [xl v]) (item (Dummy 2) of [yl v]) (item (Dummy 2) of [zl v]) t (item (Dummy 2) of [types v])\nend\n\ndefine Calculate Trig Values\nset [sin x v] to ([sin v] of (Rotation Y) )\nset [cos x v] to ([cos v] of (Rotation Y) )\nset [sin y v] to ([sin v] of (Rotation X) )\nset [cos y v] to ([cos v] of (Rotation X) )\n\ndefine Z Clipping\nif <<(z1) < (near plane)> or <(z2) < (near plane)>> then\n    set [percent v] to (((near plane) - (z1)) / ((z2) - (z1)))\n    if <(z1) < (near plane)> then\n        Set Point 1: ((x1) + (((x2) - (x1)) * (percent))) ((y1) + (((y2) - (y1)) * (percent))) (near plane)\n    else\n        if <(z2) < (near plane)> then\n            Set Point 2: ((x1) + (((x2) - (x1)) * (percent))) ((y1) + (((y2) - (y1)) * (percent))) (near plane)\n        end\n    end\nend\n\ndefine Get Level\ndelete all of [types v]\ndelete all of [x v]\ndelete all of [xl v]\ndelete all of [y v]\ndelete all of [yl v]\ndelete all of [z v]\ndelete all of [zl v]\ndelete all of [distance info v]\nAdd Cube (Player x) (Player y) (Player z) lengths [30] [30] [30] type: [player]\nif <[1] = (_Level)> then\n    Add Cube [0] [0] [0] lengths [50] [50] [50] type: [green]\n    Add Cube [0] [50] [50] lengths [50] [50] [50] type: [green]\n    Add Cube [0] [50] [200] lengths [50] [50] [50] type: [green]\n    Add Cube [0] [50] [400] lengths [50] [50] [50] type: [green]\n    Add Cube [0] [50] [500] lengths [50] [50] [50] type: [bounce]\n    Add Cube [0] [150] [600] lengths [50] [50] [50] type: [green]\n    Add Cube [0] [150] [800] lengths [50] [50] [100] type: [green]\n    Add Cube [0] [200] [900] lengths [50] [50] [50] type: [end]\nend\nif <[2] = (_Level)> then\n    Add Cube [0] [0] [0] lengths [50] [50] [50] type: [green]\n    Add Cube [0] [0] [100] lengths [50] [50] [50] type: [green]\n    Add Cube [0] [0] [300] lengths [50] [50] [50] type: [bounce]\n    Add Cube [0] [150] [400] lengths [50] [50] [50] type: [bounce]\n    Add Cube [0] [300] [500] lengths [50] [50] [50] type: [green]\n    Add Cube [0] [300] [550] lengths [50] [50] [50] type: [lava]\n    Add Cube [0] [300] [600] lengths [50] [50] [50] type: [green]\n    Add Cube [0] [300] [650] lengths [50] [50] [50] type: [lava]\n    Add Cube [0] [300] [700] lengths [50] [50] [50] type: [green]\n    Add Cube [0] [350] [800] lengths [50] [50] [50] type: [end]\nend\nif <[3] = (_Level)> then\n    Add Cube [0] [0] [0] lengths [50] [50] [50] type: [green]\n    Add Cube [100] [0] [100] lengths [50] [50] [50] type: [green]\n    Add Cube [0] [0] [200] lengths [50] [50] [50] type: [green]\n    Add Cube [0] [-50] [400] lengths [50] [50] [50] type: [green]\n    Add Cube [0] [0] [500] lengths [50] [50] [50] type: [green]\n    Add Cube [0] [50] [650] lengths [50] [50] [50] type: [green]\n    Add Cube [0] [100] [800] lengths [50] [50] [50] type: [green]\n    Add Cube [0] [-100] [1000] lengths [50] [50] [50] type: [green]\n    Add Cube [0] [-50] [1100] lengths [50] [50] [50] type: [green]\n    Add Cube [0] [0] [1200] lengths [50] [50] [50] type: [green]\n    Add Cube [0] [40] [1230] lengths [50] [25] [15] type: [lava]\n    Add Cube [0] [0] [1270] lengths [50] [50] [50] type: [green]\n    Add Cube [0] [0] [1350] lengths [50] [50] [50] type: [bounce]\n    Add Cube [0] [0] [1500] lengths [50] [50] [50] type: [green]\n    Add Cube [0] [0] [1700] lengths [50] [50] [50] type: [end]\nend\nif <[4] = (_Level)> then\n    Add Cube [0] [0] [0] lengths [50] [50] [50] type: [green]\n    Add Cube [0] [0] [100] lengths [50] [50] [50] type: [front]\n    Add Cube [0] [0] [300] lengths [50] [50] [50] type: [green]\n    Add Cube [0] [0] [400] lengths [50] [50] [50] type: [bounce]\n    Add Cube [0] [100] [500] lengths [50] [50] [50] type: [front]\n    Add Cube [0] [100] [800] lengths [50] [50] [50] type: [front]\n    Add Cube [0] [150] [900] lengths [50] [50] [50] type: [lava]\n    Add Cube [-50] [100] [800] lengths [50] [50] [50] type: [green]\n    Add Cube [-50] [100] [900] lengths [50] [50] [50] type: [green]\n    Add Cube [0] [100] [950] lengths [50] [50] [50] type: [green]\n    Add Cube [100] [100] [1100] lengths [50] [50] [50] type: [green]\n    Add Cube [0] [-100] [1300] lengths [50] [50] [50] type: [green]\n    Add Cube [0] [-50] [1400] lengths [50] [50] [50] type: [end]\nend\nif <[5] = (_Level)> then\n    stop [other scripts in sprite v]\n    broadcast (End v)\n    stop [this script v]\nend\n\ndefine Add Cube (x) (y) (z) lengths (xl) (yl) (zl) type: (t)\nif <(round ([sqrt v] of ((((x) - (cam x)) * ((x) - (cam x))) + ((((y) - (cam y)) * ((y) - (cam y))) + (((z) - (cam z)) * ((z) - (cam z))))) )) < [500]> then\n    add (x) to [x v]\n    add (y) to [y v]\n    add (z) to [z v]\n    add (xl) to [xl v]\n    add (yl) to [yl v]\n    add (zl) to [zl v]\n    add (t) to [types v]\n    add (round ([sqrt v] of ((((x) - (cam x)) * ((x) - (cam x))) + ((((y) - (cam y)) * ((y) - (cam y))) + (((z) - (cam z)) * ((z) - (cam z))))) )) to [distance info v]\nend\n\ndefine Reset\nset [cam x v] to ((Player x) + ((100) * (([cos v] of (Rotation Y) ) * ([sin v] of (Rotation X) ))))\nset [cam y v] to ((Player y) + ((100) * ((-1) * ([sin v] of (Rotation Y) ))))\nset [cam z v] to ((Player z) + ((((100) * ([cos v] of (Rotation X) )) * ([cos v] of (Rotation Y) )) * (-1)))\nset [cam speed v] to [1]\nset [rotation y v] to [-45]\nset [rotation x v] to [0]\nset [player x v] to [0]\nset [player y v] to [100]\nset [player z v] to [0]\nset [player x vel. v] to [0]\nset [player y vel. v] to [0]\nset [player z vel. v] to [0]\nset [_gravity v] to [1]\n\ndefine Sense (x) (y) (z) w (xl) (yl) (zl) Type (t)\nif <<<((Player z) + (15)) > ((z) - ((zl) / (2)))> and <((Player z) + (-15)) < ((z) + ((zl) / (2)))>> and <<<((Player y) + (15)) > ((y) - ((yl) / (2)))> and <((Player y) + (-15)) < ((y) + ((yl) / (2)))>> and <<((Player x) + (15)) > ((x) - ((xl) / (2)))> and <((Player x) + (-15)) < ((x) + ((xl) / (2)))>>>> then\n    add (t) to [touching? v]\nend\n\ndefine Detect\ndelete all of [touching? v]\nset [loop v] to [1]\nrepeat (length of [types v])\n    Sense (item (Loop) of [x v]) (item (Loop) of [y v]) (item (Loop) of [z v]) w (item (Loop) of [xl v]) (item (Loop) of [yl v]) (item (Loop) of [zl v]) Type (item (Loop) of [types v])\n    change [loop v] by (1)\nend\n\ndefine Settings\nif <key (right arrow v) pressed?> then\n    change [rot y vel. v] by (-1)\nend\nif <key (left arrow v) pressed?> then\n    change [rot y vel. v] by (1)\nend\nif <key (up arrow v) pressed?> then\n    change [rot x vel. v] by (1)\nend\nif <key (down arrow v) pressed?> then\n    change [rot x vel. v] by (-1)\nend\nif <key (w v) pressed?> then\n    change [player z vel. v] by ((1) * ((cam speed) * (cos Y)))\nend\nif <key (s v) pressed?> then\n    change [player z vel. v] by ((-1) * ((cam speed) * (cos Y)))\nend\nif <key (a v) pressed?> then\n    change [player z vel. v] by ((-1) * ((cam speed) * (sin Y)))\nend\nif <key (d v) pressed?> then\n    change [player z vel. v] by ((1) * ((cam speed) * (sin Y)))\nend\nset [player z vel. v] to ((Player z vel.) * (0.8))\nset [rot x vel. v] to ((Rot x vel.) * (0.9))\nset [rot y vel. v] to ((Rot y vel.) * (0.9))\nchange [player z v] by (Player z vel.)\nchange [rotation y v] by (round (Rot x vel.))\nchange [rotation x v] by (round (Rot y vel.))\nif <(Rotation Y) < [-90]> then\n    set [rotation y v] to [-90]\nend\nif <[90] < (Rotation Y)> then\n    set [rotation y v] to [90]\nend\nDetect\nif <[touching? v] contains [green]?> then\n    change [player y v] by (1)\n    Detect\n    if <[touching? v] contains [green]?> then\n        change [player y v] by (1)\n        Detect\n        if <[touching? v] contains [green]?> then\n            change [player y v] by (1)\n            Detect\n            if <[touching? v] contains [green]?> then\n                change [player y v] by (1)\n                Detect\n                if <[touching? v] contains [green]?> then\n                    change [player y v] by (1)\n                    Detect\n                    if <[touching? v] contains [green]?> then\n                        change [player y v] by (1)\n                        Detect\n                        if <[touching? v] contains [green]?> then\n                            change [player y v] by (1)\n                            Detect\n                            if <[touching? v] contains [green]?> then\n                                change [player y v] by (1)\n                                Detect\n                                if <[touching? v] contains [green]?> then\n                                    change [player y v] by (1)\n                                    Detect\n                                    if <[touching? v] contains [green]?> then\n                                        change [player y v] by (1)\n                                        Detect\n                                        if <[touching? v] contains [green]?> then\n                                            change [player y v] by (-10)\n                                            change [player z v] by ((Player z vel.) * (-1))\n                                            set [player z vel. v] to [0]\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nif <key (w v) pressed?> then\n    change [player x vel. v] by ((-1) * ((cam speed) * (sin Y)))\nend\nif <key (s v) pressed?> then\n    change [player x vel. v] by ((1) * ((cam speed) * (sin Y)))\nend\nif <key (a v) pressed?> then\n    change [player x vel. v] by ((-1) * ((cam speed) * (cos Y)))\nend\nif <key (d v) pressed?> then\n    change [player x vel. v] by ((1) * ((cam speed) * (cos Y)))\nend\nset [player x vel. v] to ((Player x vel.) * (0.8))\nchange [player x v] by (Player x vel.)\nDetect\nif <[touching? v] contains [green]?> then\n    change [player y v] by (1)\n    Detect\n    if <[touching? v] contains [green]?> then\n        change [player y v] by (1)\n        Detect\n        if <[touching? v] contains [green]?> then\n            change [player y v] by (1)\n            Detect\n            if <[touching? v] contains [green]?> then\n                change [player y v] by (1)\n                Detect\n                if <[touching? v] contains [green]?> then\n                    change [player y v] by (1)\n                    Detect\n                    if <[touching? v] contains [green]?> then\n                        change [player y v] by (1)\n                        Detect\n                        if <[touching? v] contains [green]?> then\n                            change [player y v] by (1)\n                            Detect\n                            if <[touching? v] contains [green]?> then\n                                change [player y v] by (1)\n                                Detect\n                                if <[touching? v] contains [green]?> then\n                                    change [player y v] by (1)\n                                    Detect\n                                    if <[touching? v] contains [green]?> then\n                                        change [player y v] by (1)\n                                        Detect\n                                        if <[touching? v] contains [green]?> then\n                                            change [player y v] by (-10)\n                                            change [player x v] by ((Player x vel.) * (-1))\n                                            set [player x vel. v] to [0]\n                                        end\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\nDetect\nif <[touching? v] contains [gravity]?> then\n    set [_gravity v] to ((-1) * (_Gravity))\n    change [player y v] by ((-10) * (_Gravity))\n    set [player y vel. v] to [0]\nend\nchange [player y vel. v] by ((-1) * (_Gravity))\nchange [player y v] by (Player y vel.)\nchange [_air? v] by (1)\nDetect\nif <[touching? v] contains [lava]?> then\n    Reset\nend\nDetect\nif <[touching? v] contains [green]?> then\n    change [player y v] by ((-1) * (Player y vel.))\n    set [player y vel. v] to [0]\n    set [_air? v] to [0]\nend\nif <key (space v) pressed?> then\n    if <(_air?) < [8]> then\n        set [player y vel. v] to [10]\n    end\nelse\n    change [_air? v] by (8)\nend\nDetect\nif <[touching? v] contains [end]?> then\n    change [_level v] by (1)\n    Reset\nend\nif <[touching? v] contains [bounce]?> then\n    set [player y vel. v] to [20]\n    set [_air? v] to [0]\nend\nif <[touching? v] contains [front]?> then\n    set [player y vel. v] to [15]\n    set [player z vel. v] to [50]\n    set [_air? v] to [0]\nend\n\ndefine Get Point (x) (y) (z)\nSet Point 1: ((x) - (cam x)) ((y) - (cam y)) ((z) - (cam z))\nSet Point 1: (((z1) * (sin Y)) + ((x1) * (cos Y))) (y1) (((z1) * (cos Y)) - ((x1) * (sin Y)))\nSet Point 1: (x1) (((y1) * (cos X)) - ((z1) * (sin X))) (((y1) * (sin X)) + ((z1) * (cos X)))\nZ Clipping\nSet Screen Point 1: ((view factor) * ((x1) / (z1))) ((view factor) * ((y1) / (z1)))\n\ndefine Draw square (x) (y) (z) - (x2) (y2) (z2)\n3d Tri (x) (y) (z) (x2) (y2) (z2) (x2) (y) (z2)\n3d Tri (x) (y) (z) (x2) (y2) (z2) (x) (y2) (z)\n\ndefine 3d Tri (x1) (y1) (z1) (x2) (y2) (z2) (x3) (y3) (z3)\ndelete all of [tri x v]\ndelete all of [tri y v]\ndelete all of [tri z v]\nGet Point (x1) (y1) (z1)\nadd (x1) to [tri x v]\nadd (y1) to [tri y v]\nadd (z1) to [tri z v]\nGet Point (x2) (y2) (z2)\nadd (x1) to [tri x v]\nadd (y1) to [tri y v]\nadd (z1) to [tri z v]\nGet Point (x3) (y3) (z3)\nadd (x1) to [tri x v]\nadd (y1) to [tri y v]\nadd (z1) to [tri z v]\nif <not <<(item (1) of [tri z v]) < (near plane)> and <<(item (2) of [tri z v]) < (near plane)> and <(item (3) of [tri z v]) < (near plane)>>>> then\n    if <not <[0] = (item (1) of [tri z v])>> then\n        if <not <[0] = (item (2) of [tri z v])>> then\n            if <not <[0] = (item (3) of [tri z v])>> then\n                fill (item (1) of [tri x v]) (item (1) of [tri y v]) (item (2) of [tri x v]) (item (2) of [tri y v]) (item (3) of [tri x v]) (item (3) of [tri y v]) resolution: (1)\n            end\n        end\n    end\nend\nset pen size to (5)\nchange pen (brightness v) by (-10)\nDraw Line (x1) (y1) (z1) to (x2) (y2) (z2)\nDraw Line (x1) (y1) (z1) to (x3) (y3) (z3)\nDraw Line (x2) (y2) (z2) to (x3) (y3) (z3)\nchange pen (brightness v) by (10)\n\nwhen I receive [start v]\nerase all\nset pen size to (2)\nset pen color to (#30cebd)\nReset\nReset\nset [_level v] to [1]\nforever\n    erase all\n    go to x: (0) y: (0)\n    set pen size to (600)\n    set pen color to (#3593ff)\n    pen down\n    pen up\n    Detect\n    Get Level\n    Sort\n    Draw cubes\n    Settings\n    if <(Player y) < [-200]> then\n        Reset\n    end\n    if <[500] < (Player y)> then\n        Reset\n    end\n    set [cam x v] to ((Player x) + ((125) * (([cos v] of (Rotation Y) ) * ([sin v] of (Rotation X) ))))\n    set [cam y v] to ((Player y) + ((125) * (([sin v] of (Rotation Y) ) * (-1))))\n    set [cam z v] to ((Player z) + ((((125) * ([cos v] of (Rotation X) )) * ([cos v] of (Rotation Y) )) * (-1)))\nend\n\nwhen I receive [end v]\nerase all\ngo to x: (0) y: (0)\nset pen color to (#3493ff)\nset pen size to (600)\npen down\npen up\nset pen color to (#65ff00)\nPhrase [The end] starting at [-200] ((([cos v] of (((timer) - (3)) * (200)) ) * (15)) - (25)) size: [4]\nPhrase [thanks for playing] starting at [-200] ((([cos v] of (((timer) - (3)) * (100)) ) * (15)) - (75)) size: [1]\n\n@Sprite2\n\nwhen flag clicked\nset [ghost v] effect to (111111111111)\n\n
NEW GAME!\nhttps://scratch.mit.edu/projects/412639926/\n\nCurated on August 2nd, thanks so much @1xluver1!\nFOLLOW FOR MORE!!!!!!\n100% possible\nWasd to move\nArrow keys to change perspective\nPress space to jump\nYou can use the engine, just give credit\nPlay on forkphorus for less lag\nhttps://forkphorus.github.io/#414603023\nor\nhttps://turbowarp.github.io/player.html#414603023\n\nAdded Intro!\nCredits:\n@Popuiar for the list sorting\n@MathMathMath for the 3d lines\n@k0stya and @TheLogFather and me for the tri-filling\nSensing and other codes by me\n\n\n\n#games #ALL #3d #trending #fpc #curated #awesome\nhello #popular