Skip to content

Latest commit

 

History

History
17 lines (11 loc) · 1.1 KB

README.md

File metadata and controls

17 lines (11 loc) · 1.1 KB

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