今回つくるゲーム
難易度
このゲームの作り方を記事で解説するのはとても難しいので、詳しくはYouTube動画の解説をご覧ください。この記事ではそれぞれのコードの意味を解説していきたいと思います。
まずゲームをプレイしてみましょう。
すべてのコード
今回のゲームのすべてのコードはこちらにあります。この記事ではこのコードの意味を解説していきます。
ゲームを作る中で考えないといけないこと
まずは妖怪ウォッチぷにぷにを作る上で考えないといけないことをまとめます。
1〜5のなぞを1つづつ解明しながらゲームを作っていくことになります。
![](https://i2.wp.com/bingo-ojisan.xyz/wp-content/uploads/2023/12/1-2-3-4-5-6-7-8-9-10-1024x576.jpg?resize=1024%2C576&ssl=1)
ぷにのコード
まず”ぷに”には以下のように5つのコスチュームを作ります。これらをランダムで落としていくことになります。
![](https://i2.wp.com/bingo-ojisan.xyz/wp-content/uploads/2023/12/image-1024x605.png?resize=1024%2C605&ssl=1)
続いてコードになります。非常に長いので、動画もみながら合わせて確認をしてください。
![](https://i0.wp.com/bingo-ojisan.xyz/wp-content/uploads/2023/12/スクリーンショット-2023-12-14-17.24.20-1024x567.png?resize=1024%2C567&ssl=1)
![](https://i1.wp.com/bingo-ojisan.xyz/wp-content/uploads/2023/12/スクリーンショット-2023-12-14-17.24.38-1024x884.png?resize=1024%2C884&ssl=1)
![](https://i1.wp.com/bingo-ojisan.xyz/wp-content/uploads/2023/12/スクリーンショット-2023-12-14-17.24.55-1024x912.png?resize=1024%2C912&ssl=1)
![](https://i1.wp.com/bingo-ojisan.xyz/wp-content/uploads/2023/12/スクリーンショット-2023-12-14-17.25.18-1024x507.png?resize=1024%2C507&ssl=1)
押しのけられる考え方はこのとおり
![](https://i0.wp.com/bingo-ojisan.xyz/wp-content/uploads/2023/12/1-2-3-4-5-6-7-8-9-10-2-1024x576.jpg?resize=1024%2C576&ssl=1)
巨大化の法則は以下の通り
![](https://i1.wp.com/bingo-ojisan.xyz/wp-content/uploads/2023/12/1-2-3-4-5-6-7-8-9-10-1-1024x576.jpg?resize=1024%2C576&ssl=1)
なぞり管理
つぎになぞり管理のコードについて解説します。
![](https://i2.wp.com/bingo-ojisan.xyz/wp-content/uploads/2023/12/スクリーンショット-2023-12-14-17.52.52-1024x888.png?resize=1024%2C888&ssl=1)
なぞりの判定の考え方はこちら
![](https://i2.wp.com/bingo-ojisan.xyz/wp-content/uploads/2023/12/1-2-3-4-5-6-7-8-9-10-3-1024x576.jpg?resize=1024%2C576&ssl=1)
その他のスプライト
巨大化
![](https://i1.wp.com/bingo-ojisan.xyz/wp-content/uploads/2023/12/スクリーンショット-2023-12-14-18.14.51-1024x439.png?resize=1024%2C439&ssl=1)
指
![](https://i2.wp.com/bingo-ojisan.xyz/wp-content/uploads/2023/12/スクリーンショット-2023-12-14-18.15.02-1024x559.png?resize=1024%2C559&ssl=1)
ゲーム管理
![](https://i2.wp.com/bingo-ojisan.xyz/wp-content/uploads/2023/12/スクリーンショット-2023-12-14-18.16.54-1024x702.png?resize=1024%2C702&ssl=1)
コンボ
![](https://i0.wp.com/bingo-ojisan.xyz/wp-content/uploads/2023/12/スクリーンショット-2023-12-14-18.17.03-1024x504.png?resize=1024%2C504&ssl=1)