whatisgithub

What is nes-t-rex-game?

atonamy/nes-t-rex-game — explained in plain English

Analysis updated 2026-05-18

0AssemblyAudience · developerComplexity · 5/5Setup · moderate

In one sentence

A faithful recreation of Chrome's offline dinosaur game rebuilt to run on real Nintendo Entertainment System hardware, written in 6502 assembly with physics copied directly from Chrome's source code.

Mindmap

mindmap
  root((repo))
    What it does
      Ports Chrome dino game
      Matches original physics
      Runs on NES hardware
    Tech stack
      6502 assembly
      cc65 toolchain
    Use cases
      Play on real NES
      Study hardware tricks
    Audience
      Retro developers
      Game hobbyists

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Build the ROM with cc65 and play the Chrome dinosaur game on a real NES or in an emulator.

USE CASE 2

Study how the port reproduces browser game physics inside NES hardware constraints.

USE CASE 3

Load the compiled ROM onto a flash cartridge to play on original NES hardware.

What is it built with?

Assembly6502cc65NES

How does it compare?

atonamy/nes-t-rex-gamemytechnotalent/esp32-c3_button_drivermytechnotalent/rp2350_button_driver_riscv
Stars0
LanguageAssemblyAssemblyAssembly
Last pushed2025-11-292026-03-23
MaintenanceQuietMaintained
Setup difficultymoderatemoderatehard
Complexity5/52/54/5
Audiencedeveloperresearcherdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires the cc65 assembler and linker plus an NES emulator such as Mesen to run the built ROM.

So what is it?

This project is a from-scratch recreation of the Chrome browser's offline dinosaur game, rebuilt to run on an actual Nintendo Entertainment System from 1985, written directly in 6502 assembly language, the low-level instruction set the NES's processor understands. Rather than just capturing the feel of the original, the author copied the game's physics, obstacle rules, and scoring straight from Chrome's own source code, so jump height, gravity, obstacle spacing, and speed all match the browser version's numbers closely. The game includes the familiar cactus and pterodactyl obstacles at their original sizes and heights, a day and night cycle that inverts the color palette every 700 points, a title screen, pause and resume, a game over screen with a restart button copied from Chrome's own artwork, and a four channel chiptune soundtrack with separate music for the title screen, gameplay, and game over. Because the NES hardware is so much more limited than a modern browser, the author had to solve several hardware specific puzzles to keep the game feeling identical. Obstacles are drawn as background tiles rather than as separate moving sprites, which keeps the NES's strict eight-sprite-per-line limit from being a problem even when several obstacles appear close together. A special timing trick lets the score display at the top of the screen stay still while the ground scrolls underneath it, even though the console only has one hardware scroll setting to share between them. A short list of small, deliberate differences from the original is documented in the readme, such as the exact framerate simulation and a slightly different random number generator, all chosen to keep the physics feeling the same on real hardware. Building the game only requires a small assembler and linker toolchain called cc65, and running it only requires an NES emulator or a flash cartridge on real hardware. Controls are simple: a start button to begin, pause, or restart, a jump button, and a duck button.

Copy-paste prompts

Prompt 1
Walk me through building this project with cc65 and running the resulting ROM in the Mesen emulator.
Prompt 2
Explain how the sprite-zero-hit trick in this project lets the score display and the ground scroll at different speeds on the NES.
Prompt 3
Compare the deliberate physics deviations listed in this readme to the original Chromium dino game source.
Prompt 4
Show me how obstacles are drawn as background tiles instead of sprites to stay under the NES's 8-sprite-per-line limit.

Frequently asked questions

What is nes-t-rex-game?

A faithful recreation of Chrome's offline dinosaur game rebuilt to run on real Nintendo Entertainment System hardware, written in 6502 assembly with physics copied directly from Chrome's source code.

What language is nes-t-rex-game written in?

Mainly Assembly. The stack also includes Assembly, 6502, cc65.

How hard is nes-t-rex-game to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is nes-t-rex-game for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.