STYGIAN - A mobile platformer
@Stage\n\nwhen flag clicked\nset volume to (20) %\nstop all sounds\nset [level v] to [1]\nforever\n    switch backdrop to (Level)\n    repeat until <(Level) = [9]>\n        Music\n        if <(Level) = [9]> then\n            stop all sounds\n        end\n    end\nend\n\ndefine Music\nplay sound [City Lights v] until done\n\n@Player\n\nwhen flag clicked\nshow\ngo to x: (-198) y: (-142)\nset [x velocity v] to [0]\nset [y velocity v] to [0]\nforever\n    Platform [12] [-1] [0.7] [2]\n    if <touching (spikes v)?> then\n        go to x: (-198) y: (-142)\n        set [x velocity v] to [0]\n        set [y velocity v] to [0]\n    end\n    if <touching (flag v)?> then\n        change [level v] by (1)\n        set [x velocity v] to [0]\n        set [y velocity v] to [0]\n        go to x: (-198) y: (-142)\n    end\nend\n\ndefine Platform (jump height) (gravity) (friction) (running speed)\nswitch costume to (hitbox v)\nif <<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(mouse x) > [100]>>>> then\n    point in direction (90)\n    change [x velocity v] by (running speed)\nend\nif <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(mouse x) < [-100]>>>> then\n    point in direction (-90)\n    change [x velocity v] by ((running speed) * (-1))\nend\nset [x velocity v] to ((X velocity) * (friction))\nchange x by (X velocity)\nif <touching (level v)?> then\n    set [slope v] to [0]\n    repeat until <<(Slope) = [8]> or <not <touching (level v)?>>>\n        change [slope v] by (1)\n        change y by (1)\n    end\nend\nif <touching (level v)?> then\n    change y by ((Slope) * (-1))\n    repeat ([ceiling v] of ([abs v] of (X velocity) ) )\n        change x by ((([abs v] of (X velocity) ) / (X velocity)) * (-1))\n    end\n    set [x velocity v] to [0]\nend\nchange y by (Y velocity)\nif <touching (level v)?> then\n    repeat ([ceiling v] of ([abs v] of (Y velocity) ) )\n        if <touching (level v)?> then\n            change y by ((([abs v] of (Y velocity) ) / (Y velocity)) * (-1))\n        end\n    end\n    if <<(([abs v] of (Y velocity) ) / (Y velocity)) = [-1]> and <<key (w v) pressed?> or <<key (up arrow v) pressed?> or <<mouse down?> and <(mouse y) > [90]>>>>> then\n        set [y velocity v] to (jump height)\n    else\n        set [y velocity v] to [0]\n    end\nelse\n    change [y velocity v] by (-1)\nend\nswitch costume to (me v)\nif <(Y velocity) > [2]> then\n    switch costume to (jumping me v)\nend\nif <(Y velocity) < [-3]> then\n    switch costume to (falling me v)\nend\nif <<<key (right arrow v) pressed?> or <<key (d v) pressed?> or <<mouse down?> and <(mouse x) > [100]>>>> or <<key (left arrow v) pressed?> or <<key (a v) pressed?> or <<mouse down?> and <(mouse x) < [-100]>>>>> then\n    switch costume to (Walk)\nend\n\nwhen flag clicked\nset [walk v] to [3]\nforever\n    change [walk v] by (1)\n    if <(Walk) > [6]> then\n        set [walk v] to [3]\n    end\n    wait (0.01) seconds\nend\n\nset [level v] to [10]\n\n@Level\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\nforever\n    switch costume to (Level)\nend\n\nset [level v] to [9]\n\nwhen I receive [animation v]\ngo to [back v] layer\n\n@Spikes\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\nforever\n    switch costume to (Level)\nend\n\nset [level v] to [9]\n\nwhen I receive [animation v]\ngo to [back v] layer\n\n@Flag\n\nwhen flag clicked\nshow\nforever\n    next costume\n    wait (0.1) seconds\nend\n\nwhen flag clicked\nforever\n    if <(Level) = [1]> then\n        go to x: (-196) y: (-9)\n    else\n        if <(Level) = [2]> then\n            go to x: (217) y: (79)\n        else\n            if <(Level) = [3]> then\n                go to x: (-209) y: (138)\n            else\n                if <(Level) = [4]> then\n                    go to x: (226) y: (92)\n                else\n                    if <(Level) = [5]> then\n                        go to x: (-209) y: (138)\n                    else\n                        if <(Level) = [6]> then\n                            go to x: (-210) y: (52)\n                        else\n                            if <(Level) = [7]> then\n                                go to x: (-212) y: (123)\n                            else\n                                if <(Level) = [8]> then\n                                    go to x: (204) y: (135)\n                                else\n                                    if <(Level) = [9]> then\n                                        go to x: (13) y: (-148)\n                                    end\n                                end\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\n\ngo to x: (22) y: (-146)\n\nset [level v] to [9]\n\nwhen I receive [animation v]\ngo to [back v] layer\n\n@background\n\nwhen flag clicked\nshow\ngo to x: (0) y: (0)\ngo to [back v] layer\nforever\n    switch costume to (Level)\nend\n\nset [level v] to [9]\n\nwhen I receive [animation v]\ngo to [back v] layer\n\n@stuff\n\nwhen flag clicked\nshow\ngo to [front v] layer\ngo to x: (0) y: (0)\nset [ghost v] effect to (85)\nrepeat until <(Level) = [10]>\n    go to [front v] layer\nend\ngo to [back v] layer\n\nset [level v] to [1]\n\n@level displayer\n\nwhen flag clicked\nforever\n    go to x: (0) y: (15)\n    switch costume to (Level)\nend\n\n@thanks\n\nwhen flag clicked\nset [level v] to [0]\nhide\ngo to x: (0) y: (0)\nforever\n    if <(Level) = [10]> then\n        broadcast (Animation v)\n    end\nend\n\nwhen I receive [animation v]\nshow\ngo to [front v] layer\n\n@thumbnail\n\nshow\ngo to [front v] layer\ngo to x: (0) y: (0)\nclear graphic effects\n\nwhen flag clicked\nhide\n\n
Use the WASD keys , touch the OUTER SIDES of the screen or the arrow keys to Move.\nTry to get to the flag in each level\n=========================================\nI would REALLY like to go on the front page so if you like this platformer could you please like and favorite?