百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
S

swiftcode

> 数据库
开源

多人互动、实时打字速度游戏

99 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

多人互动、实时打字速度游戏

SwiftCODE

SwiftCODE is a multiplayer, interactive, realtime typing speed game for coders.

How to play

The app is built around 2 main pages.

  • After logging in, or choosing to be anonymous, the user is redirected to the lobby, where the currently active games are shown. From here, they can choose to join a game or create their own (either single-player or multiplayer) from a set of preconfigured programming languages.

  • Once the user has created or joined a game, they are redirected to the game screen where the code snippet loads. There they wait until another user joins their game, after which the countdown begins. Each game can have a maximum of 4 players. Once the game starts, players must type the provided code as fast as possible. Throughout this, the players' current positions are shown to each other in real-time, and at the end some statistics are shown.

Vision

As programmers, we rely on many tools while coding. A keyboard is usually the most basic and most important of all such tools. Of course, there are far more important skills that a developer must have than typing speed. That being said, however, it's still great fun to hear the keys clicking away as you furiously write out some code. In fact, it's so fun, why not make it into a game? And a multiplayer one at that!

In the past, I've enjoyed typing games, but there is a large difference between typing natural language, and typing code (even the choice of programming language can make a significant difference!). I had found Typing.io a while back, which is great fun - but unfortunately doesn't support any kind of multiplayer.

The goal of this project was to fill that gap - to create a multiplayer, interactive, typing game for developers! I envisioned multiple players simultaneously receiving a piece of code, getting ready, and then racing each other to type out the code, all while streaming the progress of each player to his opponents, and animating their progress via multiple cursors on the player's screen.

Installation

Requirements

  • Node.js and NPM (v0.10)
  • MongoDB (v2.4)

Download

Grab the source code and the NPM dependencies.

bash
git clone https://github.com/voithos/swiftcode.git
cd swiftcode
npm install

Configure

Create a database in MongoDB for SwiftCODE, and create a MongoDB user account that SwiftCODE will use to connect.

mongo
> use swiftcode
> db.addUser({ user: 'swiftcodeuser', pwd: 'password', roles: ['readWrite'] })

Copy the sample settings.js.example.js file to settings.js, and fill out the settings as desired (specifically, you must provide the database settings to your MongoDB).

bash
cd src
cp settings.js.example.js settings.js
vim settings.js

SwiftCODE does not come with code exercises preloaded, but does have a simple admin interface which allows for the definition of new languages, projects, and exercises. An admin user is required to access the interface, which can be created through grunt (note, this requires the database settings to be in place).

grunt add-admin

The following prompt is for a username and a password (must be >= 8 characters). Once an admin user has been added, the admin interface can be accessed after logging in, using the link in the drop-down in the top-right corner of the page.

Run

At this point, SwiftCODE should be fully set up, and runnable.

./runserver.js

Success!

Open Source

Without open source technologies and libraries, this project would not be possible. A great thanks goes to all of their creators. Listed in no particular order:

  • Node.js
  • Express
  • Socket.IO
  • MongoDB and Mongoose
  • Bootstrap
  • jQuery
  • Knockout.js
  • Highlight.js
  • Lo-dash
  • Moment.js
  • Jade
  • Passport
  • Cheerio
  • Helmet
  • Alertify
  • Favico.js
  • Mousetrap
  • And of course, HTML5 itself!

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

JavaScriptgamemongodbmultiplayertyping-game

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类数据库
定价开源

> 相关工具

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库