An open API service indexing awesome lists of open source software.

https://github.com/inokawa/canvas-game

A toy 2D shooting game built on pure Canvas API.
https://github.com/inokawa/canvas-game

Last synced: 6 months ago
JSON representation

A toy 2D shooting game built on pure Canvas API.

Awesome Lists containing this project

README

          

# canvas-game

[![deploy](https://github.com/inokawa/canvas-game/actions/workflows/deploy.yml/badge.svg)](https://github.com/inokawa/canvas-game/actions/workflows/deploy.yml)

A toy 2D shooting game built on pure Canvas API.

Mostly following the tutorial in [the book (`[ゲーム&モダンJavaScript文法で2倍楽しい]グラフィックスプログラミング入門 ——リアルタイムに動く画面を描く。プログラマー直伝の基本`)](https://gihyo.jp/book/2020/978-4-297-11085-7) and [its sample code](https://github.com/doxas/graphics-programming-book), but refactored and rewritten in TypeScript.

## Demo

https://inokawa.github.io/canvas-game/

| Key | Action |
| ---------- | ------ |
| Arrow keys | Move |
| Z | Shoot! |
| Enter | Retry |

## Start

```sh
git clone git@github.com:inokawa/canvas-game.git
cd canvas-game
npm install
npm start
```