CoquetteはJavaScript製のオープンソース・ソフトウェア(MIT License)です。 JavaScriptで作るゲームには幾つかの手法があります。入り口をスムーズにするためにはまず何らかのフレームワークを用いるべきです。という事で今回はCoquetteを紹介します。Canvasを使うゲームの開発作業がスムーズになりそうです。 こちらはシンプルなデモ。矢印キーを押すと赤いブロックが上にあがっていきます。 こちらはもうちょっと複雑なデモです。アステロイド風にミサイルを発射して飛んでくるサークルを破壊します。 主な機能としてはミサイルやブロックなどでよく使われる衝突検出、アップデートループ、キーボード入力、Canvasのレンダリングを行います。そしてプレーヤと敵などをエンティティとして管理し、破壊したり表示内容を更新します。キャラクターなどの制御よりも、パズルや棒などの幾何学系