Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
gin - a simple & efficient HTML5 game engine
JavaScript
Branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
release make releases more visible
LICENSE add license text
README.textile minor doc tweaks
TODO
gin.js

README.textile

Welcome to send me feedback in github or @huandu on twitter.

If you want to play with gin now, see live demos. Clone the gin-samples project on github for sample source code.

What’s the gin

The gin is a Game Interactive eNgine. It’s designed for HTML5 games on modern browser and mobile device.

gin is a light-weight engine. Unlike other engines, it doesn’t require any OOP knowledge and pre-compile work. It is very straight forward.

Gin is also a kind of distilled beverage, but I’ve never tried it.

Goals

The major goal is to implement most common features required by HTML5 game developers. It will include animation timeline, graphic layers and mouse/gesture/keyboard input support.

With gin, developers should be able to focus on game logic and graphic effects, just like programming in flash. It also implements MovieClip equivalent concept – the layers. Developers can move/resize/render layers independently.

gin caches all keyboard/mouse events. Developers must process these events inside beforerender/render callbacks rather than directly receiving events by adding listerners. It’s a different thinking model comparing to other engines. This model will benefit a lot in long term.

I may add WebGL support in the future.

Non-Goals

It will never include

  • Canvas scene graph api
  • Physical engine
  • Hit test
  • General purpose algorithms, e.g. Array.each. I don’t want to waste my life.

It’s highly recommended to use gin with other js frameworks to complete more tasks.

For instance, developers can use jQuery to animate DOM elements. It also means, gin will not include any DOM element animation support.

I don’t want to reinvent wheel. If I’m doing so, please let me know.

Browser Compatability

The gin is tested on

  • Chrome 8/10
  • Firefox 3.6/4.0
  • Internet Explorer 9.0
Something went wrong with that request. Please try again.