stavro / snakes

:snake: Multiplayer "Snake" game using Ruby, MongoDB, WebSockets, and HTML canvas.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Snakes

Built as a learning experiment. Multiplayer "Snake" game using Ruby, WebSockets, and HTML canvas.

image

Application architecture

The application is divided into two parts, a (1) game server, and a (2) web server.

Data (user names, scores, images, etc) is persisted through MongoDB, with a single user model shared between both the game server and the web server.

Game Server

Snakes.io game server is powered by Reel, a "fast, non-blocking evented web server" built atop Celluloid, a concurrent object framework. Celluloid is probably most well-known for previously powering Sidekiq, an amazing background job processor for Ruby.

The game server runs on JRuby, per Celluloid recommendations.

Web Server

A simple Rails 4 application responsible for serving the website, authentication with Facebook, and asset compilation & management.

About

:snake: Multiplayer "Snake" game using Ruby, MongoDB, WebSockets, and HTML canvas.


Languages

Language:Ruby 70.2%Language:HTML 12.9%Language:JavaScript 8.3%Language:CSS 5.8%Language:Shell 2.5%Language:CoffeeScript 0.3%