GithubHelp home page GithubHelp logo

nvdnkpr / molecule Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fjsantosb/molecule

0.0 2.0 0.0 3.8 MB

Html5 Game Framework to build cross-platform games on a fast and efficient way.

Home Page: www.moleculejs.net

License: MIT License

molecule's Introduction

Molecule - HTML5 Game Framework

This is the official repository for the Molecule HTML5 Game Framework. All documentation, features and examples can be seen on the official website: http://www.moleculejs.net

CHANGE LOG

0.9.2
  • Optimized collisions and fixed bugs
  • Changed the concept of object to "molecule". Check tutorials for more information
  • Added game.log method, which can be used as console.log, only it will only log ones
  • Added Molecule().ready() which encourages to use a "molecule" as starting point of your game
  • Added events listening, read tutorials for more info
  • Added game.timeout, read tutorials for more info
  • Fixed general bugs
0.9.1
  • Changed API of creating, adding and removing sprites, Molecule Objects and text. It is now more consistent. Check out the tutorials
  • Added a powerful "get" API to let you easily fetch entities in your game
  • You can now add Molecule properties on objects in Tiled map editor. Tutorial coming soon!
  • game.Object.extend is now changed to game.object.define, for consistency reasons. You can still do:
    var myObj = game.object.define({});
    var extendedObj = myObj.extend({});
  • You can now append the canvas to a target dom node using ID. Check basic tutorial
  • Changed text.x and text.y to text.position.x and text.position.y for consistency
  • Added game.once method. game.once(function () { console.log('hey'); }). Will only trigger once. Nice for debug

´´´javascript

var myObj = game.object.define({}); var myExtendedObject = myObject.extend({});

´´´

Build instructions

The easiest way to build molecule uses grunt, which requires node and npm. Once installed, run npm install from molecule root directory (this will pull down about 30MB of node packages). From then on, just simply run grunt to build (it will create molecule.js and molecule.min.js on the build directory).

Code style guide

  • Use lowerCamelCase as a naming convention (It is very common in JS to use firstName, lastName).
  • Use 4 spaces (soft tabs), instead tabs (hard tabs).
  • No trailing whitespace on blank lines.
  • Always use strict equal === unless you need to do any type conversion.
  • Use single quotation mark ' instead double quotation mark ".
  • Comments should have their own line, no trailing comments, and the line above should be empty.
  • On if/for etc. there should always be brackets, even though not needed (often you put more into the if, and then you do not have to add them again).
  • Always use literal notation, no new Array(), but [].

molecule's People

Contributors

christianalfoni avatar ellisonleao avatar fjsantosb avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.