June 8, 2026

The Evolution of 2D Game Physics: From Arcade Cabinets to HTML5 Canvas

2D game physics systems are the quiet engines of retro gameplay, governing how dinosaurs jump, tetris blocks fall, and brick-breaker balls deflect. Modern browser technology enables developers to write custom physics solvers using vanilla JavaScript and render them instantly with HTML5 Canvas. Let's explore the mathematical evolution of retro physics systems and how they perform inside the browser environment.

The Mechanics of Canvas Vector Physics

In early arcade days, memory constraints forced developers to use simple grid-based cell updates. Today, we utilize floating-point vector physics, where coordinates (x, y) are updated dynamically using velocity and acceleration vectors. The basic physics loop updates a sprite's position on every animation frame by adding velocity (v) to coordinate positions, and applying gravity (g) to vertical vectors.

Common Retro Physics Constants

Here is a comparison of typical physics parameters utilized in various classic browser game mechanics:

Game Type Base Gravity Jump Impulse Bounce Friction Terminal Velocity
Infinite Runner 0.6 px/f² -10 px/f 0.0 (None) 12 px/f
Brick Breaker 0.0 (None) N/A 1.0 (Elastic) 10 px/f
Space Shooter 0.0 (None) N/A 0.15 (Slide) 8 px/f

Pros & Cons: Bounding-Box vs. Vector Circle Collisions

AABB Bounding Box Collision
  • Pro: Extremely fast to calculate (simple coordinate comparisons).
  • Pro: Perfect for grid-based platforms like Tetris or Pac-Man.
  • Con: Looks unrealistic for circular objects (e.g. balls clipping at corners).
Vector Circle Collision
  • Pro: Flawless reflection angles for balls and paddle deflections.
  • Con: Requires trigonometric calculations (square roots, distance formulas).
  • Con: High CPU overhead when managing hundreds of active units.

Game Physics Developer FAQ

Q: Why do game objects sometimes pass straight through solid walls?

A: This is known as "clipping" or "tunneling". It happens when an object's speed exceeds its width, causing its coordinates to shift past the wall bounding box on a single frame update. The fix is to use continuous collision detection (CCD) or limit the maximum terminal velocity.

Q: How do you achieve identical jump heights across screens running at different refresh rates?

A: You must scale physics updates by "delta time" (the actual elapsed time between frames). Instead of adding fixed pixels per frame, multiply your acceleration and velocity values by a fractional delta coefficient.

Back to Blog