Skip to content
grumpytoad edited this page Oct 10, 2012 · 19 revisions

Here is the wiki for the contributors of NME. Mainly for sharing development ideas and coding guidelines etc.

To learn using NME, check the documentation.

About this Github repo

This is the official GIT mirror of NME's SVN repo on Google Code. You can fork and make pull request to here, and the changes will be synchronized to the SVN repo from time to time.

However, the main contributors of NME is still using SVN, and the synchronization is not automatic at the moment. So please take a look at the SVN repo before starting to work on a feature/issue to avoid conflict or waste of time.

Things you can contribute

Fixing bugs

Take a look at the issue pages:

Yeah, it is an issue to have so many place for issues. But it is our current status.

Implementing missing features

For missing feature we mean the Flash API that is not yet implemented in NME. When implementing it, please make sure the behavior and the API signature is identical to the corresponding one of the latest version of Flash. Try to document it clearly if the implemented feature is complete for all the NME targets or only works for some targets.

For anything not included in the Flash API or not already existed in NME, don't make an pull request to NME. Instead, write an NME extension.

Writing NME extension

NME extension allows one to extend or overwrite default NME behaviors. It is also possible to interface with native library, for example written in Java (for Android project)/ Objective-C (for iOS project).

Here is a tutorial:

Coding conventions

Since NME is truly cross-platform that it contains code written in several languages: C++, Objective-C, Java, JavaScript and of course Haxe. It means the contributors of NME are also come from different backgrounds. It is hard to unify the coding conventions. But, try to make sure the following things are consistent at least in a single file:

  • Use of tabs or spaces.
  • Use of Egyptian brackets or not:
if (true) {
    //codes
}

vs

if (true)
{
    //codes
}
  • Use of spaces before and/or after : of type declarations. Eg. var for:Bar vs var for : Bar.

Discuss new features or changes to the API

Open a discussion on new features, or extending the API to be more compatible with another target, either in the mailing list or forums. There may be reasons why features are missing, or someone else may have already attempted this change and can give some advice.

Have larger changesets reviewed early, NME has many interrelated parts, which often require lots of manual testing. Iterating through smaller chunks that get peer reviewed at different stages is the best way to create a great patch.

Commit logs should reference a URL

Commit logs from outside the core team should usually reference an external source for the change, either a bug ticket or a URL.

The team often looks over commit logs, it's sometimes unclear why a commit was made. A link in the commit log is helpful for a historical reference should that patch ever become an issue for another bug.

License compatibility

If you are using code from another source, make sure the external code is not intellectual property and is permissively licensed enough to be compatible with NME's MIT license.

Generally, this means you can use LGPL/MIT, and other public domain licenses. If in doubt, ask the author politely if you can use the code for an open source project.

Clone this wiki locally