How Chrome Dino Was Built (Inside the Code)

A gray dinosaur toy on a wooden surface with a blurred plant in the background.

How Chrome Dino was built is one of the better-documented stories in browser-game history because the game is open source. The Chrome Dino game (also called T-Rex Runner, reachable at chrome://dino, and playable any time Chrome loses its connection) was made inside Google in 2014 by members of the Chrome UX team, including Sebastien Gabriel, Alan Bettes and Edward Jung. It’s part of Chromium’s BSD-licensed code. The team reportedly codenamed it “Project Bolan,” a reference to T. Rex frontman Marc Bolan.

Key takeaways

  • Chrome Dino was created in 2014 by Chrome’s UX team, including designer Sebastien Gabriel, Alan Bettes and Edward Jung.
  • The internal codename was reportedly “Project Bolan,” after Marc Bolan of T. Rex.
  • The code is part of Chromium under a BSD-style license; github.com/wayou/t-rex-runner is a popular community extraction of it.
  • The game is plain JavaScript drawing to a canvas from a sprite sheet, with three tiny sound effects embedded in the page.
  • It appears on Chrome’s network-error page and is also reachable at chrome://dino.

Why it exists

The Chrome team wanted something playful to soften the experience of a network error. Instead of a plain “unable to connect” message, the offline page got a small pixel illustration of a T. rex. The game hiding behind that dinosaur, started with the space bar, is the runner you’ve probably played dozens of times.

The choice of a dinosaur is the design joke. A T. rex is a thing from a long-ago time, and without a connection you’ve been sent back to the “prehistoric” days before the internet. The pun is small but deliberate, and it frames the whole project: an Easter egg that takes itself just seriously enough to be good, but not so seriously that it overshadows its host page.

Who made it

Sebastien Gabriel was a designer on the Chrome team when the game was made, and he’s the name most often attached to its look: the pixel-art sprites and the visual design of the offline page. He worked alongside other Chrome UX team members, with Alan Bettes and Edward Jung usually credited as part of the team. Google’s own retellings name the three of them.

The pixel-art style of the dinosaur, the cacti, the pterodactyl, the clouds and the moon is a deliberate aesthetic choice. It echoes early arcade sprite work: one gray tone, clean silhouettes, no anti-aliasing. That’s part of why the game has aged so well. Pixel art doesn’t look dated when it was pixel art on purpose.

The codename

The internal codename “Project Bolan,” as widely reported, refers to Marc Bolan, the frontman of the 1970s glam-rock band T. Rex (the band, not the dinosaur). The pun is one layer deeper than the dinosaur joke on the page: the team named the project after the band that shares the dinosaur’s name.

Small internal jokes like this say something about how the team approached the project. It was made by people who cared about the texture of the work, not just the deliverable.

The architecture

The Chrome Dino game is plain JavaScript plus a sprite sheet image, with no framework. The extracted runner we use is around 2,700 lines. The structure is simple. A Runner object manages the overall game loop, speed and input. A Trex object handles the dinosaur’s running, jumping and ducking states. Obstacle spawns and moves the cacti and pterodactyls. Horizon manages the scrolling ground, clouds and obstacles. Smaller helpers draw the distance meter, the night sky and the game-over panel.

The game loop runs on requestAnimationFrame. Each frame it updates positions, checks for collisions and redraws the canvas. Collision detection starts with a rough bounding box, then checks several smaller boxes per sprite, which is what makes the hits feel fair. A ducking dino uses a different set of boxes than a running one. The sprite sheet comes in standard and high-DPI versions, picked to suit the screen.

There’s no networking and no saved progress. The high score lasts only until you reload the page. The game does have sound: three short effects (a button press, a hit, and a “score reached” chime every 100 points), stored as base64 data in the page and decoded with the Web Audio API. The simplicity is the point. The game has to work on a network-error page, where loading extra files from a server is exactly what you can’t rely on.

The open source release

The Chrome Dino code is part of the Chromium project, released under a BSD-style license. The original lives inside the Chromium repository. github.com/wayou/t-rex-runner is a popular community copy that extracts the runner and makes it embeddable on any web page, and it’s what many independent sites, including this one, build their playable versions on.

The license is permissive. It allows redistribution and modification as long as the copyright notice is kept. That’s why there are so many Chrome Dino copies around the web: you can drop the extracted runner into a page and start it with your own config. Some versions add features like themes or character swaps; others just embed the original.

Quirks and console tricks

The runner has no cooldown between jumps, so holding Space makes the dino hop again almost as soon as it lands. There’s also a well-known console trick. Typing Runner.instance_.gameOver = function(){} into the browser DevTools disables the game-over state and lets the dino run through everything.

These quirks are part of the game’s character. A heavily locked-down Easter egg would feel different. Being able to poke at the game from DevTools makes it feel like the side project it is.

What it teaches

The Chrome Dino game is a study in the value of constraints. It has to run with no network. It has to start instantly. It has to be playable with one or two keys. It has to fit inside a browser error page without overwhelming it. The pixel art, the small sprite count, the box-based collision, the single canvas and the tiny embedded sounds all follow from those constraints.

The lesson for any browser-game developer is that constraints sharpen design. The Chrome team set out to make a charming addition to an error page, and it became one of the most-played browser games around. For a deeper look at the source itself, see our Chrome Dino source code explainer, and our Chrome Dino history traces the game from 2014 to 2026.

Frequently asked questions

Who designed the Chrome Dino game?

It was made in 2014 by members of Google’s Chrome UX team, including Sebastien Gabriel, Alan Bettes and Edward Jung. Gabriel is most often credited with the visual design.

Why is the Chrome Dino codename “Project Bolan”?

The codename, as widely reported, references Marc Bolan, the frontman of the 1970s glam-rock band T. Rex. The pun layers on top of the dinosaur joke on the network-error page.

Is the Chrome Dino game open source?

Yes. It’s part of the Chromium project under a BSD-style license. The original lives inside the Chromium repository, and github.com/wayou/t-rex-runner is a popular community extraction.

What language is Chrome Dino written in?

Plain JavaScript, with a sprite sheet for art and a few short sound effects. There’s no framework. The extracted runner is around 2,700 lines drawing to a 2D canvas. The Dinosaur Game Wikipedia entry covers the credits and history.

How does the Chrome Dino game handle collisions?

It first checks a rough bounding box, then several smaller boxes per sprite. A ducking dino has a different set of boxes than a running dino, which is part of why the game feels fair even at high speeds.

The takeaway

How Chrome Dino was built is a story about a small team making something delightful inside a giant browser. Chrome’s UX team turned a network-error page into one of the best-known games on the web with a sprite sheet, a few thousand lines of JavaScript, three tiny sounds and a codename that doubles as a band reference. The game is still here, still open source, still playable any time the network drops. Try the T-Rex Runner right here at the top of this page, no error needed.

🔌 Connect any AI assistant to dinogame.gg — we run an MCP server: https://dinogame.gg/mcp