◀ VibeCruiser

dino runner

A free dino game — play it in your browser, no install. 🦖 单文件原生 Canvas 恐龙跑酷小游戏,零依赖、打开即玩 | Single-file Canvas dino runner, no dependencies

by @1977858279 · 1977858279/dino-runner on GitHubLANG HTMLHOSTED ON 1977858279.GITHUB.IOUPDATED 10 Oct 2026

Made this, @1977858279? See how many people played it → or use email

Controls: Arrow keys · Space · Mouse · Tap

▶ Play full screen ▲ Vote: free account with email ▲ Or sign in with GitHub

GitHub may ask you to sign in, then to let VibeCruiser “Verify your GitHub identity” and “Act on your behalf”. We only read your profile and email, and never post anything.

Open the live demo Source on GitHub

From the README

一个用原生 Canvas 写的恐龙跑酷小游戏。单文件、零依赖、双击就能玩。

纯手写的像素画,没有任何图片素材——恐龙、仙人掌、翼龙、云、月亮全部是代码里 一格一格画出来的;音效也是用 WebAudio 现场合成的。

撞到仙人掌或者翼龙就结束,按 空格 或点击重来。 每跑 100 分响一声,每 700 分昼夜切换一次。 最高分存在浏览器的 localStorage 里,关掉再打开还在。

翼龙有三种高度:低空的要跳过去、中空的要蹲下去、高空的直接跑过去就行。 分数越高跑得越快:380 → 950 像素/秒,中途会慢慢加速。 判定盒比画的图形小一圈,擦边不算撞,手感更宽容。 长按跳得高、轻点跳得矮;空中按 ↓ 会加速落地。 切到别的标签页会自动暂停,不会回来就被撞死。

跳跃用固定的重力和初速度算抛物线。这里踩过一个坑:障碍物是横向移动的, 所以「恐龙在空中的那段时间」必须明显长于「最宽的障碍物从头顶掠过的时间」, 否则就会出现理论上不可能躲开的必死题。

一开始重力设成 2400,滞空只有 0.58 秒,而三连大仙人掌掠过头顶要 0.66 秒—— 真的跳不过去。后来把重力降到 1600(滞空约 0.73 秒),同时把大仙人掌限制成最多 两连,才算稳。这个结论是跑了一个「帧级反应的自动玩家」验证的:它能顶着最高速 连续跑满 240 秒不吃一次亏。

Read the full README on GitHub →

Built something like this? Submit your vibe — free account, takes a minute. How listing works.

More like this

More dino games →

Made this?

Claim it: create a free account, then press CLAIM THIS in the cruiser. Put the badge below in your README or on your demo page first; that link is how we know it's yours.

Your project is on the cruise, loaded live from your own site. Put the badge in your README or on the demo page: it shows your live play count, it links back to this page, and everyone who lands here is one click from running the real thing.

On VibeCruiser

How listing, the badge and claiming work →