# About the Project
GTA.js is a reimplementation of the original 1997 Grand Theft Auto engine written in TypeScript and Three.js. It parses the unaltered binary and text files from the original 1997 PC shareware demo and brings Liberty City to life directly in the browser.
# Not an Emulator
This project is not a DOSBox wrapper, not an emulator, nor is it decompiled from the original executable. It is a reimplementation built with the help of Google Gemini using developer documentation, community specifications, and simply recalling the game from playing it a lot back in the day.
Because this is a reimplementation, there are differences compared to the original 1997 game in certain physics behaviors, animations, and unimplemented systems.
# Implementation Status
A high-level overview of what is currently playable in GTA.js versus features from the 1997 game that are not implemented.
✓ Implemented
- 3D City & Map Rendering: Stacked block city geometry, 40 slope types, animated water, traffic lights, and 24-bit palette-remapped sprites.
- Vehicles & Handling: Custom per-car handling profiles, 4-corner collisions, directional dent and door deltas, skidmarks, and car explosions.
- Weapons & Crates: Fist, Pistol, Machine Gun, Rocket Launcher, Flamethrower, armor, extra lives, and destructible barrels.
-
MISSION.INIEngine: Multi-process script interpreter, ringing payphones, objective guidance arrows, timers, and HUD briefings. - NPC Traffic & Pedestrians: Ambient traffic cars, carjacking, pedestrian walking/panicking/fleeing AI, and spatial Web Audio effects.
- Dock Cranes: Functional harbour cranes that hoist, swing, and crush vehicles for cash bonuses.
- Kill Frenzy: Hidden timed rampage challenges with unlimited ammo and score multiplier rewards.
- ★ Mobile Touch Controls: Context-sensitive on-screen thumbstick and action buttons for phones and tablets.
Not in the original 1997 game engine.
✕ Not Implemented
- Cops & Wanted Levels: Police patrol cars, roadblocks, wanted level heads, and getting Busted!
- Emergency Services: Ambulances responding to injured pedestrians and firetrucks extinguishing burning vehicles.
- Respray & Bomb Shops: Drive-in paint shops and bomb shops for rigging vehicles with timed explosives.
- Trains & Trams: Elevated/subway trains and streetcar trams along railway blocks.
- Gouranga!: Running over the Hare Krishna conga line for the classic Gouranga! bonus.
- Various Audio Bytes: Vehicle honking, pedestrian shouting, police sirens, and radio stations.
- Full Campaign & Multiplayer: Scoped to the 1997 Liberty City demo level (no San Andreas, Vice City, or network play).
# Play the Demo
Play the game in the iframe below. Take the iframe fullscreen or in a new tab.
# Keyboard Controls
Press ? or Esc at any time inside the game to open the full controls reference, options, and testing overrides, or H to toggle the Debug HUD.
Move / Steer ↑ ↓ ← →
Run (On Foot) Hold Shift
Enter / Exit Vehicle Enter
Attack / Fire Weapon Ctrl or Alt / Opt
Jump / Slide / Handbrake Space
Select Weapon 1–5 or Z / X
Horn / Radio Station ✕ Not Implemented Tab / R
Options / Mission / Debug HUD ? / D / H
# Mobile Touch Controls
On phones and tablets, context-sensitive touch controls appear automatically at the bottom of the screen and switch between On Foot and In Vehicle modes.
On Foot
Walk / Turn Drag the center dot in any direction to turn and walk.
Enter Vehicle Enter or carjack the nearest vehicle.
Fire Weapon Attack or fire the currently selected weapon.
Slide Over Car Jump over or slide across the hood of a vehicle.
Run Hold to run instead of walk (same as holding Shift).
Cycle Weapon Cycle through available weapons in your inventory.
In Vehicle
Steer Left Steer the vehicle to the left.
Steer Right Steer the vehicle to the right.
Exit Vehicle Bring the vehicle to a stop and step out.
Accelerate Hold the gas pedal to accelerate forward.
Handbrake Hold to engage the handbrake for sharp turns or quick stops.
Brake / Reverse Hold to brake, or reverse once the vehicle has come to a stop.
# References & Acknowledgements
Standing on the shoulders of giants: Recreating a 1997 game engine from its raw binary files would have been impossible without the official technical specs published by DMA Design and the extraordinary documentation, modding tools, and open-source research shared by the GTA community over the past three decades.
DMA Design & Core Specs
-
CityScape Data Structure (
cds.doc) & GTA Mission Template Description (mtd.doc) by DMA Design. - The Unofficial GTA Reference Handbook by Michael Mendelsohn.
- Gouranga! mission scripting guides (Luke’s How to Write a Mission in 7 Days).
Engines & Prior Recreations
- gta-webgl (WebGL-GTA) by Niklas von Hertzen — the pioneering WebGL map renderer that sparked this project.
- carnage3d & OpenGTA C++ engine reimplementations.
- gta1-webedition by Mickaeligo.
- 2D Vehicles by Pat Kerr — deep dive and interactive recreation of the original GTA vehicle physics system.
Classic Community Tools
- Junction 25 & M1 – the OG map editors.
- GTACars – the OG car editor
- The Cops and FXT2TXT utilities.