◀ VibeCruiser

pixel 2048

A free minigame game — play it in your browser, no install. 2048 像素版:MIT 协议 2048 的独立复刻,Canvas 2D / 零依赖 / 可打包为 B站小游戏

by @zmtucvfgh · zmtucvfgh/pixel-2048 on GitHubLANG JavaScript★ 1HOSTED ON ZMTUCVFGH.GITHUB.IOUPDATED 17 Nov 2026

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

Controls: Arrow keys

▶ 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

一个完全重写的 2048 复刻:纯 Canvas 2D、零外部素材、零运行时依赖, 同一份代码可以跑在浏览器里,也可以打包成 B站小游戏。

玩法源自 2048(Gabriele Cirulli,MIT)。 本项目为独立实现,未复制其代码,也未使用任何第三方游戏(包括截图中的 「2048 开放趣味游戏」APK)的素材。详见 NOTICE.md。

规则严谨:合并顺序、单次合并、无变化不生成等边界均有单测覆盖(9 个用例). 有手感:滑动 150ms 缓出、合并弹跳、新块缩放、吞并淡出。 能续玩:每次移动自动存档,关掉页面再打开就是原局面。 零素材:图形全代码绘制,音效全 WebAudio 合成 → 包体约 38 KB,无版权链风险。 跨平台:规则层不含 DOM,渲染层只用 Canvas,平台差异收敛在 platform/ 与 src/main.js.

环境:Node.js ≥ 18(仅用于本地静态服务与测试,游戏本身无依赖)

分层是刻意的:core 不认识 Canvas,render 不认识 DOM, 换平台只需要再加一个「壳」。

platform/bootstrap.js:取画布、适配存储、绑定触摸、首帧后调用 bl.launchSuccess().

包体约 38 KB(主包上限 4 MB),不发起网络请求,因此无需配置域名白名单。

Read the full README on GitHub →

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

More like this

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 →