Omega allows you to quickly build web games using JavaScript. It provides a pulse that provides your framerate, and a stage that redraws evevery time the pulse fires. It also provides a way of creating new entities and for those entities to inherit behaviour.
The following behaviours come bundled with Omega
An overview of the default behaviours that come bundled with Omega. The API of each behavoiur is in the comments of the behaviour.
Allows you to create animations by changing the class names of an entity. CSS rules can then be used to change the background image for each frame of the animation.
Detects a collision between 2 entities. Entities can be belong to multiple collision groups.
Fires a callback after a number of frames have passed. You should use this instead of setTimeout/setInterval.
Creates a 2D dom object on the stage, which can have an x and y position (measured from the bottom left of the stage) and a width and a height.The entity can also be set styles and classes. You should add this behaviour to all your entities.
Simple method of attaching arrow key events to move your entity up, down, left and right
Detects keyboard events and triggers these on the entity
Detects mouse events and triggers these on the entity
Adds text to the entity
Omega has a built in debug toolbar. This allows you to quickly see the performance of your game, and identify any performance problems.
require([
'omega/core',
'omega/debug/core'
], function (Ω, Debug) {
var container = document.getElementById('omegajs'),
width = 800,
height = 600,
fps = 30;
Ω.init(container, width, height, fps);
new Debug();
});
sudo npm install -g grunt-cli
- grunt jslint
- grunt csslint
- grunt test
RequireJS - http://requirejs.org MD5 - http://pajhome.org.uk/crypt/md5/ jQuery - http://jquery.com Flot - http://github.com/flot/flot
- components
- velocity
- wind
- gravity