Overview

This project recreates the iconic Google Chrome Dinosaur Game (the offline “T-Rex Runner”) using analog circuits, semiconductor devices, logic gates, and LEDS. Instead of a computer screen, the gameplay happens on a 4-LED array:

If you mistime your jump, the dinosaur LED turns off—game over. The game increases in challenge as the clock drives faster sequences.

Final showcase
Final Circuit implemenation for demo purposes!

Demo

Milestone 1 Demo.
Milestone 2 Demo.
Milestone 3 Demo.

Equipment & Tools

Design & Simulation

  • LTspice (schematics & simulation)

Inputs & Outputs

  • Slide switch (user input)
  • 4× LEDs (player + 3 obstacle positions)

Timing / Oscillators

  • Astable Multivibrator using LF351 Op-Amp (MV)
  • BJT Astable Multivibrator (for MS3 variant)

Logic & Memory

  • Diode AND (1N914)
  • CMOS NAND & NOT (ALD1105 Dual CMOS)
  • RTL AND (BJT 2N3904)
  • D-Latch behavior for state storage

Transistors / Switching

  • 2N7000 N-Channel MOSFET (electronic switch)
  • 2N3904 NPN BJT

Microcontroller

  • Arduino Uno (sequencing & compact memory substitute)

Test & Measurement

  • Bench supply / board supply (e.g., M2K), multimeters, scope traces

Full bill of materials and references are documented in the project manual (see References).

Technical Breakdown

Milestone 1 – Jumping & Timing
  • Astable multivibrator generates the clock (square wave).
  • Diode-based AND gate allows jump only while clock is HIGH.
  • Clock LED indicates valid jump window; Jump LED confirms action.
Milestone 2 – Memory & State
  • CMOS NAND + feedback to form D-latch behavior (Q follows D when enabled).
  • 2N7000 MOSFET isolates LED load to preserve logic levels.
  • Sequential LED states represent obstacle positions.
Milestone 3 – Integrated Gameplay
  • Integrated timing + logic + memory into one loop.
  • Arduino used to compactly hold prior states (instead of ~6 discrete flip-flops).
  • Collision check via RTL AND (LED3 & no jump → lose condition).

Challenges & Trade-offs

Future Improvements

What I Learned

Representative Code Snippet (Arduino)

//global variables
//ensures clock is only read once per up/down cycle
int CLOCK_HI = 0;
//lockout for jump
int jumped = 0;
//jump variable
int jump = 0;
//which LED was on in the previous state?
int LED0 = 0;
int LED1 = 0;
int LED2 = 0;
//trigger LED sequence
int LED = 0;
//game state
int game = 1;
//test
int enable = 0;
//score tracking
int score = 0;


void setup() {
  // put your setup code here, to run once:

  //pin declaration
  //LIGHT0
  pinMode(2, OUTPUT);
  //LIGHT1
  pinMode(3, OUTPUT);
  //LIGHT2
  pinMode(4, OUTPUT);
  //JUMP
  pinMode(5, OUTPUT);

  Serial.begin(9600);
}

For full code, see the Appendix in the manual.

References

Full design notes, schematics, operating conditions, and citations are documented in the project manual (PDF).