Dark - A 100% pen Scrolling Platformer         #games #all
@Stage\n\nwhen flag clicked\nforever\n    play sound [Unlimited v] until done\nend\n\n@PEN\n\ndefine Scrolling\nchange [scroll x v] by (() - (round ((x position) / (10))))\nchange [x position v] by (() - (round ((x position) / (10))))\nchange [scroll y v] by (() - (round ((y position) / (10))))\nchange [y position v] by (() - (round ((y position) / (10))))\n\ndefine Add Platform (x) (y) (width) (height) (type)\nadd (x) to [level xs v]\nadd (y) to [level ys v]\nadd (width) to [level widths v]\nadd (height) to [level heights v]\nadd (type) to [level types v]\n\ndefine Draw\npen up\nerase all\nset pen size to (5)\nset [i v] to [0]\nrepeat (length of [level xs v])\n    change [i v] by (1)\n    if <<<((Scroll Y) + (((item (i) of [level ys v]) + (item (i) of [level heights v])) - (5))) > [-180]> and <((Scroll Y) + ((item (i) of [level ys v]) + (5))) < [240]>> and <<((Scroll X) + (((item (i) of [level xs v]) + (item (i) of [level widths v])) - (5))) > [-240]> and <((Scroll X) + ((item (i) of [level xs v]) + (5))) < [240]>>> then\n        Go To ((item (i) of [level xs v]) + (5)) ((item (i) of [level ys v]) + (5))\n        set pen color to (#ffffff)\n        if <(item (i) of [level types v]) = [2]> then\n            set pen color to (#faff00)\n        end\n        if <(item (i) of [level types v]) = [1]> then\n            set pen color to (#ffffff)\n        end\n        if <(item (i) of [level types v]) = [3]> then\n            set pen color to (#ff0000)\n        end\n        pen down\n        Go To (((item (i) of [level xs v]) + (item (i) of [level widths v])) - (5)) ((item (i) of [level ys v]) + (5))\n        Go To (((item (i) of [level xs v]) + (item (i) of [level widths v])) - (5)) (((item (i) of [level ys v]) + (item (i) of [level heights v])) - (5))\n        Go To ((item (i) of [level xs v]) + (5)) (((item (i) of [level ys v]) + (item (i) of [level heights v])) - (5))\n        Go To ((item (i) of [level xs v]) + (5)) ((item (i) of [level ys v]) + (5))\n        pen up\n    end\nend\nset pen color to (#00efff)\ngo to x: (x position) y: (y position)\npen down\ngo to x: (x position) y: ((y position) + (20))\ngo to x: ((x position) + (20)) y: ((y position) + (20))\ngo to x: ((x position) + (20)) y: (y position)\ngo to x: (x position) y: (y position)\npen up\n\ndefine Create Level\ndelete (all) of [level xs v]\ndelete (all) of [level ys v]\ndelete (all) of [level widths v]\ndelete (all) of [level heights v]\ndelete (all) of [level types v]\nAdd Platform (-10) (-5) (10) (5000) (1)\nAdd Platform (-10) (-5) (500) (10) (1)\nAdd Platform (480) (-5) (100) (10) (2)\nAdd Platform (570) (-5) (240) (10) (3)\nAdd Platform (800) (-5) (200) (10) (1)\nAdd Platform (990) (-5) (125) (10) (2)\nAdd Platform (850) (150) (125) (10) (1)\nAdd Platform (850) (275) (125) (10) (2)\nAdd Platform (1100) (425) (150) (10) (1)\nAdd Platform (1300) (275) (150) (10) (1)\nAdd Platform (1450) (75) (200) (10) (1)\nAdd Platform (1700) (125) (10) (10) (1)\nAdd Platform (1800) (125) (10) (10) (1)\nAdd Platform (1900) (125) (10) (10) (1)\nAdd Platform (2000) (125) (10) (10) (1)\nAdd Platform (2150) (125) (10) (10) (1)\nAdd Platform (2300) (125) (10) (10) (1)\nAdd Platform (2450) (125) (10) (10) (1)\nAdd Platform (2600) (125) (10) (10) (1)\nAdd Platform (2750) (125) (10) (10) (1)\nAdd Platform (2850) (125) (200) (10) (1)\nAdd Platform (3040) (125) (10) (5000) (1)\n\nwhen flag clicked\nCreate Level\nset [xv v] to [0]\nset [yv v] to [0]\nset [x position v] to [0]\nset [y position v] to [0]\nset [scroll x v] to [0]\nset [scroll y v] to [0]\nforever\n    Draw\n    Update\n    if <<key (right arrow v) pressed?> or <key (d v) pressed?>> then\n        change [xv v] by (1)\n    end\n    if <<key (left arrow v) pressed?> or <key (a v) pressed?>> then\n        change [xv v] by (-1)\n    end\n    set [xv v] to ((Xv) * (0.9))\n    change [x position v] by (Xv)\n    Update\n    if <[touching v] contains [1]?> then\n        change [y position v] by (1)\n        Update\n        if <[touching v] contains [1]?> then\n            change [y position v] by (1)\n            Update\n            if <[touching v] contains [1]?> then\n                change [y position v] by (1)\n                Update\n                if <[touching v] contains [1]?> then\n                    change [y position v] by (1)\n                    Update\n                    if <[touching v] contains [1]?> then\n                        change [y position v] by (1)\n                        Update\n                        if <[touching v] contains [1]?> then\n                            change [x position v] by ((Xv) * (-1))\n                            change [y position v] by (-5)\n                            \n                                if <(Xv) > [0]> then\n                                    set [xv v] to [-5]\n                                else\n                                    set [xv v] to [5]\n                                end\n                                set [yv v] to [10]\n                            else\n                                set [xv v] to [0]\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\n    Update\n    change [yv v] by (-1)\n    change [y position v] by (Yv)\n    Update\n    if <[touching v] contains [1]?> then\n        change [y position v] by ((Yv) * (-1))\n        set [yv v] to [0]\n    end\n    Update\n    change [y position v] by (-1)\n    Update\n    if <[touching v] contains [1]?> then\n        if <<key (up arrow v) pressed?> or <key (w v) pressed?>> then\n            set [yv v] to [15]\n        end\n    end\n    Update\n    if <[touching v] contains [2]?> then\n        set [yv v] to [20]\n    end\n    Update\n    if <<[touching v] contains [3]?> or <(Scroll Y) > [500]>> then\n        set [xv v] to [0]\n        set [yv v] to [0]\n        set [x position v] to [0]\n        set [y position v] to [0]\n        set [scroll x v] to [0]\n        set [scroll y v] to [0]\n    end\n    Update\n    change [y position v] by (1)\n    Scrolling\nend\n\ndefine Update\ndelete (all) of [touching v]\nset [i v] to [0]\nrepeat (length of [level xs v])\n    change [i v] by (1)\n    if <<<(x position) < (((item (i) of [level xs v]) + (Scroll X)) + (item (i) of [level widths v]))> and <((x position) + (20)) > ((item (i) of [level xs v]) + (Scroll X))>> and <<(y position) < (((item (i) of [level ys v]) + (Scroll Y)) + (item (i) of [level heights v]))> and <((y position) + (20)) > ((item (i) of [level ys v]) + (Scroll Y))>>> then\n        if <not <[touching v] contains (item (i) of [level types v])?>> then\n            add (item (i) of [level types v]) to [touching v]\n        end\n    end\nend\n\ndefine Go To (x) (y)\ngo to x: ((x) + (Scroll X)) y: ((y) + (Scroll Y))\n\nwhen flag clicked\nforever\n    Update\nend\n\nAdd Platform (1640) (75) (10) (5000) (1)\n\n
Dark a 100% pen Scrolling Platformer\nWAD/Arrow Keys     to move\nGet to the big wall to win!\nSTOP ADVERTISING!\nDon't ask for checkpoints