Skip to content


Subversion checkout URL

You can clone with
Download ZIP
An HTML5 game engine for the many faces of mobile WebKit.
JavaScript CSS Ruby Shell
Failed to load latest commit information.
closure @ 2d50315 Initial commit.
externs Initial commit.
src Change touch event detection to work with the latest Chrome.
tools Added a version of the Closure Compiler patched with an @inline
.gitignore Ignore build directories, git.
.gitmodules Initial commit.
LICENSE.txt My new year's resolution is to stop manually dating copyrights. Link out to some impressive multiplayer games built with Hydra.
hydra.rake Fix Windows compilation, probably.


Hydra is a Javascript game engine for mobile browsers. It's been used in several commercial HTML5 games:


Work on Hydra has stopped, but the lessons learned on this project are going toward Flambe, a framework for rapid development of mobile and desktop games.


Hydra aims to be fast:

  • Animations are implemented as CSS transitions, which can be hardware accelerated.
  • All game updates are performed on a single setInterval callback.
  • Games are compiled with Google's Closure Compiler in "advanced" mode, allowing aggressive inlining and dead-code elimination.

Hydra also aims to be functional:

  • Animations can programmatically be started, paused, and sequenced together.
  • Games are composed from scenes, entities (which live in scenes) and tasks (which act upon entities).
  • Has the usual collection of utility functions and classes, supplemented by the massive Closure Library.
  • Needless abstractions are avoided, you should still know how to work with the DOM and skin your game with CSS.


Hydra currently has three heads:

  • iOS 3+ (iPhone, iPod touch, iPad)
  • Android 2.1+
  • Desktop browsers: Chrome, Safari, Firefox, Opera


Hydra is still undocumented, filled with broken glass, and will eat your first born child. If you still want to try to tame it:

Download the Closure submodule:

git submodule init
git submodule update

Use Rake to build an example project:

cd projects/chain

The "chain" (Blast Effect) and "ski" (Snow Bound) games are probably the best places to learn your way around by example.

rake by itself will build the entire game for all supported browsers. For development, you can use rake js to only build for the browser specified by DEFAULT_TARGET. rake css will build only the CSS.

Something went wrong with that request. Please try again.