Why not login to Qiita and try out its useful features?

We'll deliver articles that match you.

You can read useful information later.

2
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

JavaScriptでブラウザゲーム作ろう!

Last updated at Posted at 2022-10-03

JavaScriptでゲーム作ります。
ブログに書いてもCodePenに投稿しても全然見てもらえないのでここにまとめます。

ゲームエンジン

ゲームエンジン的なものはPixiJSで作っています。
シーンの切り替えや音の再生もばっちりできます。

サンプル

上のゲームエンジンを使って作った簡単なゲームがこちら。

操作の管理

キーボード、ゲームパッド、さらにスマホでのバーチャルパッドまで全部管理してくれるプログラムです。
これは素のJavaScriptで作っています。

操作のサンプル

上のプログラムを使ったサンプルです。
バーチャルパッドはスマホ、または開発ツールでスマホ状態にすると表示されます。

他にもあります

サンプルは他にもあります ▷ JavaScriptでゲーム作ろう!
解説もそっちにあるので気になる方は見てください('ω')ノ

2
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?