Ninja island - A platformer
@Stage\n\n@Story\n\nwhen flag clicked\nshow\ngo to [front v] layer\nswitch costume to (costume1 v)\n\nwhen this sprite clicked\nif <not <(costume [number v]) = [4]>> then\n    repeat (10)\n        change [pixelate v] effect by (10)\n        change [ghost v] effect by (10)\n    end\n    next costume\n    repeat (10)\n        change [pixelate v] effect by (-10)\n        change [ghost v] effect by (-10)\n    end\nelse\n    repeat (10)\n        change [pixelate v] effect by (10)\n        change [ghost v] effect by (10)\n    end\n    broadcast (Game v)\n    hide\nend\n\n@Thumbnail / TB\n\nwhen flag clicked\nforever\n    set [ghost v] effect to (100)\n    go to [front v] layer\n    go [forward v] (1) layers\n    show\nend\n\n@Text\n\nwhen flag clicked\nhide\n\nwhen I receive [game v]\nshow\nforever\n    go to [front v] layer\n    switch costume to (LV)\nend\n\n@bouncy\n\nwhen flag clicked\nhide\n\nwhen I receive [game v]\nshow\nforever\n    switch costume to (LV)\nend\n\n@Lava\n\nwhen flag clicked\nhide\n\nwhen I receive [game v]\ngo to [back v] layer\nshow\nforever\n    switch costume to (LV)\nend\n\nwhen I receive [game v]\nforever\n    set y to (([cos v] of ((timer) * (150)) ) * (7))\nend\n\n@Spikes\n\nwhen flag clicked\nhide\n\nwhen I receive [game v]\nshow\nforever\n    switch costume to (LV)\nend\n\n@ground\n\nwhen flag clicked\nhide\n\nwhen I receive [game v]\nshow\nforever\n    switch costume to (LV)\nend\n\n@Player\n\nwhen I receive [game v]\nforever\n    if <<[240] < (x position)> and <(dead?) = [0]>> then\n        broadcast (NAXT LEVEL v)\n        change [lv v] by (1)\n        Reset | Madrid2030\n    end\nend\n\nwhen I receive [game v]\nReset | Madrid2030\nforever\n    Tick | Madrid2030\nend\n\nwhen I receive [game v]\nset [lv v] to [1]\nforever\n    create clone of (_myself_ v)\nend\n\ndefine Reset | Madrid2030\nclear graphic effects\npoint in direction (90)\ngo to x: (-201) y: (30)\nswitch costume to (1 v)\nset [dead? v] to [0]\nset [xv v] to [0]\nset [yv v] to [0]\nset size to (30) %\nshow\n\ndefine Dead | Madrid2030\nset [dead? v] to [1]\nrepeat (25)\n    change [ghost v] effect by (4)\n    change y by (4)\n    turn right (4) degrees\nend\nReset | Madrid2030\n\nwhen I start as a clone\nswitch costume to (3 v)\nrepeat (10)\n    change [ghost v] effect by (10)\n    change size by (-1.5)\nend\ndelete this clone\n\ndefine Setup | Madrid2030\nhide variable [xv v]\nhide variable [dead? v]\nhide variable [lv v]\nhide variable [yv v]\nset [dead? v] to [0]\nset [lv v] to [1]\nset size to (30) %\nhide\n\ndefine Tick | Madrid2030\nif <<<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> and <(dead?) = [0]>> then\n    switch costume to (1 v)\n    change [xv v] by (1)\nend\nif <<<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(mouse x) < (x position)>>> and <(dead?) = [0]>> then\n    switch costume to (2 v)\n    change [xv v] by (-1)\nend\nset [xv v] to ((Xv) * (.9))\nchange x by (Xv)\nif <touching (ground v)?> then\n    change y by (2)\n    if <touching (ground v)?> then\n        change y by (2)\n    end\n    if <touching (ground v)?> then\n        change y by (2)\n        if <touching (ground v)?> then\n            change y by (2)\n            if <touching (ground v)?> then\n                change y by (2)\n                if <touching (ground v)?> then\n                    change x by ((Xv) * (-2))\n                    change y by (-5)\n                    if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > ((y position) + (10))>>>> then\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 [13]\n                    else\n                        set [xv v] to [0]\n                    end\n                end\n            end\n        end\n    end\nend\nchange [yv v] by (-0.8)\nchange y by (Yv)\nif <touching (ground v)?> then\n    change y by ((Yv) * (-1))\n    set [yv v] to [0]\nend\nchange y by (-1)\nif <touching (ground v)?> then\n    if <<key (up arrow v) pressed?> or <<key (w v) pressed?> or <<mouse down?> and <(mouse y) > ((y position) + (10))>>>> then\n        set [yv v] to [12]\n    end\nend\nchange y by (1)\nif <<touching (lava v)?> or <touching (spikes v)?>> then\n    Dead | Madrid2030\nend\nif <(y position) < [-180]> then\n    Dead | Madrid2030\nend\nif <touching (bouncy v)?> then\n    set [yv v] to [15]\nend\n\nwhen flag clicked\nSetup | Madrid2030\n\nwhen I receive [game v]\nforever\n    if <touching (bouncy v)?> then\n        play sound [Jump v] until done\n        wait until <not <touching (bouncy v)?>>\n    end\nend\n\n
Click the green flag and use the keys A, W and D to play!\n\nAll levels are possible, tested 3 times.