Beyond the Earth | a platformer #all  #games

Instructions: 》First click the green flag to start the project.\n》Then click or press any key to start the game.\n》Use arrow keys/ WASD keys/ mobile controllers to \n   move.\n》Click the settings icon to mute/unmute music and \n   sounds.\n\n~ We are going to explore the space beyond Earth.\n~ So this time we will be travelling around our solar \n   system.\n~ We can come across all the planets in our solar \n   system. (dwarf planets are not included as it is difficult to create their real gravitational force properly )\n~ You can have a new experience with various \n   gravitational forces and different climatic conditions. \n   because, each planet has its own specialities.\n  (dwarf planets are not included as it is difficult to create  their real gravitational force properly )\n\n》Make sure to avoid spikes and lava.\n\n#all   #games  #astronomy  #SolarSystem  #gravity  #explore  #platformer  #mobile  #tour  #animation #planets

@Stage\n\nwhen flag clicked\nset volume to (100) %\nswitch backdrop to (earth v)\ndelete all of [different_gravity v]\nadd [9.8] to [different_gravity v]\nadd [3.5] to [different_gravity v]\nadd [8.8] to [different_gravity v]\nadd [1.6] to [different_gravity v]\nadd [3.7] to [different_gravity v]\nadd [25.9] to [different_gravity v]\nadd [11] to [different_gravity v]\nadd [10.6] to [different_gravity v]\nadd [14] to [different_gravity v]\nwait until <(stage) = [7]>\nswitch backdrop to (mercury v)\nwait until <(stage) = [13]>\nswitch backdrop to (venus v)\nwait until <(stage) = [19]>\nswitch backdrop to (moon v)\nwait until <(stage) = [25]>\nswitch backdrop to (mars v)\nwait until <(stage) = [31]>\nswitch backdrop to (jupiter v)\nwait until <(stage) = [37]>\nswitch backdrop to (saturn v)\nwait until <(stage) = [43]>\nswitch backdrop to (uranus v)\nwait until <(stage) = [49]>\nswitch backdrop to (neptune v)\n\nwhen flag clicked\nforever\n    set [gravity v] to (item (backdrop [number v]) of [different_gravity v])\nend\n\nwhen I receive [music  v]\nset volume to (100) %\n\nwhen I receive [music off  v]\nset volume to (0) %\n\nwhen I receive [begin  v]\nwait (2) seconds\nforever\n    play sound [AUD-20220626-WA0019 v] until done\nend\n\n@Player \n\ndefine Move - in steps (steps)\nchange [falling v] by (1)\nrepeat (steps)\n    set [last value v] to (x position)\n    change x by ((speed x) / (steps))\n    if <<touching (surface v)?> or <touching (water v)?>> then\n        set x to (last value)\n        set [speed x v] to [0]\n    end\n    set [last value v] to (y position)\n    change y by ((speed y) / (steps))\n    if <<touching (surface v)?> or <touching (water v)?>> then\n        set y to (last value)\n        if <(speed y) < [0]> then\n            set [falling v] to [0]\n        end\n        set [speed y v] to [0]\n    end\nend\n\nwhen I receive [start  v]\nforever\n    if <<<<key (space v) pressed?> or <key (up arrow v) pressed?>> or <key (w v) pressed?>> or <<mouse down?> and <(mouse y) > (y position)>>> then\n        if <(falling) < [3]> then\n            set [speed y v] to (Jump Force)\n        end\n    end\n    if <<<key (left arrow v) pressed?> or <key (a v) pressed?>> or <<mouse down?> and <(x position) > (mouse x)>>> then\n        change [speed x v] by ((Acceleration) * (-1))\n        point in direction (-90)\n    end\n    if <<<key (right arrow v) pressed?> or <key (d v) pressed?>> or <<mouse down?> and <(mouse x) > (x position)>>> then\n        change [speed x v] by (Acceleration)\n        point in direction (90)\n    end\n    set [speed x v] to ((speed x) * (Resistance))\n    change [speed y v] by (Gravity)\n    Move - in steps (([abs v] of (speed x) ) + ([abs v] of (speed y) ))\nend\n\nwhen I receive [next v]\nset [jump force v] to [10]\nset [acceleration v] to [2]\nset [resistance v] to [0.8]\nset [speed y v] to [0]\npoint in direction (90)\ngo to [front v] layer\ngo to x: (-210) y: (50)\n\nwhen flag clicked\nforever\n    if <touching (spikes & lava v)?> then\n        start sound [Rip v]\n        restart\n    end\n    if <touching (fall v)?> then\n        start sound [Spiral v]\n        restart\n    end\n    if <(x position) > [240]> then\n        broadcast (Next v)\n    end\nend\n\ndefine restart\nset [jump force v] to [10]\nset [acceleration v] to [2]\nset [resistance v] to [0.8]\nset [speed y v] to [0]\npoint in direction (90)\ngo to [front v] layer\ngo to x: (-210) y: (50)\n\nwhen I receive [sound v]\nset volume to (100) %\n\nwhen I receive [sound off v]\nset volume to (0) %\n\nwhen I receive [you won v]\nstop [other scripts in sprite v]\n\nwhen I receive [begin  v]\nset [jump force v] to [10]\nset [acceleration v] to [2]\nset [resistance v] to [0.8]\nset [speed y v] to [0]\nset volume to (100) %\npoint in direction (90)\ngo to [front v] layer\ngo to x: (-210) y: (50)\nbroadcast (start  v)\n\nwhen flag clicked\nwait until <(stage) = [5]>\nrepeat until <(stage) = [6]>\n    if <touching (water v)?> then\n        Fix water floating\n    end\nend\n\ndefine Fix water floating\nrepeat until <not <touching (water v)?>>\n    change y by (1)\nend\n\nwhen flag clicked\nforever\n    set [gravity v] to (((item (backdrop [number v]) of [different_gravity v]) / (10)) * (-1))\nend\n\n@Surface\n\nwhen flag clicked\nset [stage v] to [1]\nshow\ngo to x: (0) y: (0)\nswitch costume to (earth1 v)\ngo to [back v] layer\ngo [forward v] (1) layers\n\nwhen I receive [next v]\nnext costume\nset [stage v] to (costume [number v])\n\n@Spikes & lava\n\nwhen flag clicked\ngo to x: (0) y: (0)\ngo to [back v] layer\nswitch costume to (e1 v)\nwait until <(stage) = [15]>\ngo to [front v] layer\nwait until <(stage) = [16]>\ngo to [back v] layer\n\nwhen I receive [next v]\nnext costume\n\n@Clouds\n\nwhen flag clicked\nshow\nrepeat (4)\n    create clone of (_myself_ v)\nend\nhide\n\nwhen I start as a clone\ngo to [back v] layer\ngo to x: (pick random (300) to (-300)) y: (pick random (50) to (180))\nforever\n    set [ghost v] effect to (pick random (0) to (15))\n    set size to (pick random (75) to (110)) %\n    switch costume to (pick random (1) to (4))\n    repeat until <(x position) > [310]>\n        change x by ((size) / (50))\n        if <not <(backdrop [number v]) = [1]>> then\n            delete this clone\n        end\n    end\n    go to x: (-310) y: (pick random (50) to (180))\nend\n\n@Water\n\nwhen flag clicked\nhide\nwait until <(stage) = [5]>\nshow\ngo to x: (0) y: (0)\ncreate clone of (_myself_ v)\nrepeat until <(stage) = [6]>\n    move (4) steps\n    if <(x position) > [499]> then\n        go to x: (-500) y: (0)\n    end\nend\nhide\n\nwhen I start as a clone\ngo to x: (500) y: (0)\nrepeat until <(stage) = [6]>\n    move (4) steps\n    if <(x position) > [499]> then\n        go to x: (-500) y: (0)\n    end\nend\ndelete this clone\n\n@fall\n\n@Fog\n\nwhen flag clicked\nshow\nrepeat (10)\n    go to [back v] layer\n    go to x: (0) y: (0)\nend\nswitch costume to (pick random (1) to (4))\nforever\n    change x by (-1)\n    if <(x position) < [-477]> then\n        go to x: (478) y: (0)\n    end\n    if <(backdrop [number v]) = [1]> then\n        set [ghost v] effect to (100)\n        go to [back v] layer\n    end\n    if <(backdrop [number v]) = [2]> then\n        set [ghost v] effect to (70)\n        go to [back v] layer\n    end\n    if <(backdrop [number v]) = [3]> then\n        set [ghost v] effect to (40)\n        go to [back v] layer\n    end\n    if <(backdrop [number v]) = [4]> then\n        set [ghost v] effect to (100)\n        go to [back v] layer\n    end\n    if <(backdrop [number v]) = [5]> then\n        set [ghost v] effect to (50)\n        go to [back v] layer\n    end\n    if <(backdrop [number v]) = [6]> then\n        set [ghost v] effect to (40)\n        go to [front v] layer\n    end\n    if <(backdrop [number v]) = [7]> then\n        set [ghost v] effect to (37.5)\n        go to [front v] layer\n    end\n    if <(backdrop [number v]) = [8]> then\n        set [ghost v] effect to (35)\n        go to [front v] layer\n    end\n    if <(backdrop [number v]) = [9]> then\n        set [ghost v] effect to (35)\n        go to [front v] layer\n    end\nend\n\nwhen I receive [you won v]\nhide\n\n@Fog2\n\nwhen flag clicked\ngo to x: (0) y: (0)\nhide\nwait until <(backdrop [number v]) = [6]>\nswitch costume to (pick random (1) to (4))\nset size to (150) %\nset [ghost v] effect to (50)\nshow\ngo to [back v] layer\nwait until <(backdrop [number v]) = [7]>\nswitch costume to (pick random (1) to (4))\nset size to (150) %\nset [ghost v] effect to (50)\nshow\ngo to [back v] layer\n\nwhen I receive [you won v]\nhide\n\n@Fog3\n\nwhen flag clicked\nshow\nrepeat (10)\n    go to [back v] layer\n    go to x: (478) y: (0)\nend\nswitch costume to (pick random (1) to (4))\nforever\n    change x by (-1)\n    if <(x position) < [-477]> then\n        go to x: (478) y: (0)\n        switch costume to (pick random (1) to (4))\n    end\n    if <(backdrop [number v]) = [1]> then\n        set [ghost v] effect to (100)\n        go to [back v] layer\n    end\n    if <(backdrop [number v]) = [2]> then\n        set [ghost v] effect to (70)\n        go to [back v] layer\n    end\n    if <(backdrop [number v]) = [3]> then\n        set [ghost v] effect to (40)\n        go to [back v] layer\n    end\n    if <(backdrop [number v]) = [4]> then\n        set [ghost v] effect to (100)\n        go to [back v] layer\n    end\n    if <(backdrop [number v]) = [5]> then\n        set [ghost v] effect to (50)\n        go to [back v] layer\n    end\n    if <(backdrop [number v]) = [6]> then\n        set [ghost v] effect to (40)\n        go to [front v] layer\n    end\n    if <(backdrop [number v]) = [7]> then\n        set [ghost v] effect to (37.5)\n        go to [front v] layer\n    end\n    if <(backdrop [number v]) = [8]> then\n        set [ghost v] effect to (35)\n        go to [front v] layer\n    end\n    if <(backdrop [number v]) = [9]> then\n        set [ghost v] effect to (35)\n        go to [front v] layer\n    end\nend\n\nwhen I receive [you won v]\nhide\n\n@Text\n\nwhen flag clicked\nhide\n\nwhen I receive [hide v]\nhide\n\nwhen I receive [show  v]\nshow\n\nwhen flag clicked\nwait until <(stage) = [55]>\nswitch costume to (costume55 v)\ngo to x: (0) y: (0)\n\nforever\n    go to [front v] layer\nend\n\nwhen I receive [you won v]\nhide\n\nwhen I receive [begin  v]\nshow\ngo to x: (0) y: (125)\ngo to [front v] layer\nforever\n    switch costume to (stage)\n    if <(backdrop [number v]) = [1]> then\n        clear graphic effects\n    else\n        set [brightness v] effect to (100)\n    end\nend\n\n@Settings\n\nwhen flag clicked\nchange [settings_on/off v] by (0)\ngo to x: (0) y: (0)\ngo to [front v] layer\nswitch costume to (smart-quick-settings-1 v)\n\nwhen flag clicked\nshow\nforever\n    go to [front v] layer\nend\n\nwhen this sprite clicked\nif <(settings_on/off) = [0]> then\n    switch costume to (close  v)\n    set [brightness v] effect to (100)\n    set [settings_on/off v] to [1]\n    set [move v] to [0]\nelse\n    switch costume to (smart-quick-settings-1 v)\n    clear graphic effects\n    set [settings_on/off v] to [0]\n    set [move v] to [1]\nend\n\nwhen I receive [you won v]\nhide\n\n@Sound icons\n\nwhen flag clicked\nhide\nwait until <(settings_on/off) = [0]>\nset [sound_on/off v] to [1]\nswitch costume to (s1 v)\ngo to x: (-50) y: (0)\ncreate clone of (_myself_ v)\nforever\n    if <(settings_on/off) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen I start as a clone\nset [mute_on/off v] to [1]\nswitch costume to (m1 v)\ngo to x: (50) y: (0)\nforever\n    if <(settings_on/off) = [1]> then\n        show\n    else\n        hide\n    end\nend\n\nwhen this sprite clicked\nif <(mouse x) < [0]> then\n    if <(sound_on/off) = [1]> then\n        switch costume to (s1 v)\n        set [sound_on/off v] to [0]\n        broadcast (Sound v)\n    else\n        switch costume to (s2 v)\n        set [sound_on/off v] to [1]\n        broadcast (Sound off v)\n    end\nend\nif <(mouse x) > [0]> then\n    if <(mute_on/off) = [1]> then\n        switch costume to (m1 v)\n        set [mute_on/off v] to [0]\n        broadcast (Music  v)\n    else\n        switch costume to (m2 v)\n        set [mute_on/off v] to [1]\n        broadcast (Music off  v)\n    end\nend\n\n@Abouts\n\ndefine Show\nbroadcast (Hide v)\ngo to x: (0) y: (-350)\nset [speed v] to [10]\nset [move v] to [0]\nrepeat until <(speed) < [0]>\n    go to [front v] layer\n    change y by (speed)\n    change [speed v] by (-0.15)\nend\ngo to x: (0) y: (0)\nreset timer\nwait until <<<mouse down?> or <(timer) > [5]>> or <key (any v) pressed?>>\nrepeat until <(y position) > [375]>\n    go to [front v] layer\n    change y by ((speed) * (-1))\n    change [speed v] by (-0.15)\nend\nset [move v] to [1]\nbroadcast (Show  v)\n\nwhen I receive [begin  v]\nshow\nShow\nwait until <(stage) = [7]>\nShow\nwait until <(stage) = [13]>\nShow\nwait until <(stage) = [19]>\nShow\nwait until <(stage) = [25]>\nShow\nwait until <(stage) = [31]>\nShow\nwait until <(stage) = [37]>\nShow\nwait until <(stage) = [43]>\nShow\nwait until <(stage) = [49]>\nShow\nwait until <<(stage) = [1]> and <(backdrop [number v]) = [1]>>\nset [start v] to [1]\nbroadcast (You won v)\nhide\n\nwhen I receive [begin  v]\nforever\n    switch costume to (backdrop [number v])\nend\n\nwhen flag clicked\ngo to [back v] layer\n\n@Thumbnails \n\nwhen flag clicked\nswitch costume to (img-20220605-wa0011 v)\nwait (2) seconds\nbroadcast (begin  v)\nset [ghost v] effect to (100)\nwait until <(stage) = [55]>\nswitch costume to (img-20220605-wa2 v)\nrepeat (100)\n    change [ghost v] effect by (-1)\nend\nbroadcast (You won v)\ngo to [front v] layer\n\nwhen flag clicked\nforever\n    go to [front v] layer\nend\n\n