generalmimon / tank-game

A very simple tank game written in JavaScript

Home Page:https://generalmimon.github.io/tank-game/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Simple tank game

REUSE compliant

A very simple tank game written in JavaScript. It is inspired by a well-known game Tank Trouble. It uses HTML Canvas API. It doesn't depend on any library or engine. The collision detection algorithm is taken from https://github.com/sevdanski/SAT_AS3, it was just rewritten to JavaScript.

It consists of main game loop, which checks which keys are pressed, shifts the moving objects and checks collisions. The code needs refacoring, the components are tied too tightly. For instance, there isn't easy way to add another tank (with mouse control) without altering the core of the program (main loop and almost all functions). The game shouldn't consist of many functions calling each other. Object-oriented design would be more convenient.

Open the game

About

A very simple tank game written in JavaScript

https://generalmimon.github.io/tank-game/


Languages

Language:JavaScript 92.6%Language:HTML 7.4%