
Dino-7 is a minimalist endless runner inspired by the Chrome Dinosaur game, rendered on a single 7-segment display. The game uses a finite state machine with idle, run, jump, hit, and score-display behavior, plus pseudo-random obstacle generation and a retained high score.
| State | Description |
|---|---|
S_IDLE |
Shows the stored high score on the 7-segment display |
S_RUN |
Player is on the ground and obstacles advance |
S_JUMP |
Player is in the air for a short fixed jump time |
S_HIT |
Collision detected, all segments light up |
S_SCORE |
Final score is shown, alternating with high score |
The 7-segment display is used as a tiny side-view game field with a horizontal obstacle flow:
| Output | Segment | Meaning |
|---|---|---|
uo[0] |
a |
Obstacle far (spawning) |
uo[1] |
b |
Obstacle mid (approaching) |
uo[2] |
c |
Player on ground |
uo[3] |
d |
Obstacle has passed |
uo[4] |
e |
Player in air (jumping) |
uo[5] |
f |
Unused |
uo[6] |
g |
Obstacle close (collision zone) |
uo[7] |
dp |
Jump cooldown active / High score indicator |
Obstacles move through four visible phases across the display:
a — a new obstacle appears far away.b — the obstacle approaches the player.g — the obstacle reaches the close collision zone.d — the obstacle has passed.A 32-bit LFSR is used to generate pseudo-random obstacle spawn timing from the seed bits on ui[7:4].
The player is shown on c while running and on e while jumping. After a jump, the decimal point turns on briefly to indicate jump cooldown, so the jump button is temporarily blocked.
If the player avoids an obstacle successfully, the score increments up to 9. The game speed increases gradually depending on the selected difficulty and score progression.
In idle mode, the display shows the saved high score with the decimal point enabled. After a collision, the game briefly lights all segments, then shows the current score and alternates it with the stored high score.
| Pin | Function |
|---|---|
ui[0] |
Jump button (active high) |
ui[1] |
Game reset (active high) |
ui[3:2] |
Difficulty selector |
ui[7:4] |
LFSR seed bits |
rst_n.ui[0] to start the game.a → b → g → d.ui[0] to jump before the obstacle reaches the close collision zone.ui[1] to reset the game and return to idle.uo_out[7:0]ui[0] for jumpui[1] for game resetui[3:2] and ui[7:4] for difficulty and seed selection| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | Jump button (active high) | Segment a – obstacle far (spawning) | |
| 1 | Reset game (active high) | Segment b – obstacle mid (approaching) | |
| 2 | Difficulty Selector LSB (00=Norm, 11=Insane) | Segment c – player on ground | |
| 3 | Difficulty Selector MSB | Segment d – obstacle has passed | |
| 4 | LFSR seed bit 0 | Segment e – player in air (jumping) | |
| 5 | LFSR seed bit 1 | Segment f – unused | |
| 6 | LFSR seed bit 2 | Segment g – obstacle close (collision zone) | |
| 7 | LFSR seed bit 3 | Decimal point – jump cooldown active / High Score indicator |