Skip to content

generalmimon/tank-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published