---
title: "Build a dinosaur runner game with Deno, pt. 3"
description: "Part 3 of a Deno tutorial series adds obstacles and collision detection to a canvas-based dinosaur runner game."
url: "https://swe.quest/articles/build-a-dinosaur-runner-game-with-deno-pt-3-210f2045426eb0c9"
canonical: "https://deno.com/blog/build-a-game-with-deno-3"
source: "Deno"
published: "2025-12-22"
difficulty: "medium"
kind: "How-to"
reading_minutes: 9
tags: ["gaming","javascript","frontend"]
---

# Build a dinosaur runner game with Deno, pt. 3

A post on [Deno](https://swe.quest/sources/deno.md), published 2025-12-22, 9 min read, How-to. Original: [https://deno.com/blog/build-a-game-with-deno-3](https://deno.com/blog/build-a-game-with-deno-3)

## Summary

Part 3 of a Deno tutorial series adds obstacles and collision detection to a canvas-based dinosaur runner game. Cactus obstacles spawn on a frame timer, move left at the game speed, and award points when they leave the screen. An axis-aligned bounding-box overlap check ends the run, and a difficulty level computed every 200 points raises speed and shortens the spawn interval down to a floor. The stage also adds a simple leg animation, a game-over overlay, high scores persisted in localStorage, and redeployment with \`deno deploy\`.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Games](https://swe.quest/tags/gaming.md) (Domains)
- [JavaScript](https://swe.quest/tags/javascript.md) (Languages)
- [Frontend](https://swe.quest/tags/frontend.md) (Web & mobile)

## Prerequisites

- JavaScript classes ([easy posts on JavaScript](https://swe.quest/tags/javascript.md?difficulty=easy))
- HTML canvas basics

## Keywords

Deno, Deno Deploy, Canvas API, localStorage

## Related posts

- [Build a dinosaur runner game with Deno, pt. 2](https://swe.quest/articles/build-a-dinosaur-runner-game-with-deno-pt-2-c8e56eec683a558c.md): Deno · 2025-12-15 · Medium · 10 min read · Games, JavaScript, Frontend, Browsers
  Stage 2 of a Deno dinosaur runner tutorial turns a static landing page into a playable HTML5 canvas game.
- [Build a dinosaur runner game with Deno, pt. 5](https://swe.quest/articles/build-a-dinosaur-runner-game-with-deno-pt-5-5afa507e9804672c.md): Deno · 2026-02-09 · Medium · 9 min read · JavaScript, PostgreSQL, Games, Frontend
  Part five of a Deno tutorial series adds player identity and customization to a browser dinosaur runner game.
- [Build a dinosaur runner game with Deno, pt. 1](https://swe.quest/articles/build-a-dinosaur-runner-game-with-deno-pt-1-e4d3faa91fec67fd.md): Deno · 2025-12-08 · Medium · 5 min read · JavaScript, TypeScript, Deployment, Serverless
  Part one of a series building a browser dinosaur runner game sets up a Deno project that serves static files and deploys it.
- [Build a dinosaur runner game with Deno, pt. 6](https://swe.quest/articles/build-a-dinosaur-runner-game-with-deno-pt-6-d21d409df6156ed0.md): Deno · 2026-02-23 · Medium · 9 min read · Observability, JavaScript, TypeScript
  The final stage of the Deno dinosaur runner series adds observability using Deno Deploy's built-in logs, traces and metrics dashboards.
- [Build a dinosaur runner game with Deno, pt. 4](https://swe.quest/articles/build-a-dinosaur-runner-game-with-deno-pt-4-9ff0694a60c6e4e7.md): Deno · 2026-01-26 · Medium · 10 min read · PostgreSQL, JavaScript, API design, Games
  Part four of the Deno dino runner series adds score persistence: a leaderboard HTML page that polls an API every 30 seconds, a managed Prisma Postgres database provisioned in Deno Deploy, and Oak routes to submit and rank scores.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
