◀ VibeCruiser

canvas2048

A free browser game — play it in your browser, no install. 学习并使用 html5 canvas 制作 2048 小游戏 操作区有4X4共16个空白小卡片, 开局时随机出现若干卡片上面有数字2或4, 玩家可使用方向键控制所有卡片移动. 当按下"↓"方向键时, 所有卡片移动到底部并且相同数字的卡片合并成两个卡片数字之和, 随后在随机空白位置生成1张数字为"2"或"4"的卡片, 以此类推. 当所有位置被填满并且无法继续操作时, 游戏结束, 统计当前所有卡片数字之和, 作为玩家游戏成绩. 游戏结束后, 将玩家成绩与玩家输入的昵称提交到服务器, 并且返回当日/近30天/总榜前10名名单. 制作已经放在 bilibili av9028663 , 欢迎观看与学习.

by @mutoe · mutoe/canvas2048 on GitHubLANG JavaScript★ 3HOSTED ON MUTOE.GITHUB.IOUPDATED 12 Mar 2017

Vote and save it — free account with email or sign in with GitHub

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

Controls: Arrow keys · WASD · 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

学习并使用 html5 canvas 制作 2048 小游戏

操作区有4X4共16个空白小卡片, 开局时随机出现若干卡片上面有数字2或4, 玩家可使用方向键控制所有卡片移动.

当按下"↓"方向键时, 所有卡片移动到底部并且相同数字的卡片合并成两个卡片数字之和, 随后在随机空白位置生成1张数字为"2"或"4"的卡片, 以此类推.

当所有位置被填满并且无法继续操作时, 游戏结束, 统计当前所有卡片数字之和, 作为玩家游戏成绩.

游戏结束后, 将玩家成绩与玩家输入的昵称提交到服务器, 并且返回当日/近30天/总榜前10名名单.

制作已经放在 bilibili av9028663 , 欢迎观看与学习.

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 →