Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

T-34-85

A browser tank game. You drive a Soviet T-34-85 against waves of enemy armour, salvage the wrecks, and spend what you pull out of them at the field depot between waves. Everything — the tanks, the ground, the explosions, even the gun report — is generated in code with three.js. One self-contained page, no build step, no dependencies, no assets.

Play: https://aleksandr-sudo.github.io/t34-85/

Controls

W A S D drive, and pivot-steer in place
mouse traverse the turret
left click fire
Space brake
V free-look mode to inspect the model
wheel zoom

The game

Waves scale up: more tanks, tougher hulls. Enemies are deliberately stupid — they wander, swing the turret to bearings picked at random, and fire on a timer at whatever happens to be in front of the barrel. They never aim at you. They will still knock chunks out of your hull by pure accident, which is the point.

Crates and fuel drums scattered around the field are worth salvage too, and they go up well.

Between waves the field depot sells six upgrade lines — reload speed, shell damage, HE filler for splash, applique armour, engine tune and turret drive — each with several levels and an escalating price.

Notes

The tank is one function called with a palette, so the player and every enemy are the same model in different paint. Track bands are a convex belt fitted around the road wheels, with links instanced along it and scrolled by arc length, driven per side — so the tracks counter- rotate correctly when a tank pivots on the spot.

The terrain is a displaced plane sampled by the same height function every hull rides on, so tanks pitch and roll over the ground they stand on. Shells travel at 72 m/s and are swept against hulls as line segments — a point test at that speed steps straight over a target between frames. The muzzle report is synthesised with the Web Audio API. Metal parts are lit by a tiny procedurally built environment map, because metalness with no IBL renders pure black.

About

Drivable 3D T-34-85 built with three.js

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages