David le cube (platformer)
@Stage\n\n@David\n\nwhen flag clicked\nset [gravité v] to [-1]\nset [force saut v] to [12]\nset [accélération v] to [1.5]\nset [résistance v] to [0.8]\nset [vitesse y v] to [0]\ngo to x: (-143) y: (58)\nforever\n    if <key (up arrow v) pressed?> then\n        if <(chute) < [3]> then\n            set [vitesse y v] to (force saut)\n        end\n    end\n    if <key (left arrow v) pressed?> then\n        change [vitesse x v] by ((0) - (accélération))\n        switch costume to (costume2 v)\n    end\n    if <key (right arrow v) pressed?> then\n        change [vitesse x v] by (1.5)\n        switch costume to (costume1 v)\n    end\n    set [vitesse x v] to ((résistance) * (vitesse x))\n    change [vitesse y v] by (gravité)\n    mouvement pas (([abs v] of (vitesse y) ) + ([abs v] of (vitesse x) ))\nend\n\ndefine mouvement pas (pas)\nchange [chute v] by (1)\nrepeat (pas)\n    set [dernière valeur v] to (x position)\n    change x by ((vitesse x) / (pas))\n    if <touching color (#03ff2a)?> then\n        set x to (dernière valeur)\n        set [vitesse x v] to [0]\n    end\n    set [dernière valeur v] to (y position)\n    change y by ((vitesse y) / (pas))\n    if <touching color (#03ff2a)?> then\n        set y to (dernière valeur)\n        if <(vitesse y) < [0]> then\n            set [chute v] to [0]\n        end\n        set [vitesse y v] to [0]\n    end\nend\n\nwhen flag clicked\nshow\nswitch costume to (costume1 v)\nswitch backdrop to (decor1 v)\ngo to x: (-143) y: (58)\nset [vie v] to [10]\nset [niveau v] to [1]\nforever\n    if <touching color (#fff103)?> then\n        next backdrop\n        go to x: (-143) y: (58)\n        change [niveau v] by (1)\n    end\n    if <touching color (#ff0303)?> then\n        change [vie v] by (-1)\n        go to x: (-143) y: (58)\n        start sound [oh non v]\n        switch costume to (david mal v)\n        wait (0.2) seconds\n        switch costume to (costume1 v)\n    end\n    if <(Vie) = [0]> then\n        stop all sounds\n        start sound [Lose v]\n        hide\n        switch backdrop to (game over v)\n        wait (3) seconds\n        switch backdrop to (david le cube v)\n        wait (3) seconds\n        stop [all v]\n    end\nend\n\nwhen flag clicked\nstart sound [i'm david v]\nforever\n    if <touching color (#ea03ff)?> then\n        start sound [Teleport2 v]\n        go to x: (145) y: (-87)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching color (#c505ff)?> then\n        go to x: (-214) y: (-54)\n        start sound [Teleport2 v]\n    end\nend\n\nwhen flag clicked\nforever\n    play sound [Dance Magic v] until done\nend\n\nwhen flag clicked\nforever\n    if <touching color (#a40fff)?> then\n        go to x: (112) y: (-151)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching color (#fff42b)?> then\n        glide (0.2) secs to x: (208) y: (93)\n        say [C'était un piège ce n'est pas la vrai sortie !] for (3) seconds\n        go to x: (-143) y: (58)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching color (#ff9c00)?> then\n        glide (0.2) secs to x: (-138) y: (143)\n        switch backdrop to (arrière-plan13 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching color (#ffeb30)?> then\n        glide (0.2) secs to x: (-96) y: (73)\n        wait (1) seconds\n        go to x: (-143) y: (58)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching color (#ffdf26)?> then\n        glide (0.2) secs to x: (-12) y: (73)\n        wait (1) seconds\n        go to x: (-143) y: (58)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching color (#ffff52)?> then\n        glide (0.2) secs to x: (103) y: (73)\n        wait (1) seconds\n        go to x: (-143) y: (58)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching color (#ea1bd5)?> then\n        go to x: (-213) y: (102)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching color (#f629ff)?> then\n        go to x: (37) y: (142)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching color (#2aff00)?> then\n        switch backdrop to (salle au trésor v)\n        go to x: (-120) y: (48)\n    end\nend\n\nwhen flag clicked\nforever\n    if <touching color (#18ff00)?> then\n        switch backdrop to (winner v)\n        hide\n        wait (8) seconds\n        start sound [non fin v]\n        switch backdrop to (arrière-plan18 v)\n    end\nend\n\nwhen flag clicked\nforever\n    if <mouse down?> then\n        go to x: (-143) y: (58)\n    end\nend\n\n@Sprite1\n\nwhen flag clicked\nforever\n    hide\n    if <([backdrop # v] of [_stage_ v]) = [12]> then\n        show\n        go to x: (172) y: (12)\n        repeat (2)\n            glide (2) secs to x: (-113) y: (12)\n            glide (2) secs to x: (172) y: (12)\n        end\n        hide\n        if <(Vie) = [0]> then\n            hide\n        end\n    end\nend\n\n@Sprite2\n\nwhen flag clicked\nforever\n    hide\n    if <([backdrop # v] of [_stage_ v]) = [16]> then\n        show\n        go to x: (230) y: (97)\n    end\n    if <(Vie) = [0]> then\n        hide\n    end\nend\n\n@Sprite3\n\nwhen flag clicked\nforever\n    hide\n    if <([backdrop # v] of [_stage_ v]) = [17]> then\n        show\n        go to x: (-62) y: (-153)\n        repeat (6)\n            glide (0.5) secs to x: (-203) y: (-153)\n            glide (0.5) secs to x: (-62) y: (-153)\n        end\n        hide\n        if <(Vie) = [0]> then\n            hide\n        end\n    end\nend\n\n@Sprite4\n\nwhen flag clicked\nhide\nforever\n    if <([backdrop # v] of [_stage_ v]) = [18]> then\n        go to x: (27) y: (24)\n        show\n    end\n    if <([backdrop # v] of [_stage_ v]) = [19]> then\n        go to x: (27) y: (24)\n        show\n    end\n    if <(Vie) = [0]> then\n        hide\n    end\n    if <touching (david v)?> then\n        hide\n    end\n    if <([backdrop # v] of [_stage_ v]) = [20]> then\n        hide\n    end\nend\n\n@Sprite5\n\nwhen flag clicked\nhide\nforever\n    if <([backdrop # v] of [_stage_ v]) = [22]> then\n        show\n        go to x: (128) y: (27)\n        glide (1) secs to x: (127) y: (-176)\n        glide (1) secs to x: (126) y: (26)\n    end\n    if <([backdrop # v] of [_stage_ v]) = [23]> then\n        hide\n    end\nend\n\n@Sprite6\n\nwhen flag clicked\nhide\nforever\n    if <([backdrop # v] of [_stage_ v]) = [22]> then\n        show\n        go to x: (89) y: (23)\n        glide (1) secs to x: (89) y: (-177)\n        glide (1) secs to x: (89) y: (23)\n    end\n    if <([backdrop # v] of [_stage_ v]) = [23]> then\n        hide\n    end\nend\n\n@Sprite7\n\nwhen flag clicked\nhide\nforever\n    if <([backdrop # v] of [_stage_ v]) = [22]> then\n        show\n        go to x: (39) y: (25)\n        glide (1) secs to x: (31) y: (-178)\n        glide (1) secs to x: (39) y: (25)\n    end\n    if <([backdrop # v] of [_stage_ v]) = [23]> then\n        hide\n    end\nend\n\n@Sprite8\n\nwhen flag clicked\nhide\nforever\n    if <([backdrop # v] of [_stage_ v]) = [22]> then\n        show\n        go to x: (-9) y: (23)\n        glide (1) secs to x: (-11) y: (-176)\n        glide (1) secs to x: (-9) y: (23)\n    end\n    if <([backdrop # v] of [_stage_ v]) = [23]> then\n        hide\n    end\nend\n\n@Sprite9\n\nwhen flag clicked\nforever\n    switch costume to (costume1 v)\n    if <(backdrop [number v]) = [1]> then\n        hide\n    end\n    if <(backdrop [number v]) = [2]> then\n        show\n    end\n    if <touching (mouse-pointer v)?> then\n        switch costume to (costume2 v)\n    end\nend\n\n
C'est un jeu d'aventure :\nles flèches pour se diriger et sauter.\nAmusez-vous et si vous arrivez jusqu'à la fin ( ça m'étonnerais): dites en commentaires la réponse de David. :) Le David le cube 2 est sorti allez voir !\nhttps://scratch.mit.edu/projects/640735671/