ピンポンプラットフォーマー/ping-pong platformer
@Stage\n\nwhen I receive [next v]\nwait (2) seconds\nif <<<[4] < ([costume # v] of [地形 v])> and <([costume # v] of [地形 v]) < [10]>> or <<[16] < ([costume # v] of [地形 v])> and <([costume # v] of [地形 v]) < [22]>>> then\n    switch backdrop to (neon tunnel v)\n    if <(音楽) = [1]> then\n        stop [other scripts in sprite v]\n        set [音楽 v] to [2]\n        broadcast (音楽 v)\n    end\nelse\n    switch backdrop to (blue sky 2  v)\n    if <<(音楽) = [0]> or <(音楽) = [2]>> then\n        stop [other scripts in sprite v]\n        set [音楽 v] to [1]\n        broadcast (音楽 v)\n    end\nend\n\nwhen I receive [ゲームスタート v]\nswitch backdrop to (blue sky 2  v)\nstop [other scripts in sprite v]\nset [音楽 v] to [1]\nbroadcast (音楽 v)\n\nwhen I receive [音楽 v]\nforever\n    if <(音楽) = [0]> then\n        play sound [Dance Magic v] until done\n    end\n    if <(音楽) = [1]> then\n        play sound [Xylo3 v] until done\n    end\n    if <(音楽) = [2]> then\n        play sound [Video Game 2 v] until done\n    end\nend\n\nwhen I receive [ホーム画面 v]\nswitch backdrop to (背景1 v)\nstop [other scripts in sprite v]\nset [音楽 v] to [0]\nbroadcast (音楽 v)\n\nwhen I receive [音楽 v]\nforever\n    set volume to (音量を共有) %\nend\n\n@プラット\n\nwhen I receive [ゲームスタート v]\ngo to x: (-150) y: (0)\nset [重力 v] to [0]\nset [浮力 v] to [0]\nset [向き v] to [180]\nset [音ok? v] to [0]\nwait (1) seconds\nforever\n    set [左右移動の増加 v] to ((左右移動の増加) / (2))\n    if <(重力) < [20]> then\n        change [重力 v] by (1)\n    end\n    if <[0] < (浮力)> then\n        change [浮力 v] by (-1)\n    end\n    if <(浮力) < [0]> then\n        set [浮力 v] to [0]\n    end\n    if <([abs v] of (向き) ) < [180]> then\n        if <(向き) < [0]> then\n            change [向き v] by (-1)\n        else\n            if <not <(向き) = [0]>> then\n                change [向き v] by (1)\n            end\n        end\n    end\n    if <touching (paddle v)?> then\n        set [向き v] to (round (パドルの残像の向き))\n        set [浮力 v] to ([floor v] of (((スピード) + (5)) * ([abs v] of (([cos v] of (向き) ) + (1)) )) )\n        if <(音ok?) = [0]> then\n            set [音ok? v] to [1]\n            broadcast (はい、タッチ☆ v)\n        end\n    end\n    set [左右移動 v] to (((浮力) * ([sin v] of (向き) )) + (左右移動の増加))\n    change x by (左右移動)\n    turn right (左右移動) degrees\n    change y by ((浮力) - (重力))\n    if <<[240] < (x position)> or <<<([costume # v] of [地形 v]) = [4]> or <([costume # v] of [地形 v]) = [16]>> and <(y position) < [-180]>>> then\n        hide\n        set [重力 v] to [0]\n        set [浮力 v] to [0]\n        set [向き v] to [0]\n        set [左右移動の増加 v] to [0]\n        broadcast (next v) and wait\n        if <<([costume # v] of [地形 v]) = [5]> or <([costume # v] of [地形 v]) = [17]>> then\n            go to x: (-150) y: (187)\n            point in direction (90)\n            show\n            glide (0.1) secs to x: (-150) y: (157)\n            set [重力 v] to [10]\n        else\n            if <<([costume # v] of [地形 v]) = [10]> or <([costume # v] of [地形 v]) = [22]>> then\n                go to x: (-150) y: (-170)\n                point in direction (90)\n                show\n                set [向き v] to [15]\n                set [浮力 v] to [25]\n            else\n                go to x: (-150) y: (0)\n                point in direction (90)\n                show\n                wait (0.5) seconds\n            end\n        end\n    end\n    if <<(y position) < [-180]> or <touching color (#ff0000)?>> then\n        hide\n        play sound [Teleport2 v] until done\n        wait (0.5) seconds\n        set [重力 v] to [0]\n        set [浮力 v] to [0]\n        set [向き v] to [0]\n        set [左右移動の増加 v] to [0]\n        go to x: (-150) y: (0)\n        point in direction (90)\n        show\n        if <<([costume # v] of [地形 v]) = [10]> or <([costume # v] of [地形 v]) = [22]>> then\n            set [向き v] to [60]\n            set [浮力 v] to [15]\n        else\n            wait (0.5) seconds\n        end\n    end\n    if <touching (地形 v)?> then\n        ペイン\n    end\n    if <(x position) < [-217]> then\n        set x to (-217)\n    end\n    if <[157] < (y position)> then\n        set y to (157)\n        if <[3] < (浮力)> then\n            change [浮力 v] by (-3)\n        end\n    end\nend\n\ndefine ペイン\nrepeat (重力)\n    if <touching (地形 v)?> then\n        change y by (1)\n        if <([costume # v] of [地形 v]) = [5]> then\n            change [左右移動の増加 v] by (0.2)\n        end\n        if <<([costume # v] of [地形 v]) = [7]> or <([costume # v] of [地形 v]) = [9]>> then\n            change [左右移動の増加 v] by (-0.2)\n        end\n    end\nend\nif <touching (地形 v)?> then\n    change x by ((左右移動) * (-1))\n    change y by ((重力) * (-1))\n    change y by (((浮力) - (重力)) * (-1))\n    if <([costume # v] of [地形 v]) = [9]> then\n        change y by (1)\n    end\n    repeat (重力)\n        if <not <touching (地形 v)?>> then\n            if < (左右移動) contains [-]?> then\n                change x by (-1)\n            else\n                change x by (1)\n            end\n        end\n    end\n    if < (左右移動) contains [-]?> then\n        change x by (2)\n    else\n        change x by (-2)\n    end\nend\n\nwhen flag clicked\nswitch costume to (プラットさん v)\n\nwhen I receive [ホーム画面 v]\nstop [other scripts in sprite v]\ngo to x: (0) y: (15)\npoint in direction (90)\nshow\n\nwhen I receive [次のコスチューム v]\nnext costume\nif <<(costume [number v]) = [7]> and <(クリアした?) = [0]>> then\n    next costume\nend\n\nwhen I receive [前のコスチューム v]\nswitch costume to ((costume [number v]) - (1))\nif <<(costume [number v]) = [7]> and <(クリアした?) = [0]>> then\n    switch costume to ((costume [number v]) - (1))\nend\n\nwhen I receive [はい、タッチ☆ v]\nplay sound [Basketball Bounce v] until done\nset [音ok? v] to [0]\n\nwhen I receive [ゲームスタート v]\nforever\n    set volume to (音量を共有) %\nend\n\nset [クリアした? v] to [0]\n\n@Paddle\n\nwhen I receive [ゲームスタート v]\nshow\nforever\n    point towards (プラット v)\n    change x by (((mouse x) - (x position)) / (2.8))\n    change y by (((mouse y) - (y position)) / (2.8))\n    create clone of (_myself_ v)\n    if <touching (プラット v)?> then\n        ペイン\n    end\nend\n\nwhen I receive [ゲームスタート v]\ndelete all of [スピード測定 v]\nadd [nayuta70は神\(\)] to [スピード測定 v]\nadd [次亜塩素酸水最高] to [スピード測定 v]\nadd [\(ﾟ∀ﾟ\)ｱﾋｬ] to [スピード測定 v]\nadd [次亜塩素酸水様の略=次亜水] to [スピード測定 v]\nadd [やっぱ次亜水しか勝たん] to [スピード測定 v]\nset [スピード v] to [0]\nforever\n    replace item (3) of [スピード測定 v] with ((item (1) of [スピード測定 v]) - (mouse x))\n    replace item (4) of [スピード測定 v] with ((item (2) of [スピード測定 v]) - (mouse y))\n    replace item (1) of [スピード測定 v] with (mouse x)\n    replace item (2) of [スピード測定 v] with (mouse y)\n    replace item (5) of [スピード測定 v] with ([sqrt v] of (([abs v] of (item (3) of [スピード測定 v]) ) + ([abs v] of (item (4) of [スピード測定 v]) )) )\n    change [スピード v] by (item (5) of [スピード測定 v])\n    set [スピード v] to ((スピード) * (0.7))\nend\n\ndefine ペイン\nrepeat until <not <touching (プラット v)?>>\n    move (-1) steps\nend\nmove (3) steps\n\nwhen I start as a clone\nrepeat (4)\n    change [ghost v] effect by (20)\n    if <touching (プラット v)?> then\n        ペイン\n    end\nend\nset [パドルの残像の向き v] to (direction)\ndelete this clone\n\nwhen I receive [ホーム画面 v]\nstop [other scripts in sprite v]\nhide\ndelete this clone\n\n@地形\n\nwhen I receive [next v]\nwait (1.5) seconds\nnext costume\n\nwhen I receive [ゲームスタート v]\nswitch costume to (コスチューム1 v)\nshow\n\nwhen I receive [ホーム画面 v]\nstop [other scripts in sprite v]\ngo to x: (0) y: (0)\npoint in direction (90)\ngo to [back v] layer\nhide\n\n@サブ地形\n\nwhen I receive [next v]\nwait (1.5) seconds\nnext costume\ndelete this clone\n\nwhen I receive [ゲームスタート v]\nswitch costume to (コスチューム1 v)\nshow\nforever\n    if <<not <<[3] < ([costume # v] of [地形 v])> and <([costume # v] of [地形 v]) < [10]>>> and <not <[15] < ([costume # v] of [地形 v])>>> then\n        wait (pick random (0.5) to (1)) seconds\n        create clone of (_myself_ v)\n    end\n    go to [back v] layer\nend\n\nwhen I start as a clone\npoint in direction (90)\nswitch costume to (pick random (24) to (28))\nset [ghost v] effect to (pick random (10) to (50))\nset size to (pick random (30) to (70)) %\nset [雲飛行 v] to (((150) - (size)) + (pick random (-10) to (10)))\ngo to x: (-291) y: ((雲飛行) + (20))\ngo [backward v] (雲飛行) layers\nglide ((200) / (雲飛行)) secs to x: (295) y: ((雲飛行) + (20))\ndelete this clone\n\nwhen I receive [ゲームスタート v]\nforever\n    if <<(costume [number v]) = [12]> and <touching (プラット v)?>> then\n        set [ghost v] effect to (70)\n    else\n        clear graphic effects\n    end\n    if <(costume [number v]) = [18]> then\n        turn right (5) degrees\n    else\n        point in direction (90)\n    end\n    if <(costume [number v]) = [20]> then\n        set y to ((([tan v] of ((days since 2000) * (8640000)) ) * (20)) * (-1))\n    else\n        go to x: (0) y: (0)\n    end\n    if <<(costume [number v]) = [23]> and <touching (プラット v)?>> then\n        set [クリアした? v] to [1]\n        wait (1) seconds\n        broadcast (ホーム画面 v)\n    end\nend\n\nwhen I receive [ホーム画面 v]\nstop [other scripts in sprite v]\ngo to x: (0) y: (0)\npoint in direction (90)\nhide\n\n@next\n\nwhen flag clicked\ngo to x: (0) y: (0)\npoint in direction (90)\nset size to (100) %\nswitch costume to (next v)\nhide\n\nwhen I receive [next v]\nset [表示タイプ v] to (pick random (1) to (3))\nif <(表示タイプ) = [1]> then\n    go to x: (466) y: (0)\nelse\n    if <(表示タイプ) = [2]> then\n        go to x: (0) y: (347)\n    else\n        if <(表示タイプ) = [3]> then\n            go to x: (0) y: (-347)\n        end\n    end\nend\nset [color v] effect to (pick random (1) to (200))\ngo to [front v] layer\nshow\nstart sound [Rip v]\nif <(表示タイプ) = [1]> then\n    repeat until <(x position) = [0]>\n        set x to ([floor v] of ((x position) * (0.9)) )\n    end\nelse\n    if <(表示タイプ) = [2]> then\n        repeat until <(y position) = [0]>\n            set y to ([floor v] of ((y position) * (0.9)) )\n        end\n    else\n        if <(表示タイプ) = [3]> then\n            repeat until <(y position) = [0]>\n                set y to ([ceiling v] of ((y position) * (0.9)) )\n            end\n        end\n    end\nend\ncreate clone of (_myself_ v)\nwait (1.2) seconds\nglide (1) secs to x: (-466) y: (0)\nhide\n\nwhen I start as a clone\nclear graphic effects\nif < (costume [name v]) contains [プラットさん]?> then\n    switch costume to (paddle v)\n    go to x: (180) y: (180)\n    glide (1) secs to x: (180) y: (-150)\nelse\n    switch costume to ([costume name v] of [プラット v])\n    set size to (150) %\n    go to [front v] layer\n    if <<([costume # v] of [地形 v]) = [4]> or <([costume # v] of [地形 v]) = [16]>> then\n        go to x: (180) y: (180)\n        glide (0.8) secs to x: (180) y: (-180)\n    else\n        if <([costume # v] of [地形 v]) = [9]> then\n            go to x: (180) y: (-180)\n            glide (1) secs to x: (180) y: (180)\n        else\n            set [表示タイプ v] to (pick random (1) to (6))\n            if <(表示タイプ) = [1]> then\n                go to x: (-250) y: (-120)\n                glide (1) secs to x: (250) y: (-120)\n            else\n                if <(表示タイプ) = [2]> then\n                    go to x: (-250) y: (-180)\n                    glide (1) secs to x: (250) y: (180)\n                else\n                    if <(表示タイプ) = [3]> then\n                        create clone of (_myself_ v)\n                        go to x: (180) y: (150)\n                        repeat until <(y position) < [-180]>\n                            if <touching color (#00a136)?> then\n                                change y by (-35)\n                            end\n                            change y by (-1)\n                        end\n                    else\n                        if <(表示タイプ) = [4]> then\n                            go to x: (-250) y: (180)\n                            glide (1) secs to x: (250) y: (-180)\n                        else\n                            if <(表示タイプ) = [5]> then\n                                go to x: (0) y: (180)\n                                glide (0.1) secs to x: (0) y: (0)\n                                wait (0.1) seconds\n                                repeat (15)\n                                    change size by (30)\n                                    turn left (24) degrees\n                                end\n                                wait (0.1) seconds\n                                glide (0.1) secs to x: (0) y: (180)\n                            end\n                        end\n                    end\n                end\n            end\n        end\n    end\nend\ndelete this clone\n\n@ボタン\n\nwhen I receive [ホーム画面 v]\nhide\nswitch costume to (コスチューム1 v)\nホーム画面一瞬\n\ndefine ホーム画面一瞬\nrepeat (4)\n    create clone of (_myself_ v)\n    next costume\nend\n\nwhen I start as a clone\nshow\nif <(costume [number v]) = [1]> then\n    go to x: (0) y: (-60)\n    forever\n        if <touching (mouse-pointer v)?> then\n            set [brightness v] effect to (20)\n            if <mouse down?> then\n                broadcast (ゲームスタート v)\n            end\n        else\n            clear graphic effects\n        end\n    end\nelse\n    if <(costume [number v]) = [2]> then\n        go to x: (0) y: (-135)\n        forever\n            if <touching (mouse-pointer v)?> then\n                set [brightness v] effect to (15)\n                if <mouse down?> then\n                    create clone of (その他 v)\n                    broadcast (説明 v)\n                end\n            else\n                clear graphic effects\n            end\n        end\n    else\n        if <(costume [number v]) = [3]> then\n            go to x: (80) y: (15)\n            forever\n                if <touching (mouse-pointer v)?> then\n                    set [brightness v] effect to (20)\n                    if <mouse down?> then\n                        broadcast (次のコスチューム v)\n                        wait until <not <mouse down?>>\n                    end\n                else\n                    clear graphic effects\n                end\n            end\n        else\n            if <(costume [number v]) = [4]> then\n                go to x: (-80) y: (15)\n                forever\n                    if <touching (mouse-pointer v)?> then\n                        set [brightness v] effect to (20)\n                        if <mouse down?> then\n                            broadcast (前のコスチューム v)\n                            wait until <not <mouse down?>>\n                        end\n                    else\n                        clear graphic effects\n                    end\n                end\n            end\n        end\n    end\nend\n\nwhen I receive [ゲームスタート v]\ndelete this clone\n\nwhen I receive [説明 v]\ndelete this clone\n\nwhen flag clicked\nbroadcast (ホーム画面 v)\nforever\n    reset timer\nend\n\n@音量調整\n\nwhen I start as a clone\ngo to [front v] layer\nif <(costume [name v]) = [%]> then\n    change x by (5)\nend\nclear graphic effects\nshow\nwait (表示する長さ) seconds\ndelete this clone\n\ndefine 表示\ngo to x: (((length of (join (volume) [%])) * (-10)) + (5)) y: (表示するy座標)\nset [桁 v] to [1]\nrepeat (4)\n    switch costume to (letter (桁) of (join (volume) [%]))\n    create clone of (_myself_ v)\n    change [桁 v] by (1)\n    change x by (20)\nend\ngo to x: (0) y: (表示するy座標)\nswitch costume to (コスチューム1 v)\nset [ghost v] effect to (50)\nshow\n\nwhen flag clicked\nset [表示するy座標 v] to [100]\nset [表示する長さ v] to [0.4]\nset [元の音量 v] to []\nforever\n    if <key (u v) pressed?> then\n        if <(元の音量) = []> then\n            change volume by (5)\n        else\n            set volume to ((元の音量) + (5)) %\n            set [元の音量 v] to []\n        end\n        go to [front v] layer\n        表示\n        wait (表示する長さ) seconds\n    end\n    if <key (j v) pressed?> then\n        if <(元の音量) = []> then\n            change volume by (-5)\n        else\n            set volume to ((元の音量) - (5)) %\n            set [元の音量 v] to []\n        end\n        go to [front v] layer\n        表示\n        wait (表示する長さ) seconds\n    end\n    if <key (m v) pressed?> then\n        if <(元の音量) = []> then\n            set [元の音量 v] to (volume)\n            set volume to (0) %\n        else\n            set volume to (元の音量) %\n            set [元の音量 v] to []\n        end\n        go to [front v] layer\n        表示\n        wait (表示する長さ) seconds\n    end\n    if <not <<<key (u v) pressed?> or <key (j v) pressed?>> or <key (m v) pressed?>>> then\n        hide\n        clear graphic effects\n    end\nend\n\nwhen flag clicked\nforever\n    set [音量を共有 v] to (volume)\nend\n\n@その他\n\nwhen I receive [ホーム画面 v]\nset x to (0)\nswitch costume to (タイトル v)\nshow\nforever\n    set y to ((([sin v] of ((days since 2000) * (8640000)) ) * (15)) + (110))\nend\n\nwhen I receive [ゲームスタート v]\nstop [other scripts in sprite v]\nhide\n\nwhen I start as a clone\nshow\nif <(costume [number v]) = [3]> then\n    go to x: (-180) y: (-165)\n    switch costume to (戻る v)\n    go to [front v] layer\n    wait until <<touching (mouse-pointer v)?> and <mouse down?>>\n    broadcast (ホーム画面 v)\nelse\n    go to x: (0) y: (0)\n    switch costume to (説明 v)\n    set [ghost v] effect to (100)\n    go to [front v] layer\n    repeat (33)\n        change [ghost v] effect by (-3)\n    end\n    clear graphic effects\n    create clone of (_myself_ v)\nend\n\nwhen I receive [ホーム画面 v]\ndelete this clone\n\nwhen [timer v] > (0)\nstop [other scripts in sprite v]\ngo to x: (0) y: (0)\nswitch costume to (サムネイル v)\nset [pixelate v] effect to (100)\ngo to [front v] layer\nshow\nrepeat (33)\n    change [pixelate v] effect by (-3)\nend\nclear graphic effects\n\n
「プラットフォーマーの定義をぶち壊していく」\n最初に言っておきます。これは個人的に、\n・ピンポンゲームを取り入れたプラットフォーマー\nではなく、\n・プラットフォーマーに似たピンポンゲーム\nという見解を示しています。\nどちらで捉えても問題ありませんが、\nコメ欄で論争が起こらないよう先に言っておきました。\n\n～操作方法～\nサムネにある通り、全てマウス操作です。\nよってモバイル対応ですが、画面を頻繫に指で擦ることになるためオススメしません。\n\nマウスで緑色の棒（パドル）を動かします。\nパドルは自動的にプレイヤーの方を向くので、\n勢いをつけてパドルをプレイヤーにぶつけることで、\nプレイヤーが「パドルの向きに対応した方向に」\n勢いがあるほど吹っ飛びます。\n最初はあまり操作に慣れないと思いますが、\n根気強くチャレンジしていけばクリア出来るはずです。\nクリアすると特別なスキンが使えるようになります。\nそういえば、Uキーで音量上昇、\nJキーで音量減少、Mキーで消音ができます。