Introduction
NME is an easy-to-use, cross-platform framework, perfect for game or application development.
The APIS follow the flash API closely. This shoshould make NME especially familiar if you have ActionScript experience. The API is also easy to understand if you have not worked with flash before.
If you are new to programming, please visit the new developers' guide. This will help introduce you to the haxe programming language, as well as basic programming concepts.
If you have experience with ActionScript, you are interested in visiting the as3 developers 'Guide, which has des more details about the simularities (and small differences) between ActionScript 3, Flash, haxe and NME.
Framework Introduction
NME is a full-process nekomedia engine. It is a multimedia Engine Based on Neko. NME adds the SDL framework to abstract multimedia hardware-related operations and adds common 2D game development APIs, A cross-platform solution based on haxe is provided, which can be released to iOS, WebOS, Android, windows, Mac, Linux, Flash Player, and other platforms only once.
- The target platform is Windows/MAC/Linux and IOS/Android/WebOS. The native language is used after conversion;
- Can be compiled to flash, so compile it for the browser.
Several major projects:
- Neko, source code translated into. N bytecode, provides virtual machine execution bytecode, provides a cross-platform capability;
- Haxe and haxe source code can be converted to Javascript, as3, Neko bytecode, CPP, PHP, and so on;
- Hxcpp. If the target language is CPP, the project must provide runtime support;
- SDL-static, static library compilation under Win32, Mac OSX, iPhone OS and linux32;
NME main components:
- Similar to the Flash API structure, the API layer is written in haxe;
- Support for pre-compiled libraries on the target platform, including SDL, OpenGL, Regexp, and zlib. SDL is only used on Windows, Mac, Linux, and WebOS;
For iOS, Android, win, WebOS, Mac, and Linux platforms, haxe converts the source code to C ++ code, and then compiles the \ link with the pre-compiled library on the target platform, to achieve native efficiency.
How it works Publishing to a Flash SWF
If you publish to flash, NME will use the haxe language compiler to generate a Flash SWF from your code. the compiler is very fast and reliable. haxe was built by the same team that created mtasc, the original open-source ActionScript compiler.
Once your SWF has been created, NME embeds your assets directly into the SWF. if you wowould prefer to keep assets separate, you can still use NME. display. loader and nme.net. urlloader to load external assets. NME embeds only assets you have defined in your nmml project file.
Publishing to IOS
If you publish to iOS, NME will use the haxe language compiler and the hxcpp library for haxe to generate C ++ class files. these are combined with a flash-like "standard library" for iOS, composed of C ++ and objective-C class files. your code and your assets are pushed into an xcode project that is generated for you.
When you are ready to compile, you can open the generated project in xcode and publish to the iPhone simulator, A provisioned iPod Touch, iPhone or iPad, or any other target xcode may provide.
In development builds of NME, it is also possible to publish directly to the iPhone or iPad simulator, without opening xcode, using the "test" command and the "-Simulator" or "-Simulator-iPad" flags.
Publishing to WebOS
If you publish to WebOS, NME will use the haxe language compiler, combined with the hxcpp library for haxe, to generate C ++ classes from your code. this is combined with a flash-like "standard library" for WebOS, written in C ++. NME will then use an arm g ++ compiler to create an executable binary for your project. if you are using Windows, this will be the codesourcery arm GNU/Linux g ++ compiler that is recommended by HP. if you are using Mac or Linux, The toolchain is already installed with the WebOS SDK.
With your executable compiled, NME will combine your application with your project assets and generate a WebOS application (IPK) using the standard WebOS SDK tools. if you like, NME will also install the application on a connected WebOS device and run the project.
Publishing to Android
If you publish to Android, NME will use the haxe language compiler, as well as the hxcpp library for haxe, to generate C ++ classes from your code. NME will also generate supporting Java classes for your application.
NME then combines your code with a flash-like "standard library" for Android, written in Java and C ++, and compiles using the android ndk and Android SDK. by running an Apache ant process, the build process is completed, and if you like, your application is installed to a connected Android device and run.
Publishing to Windows
If you publish to Windows, NME will use the haxe language compiler, as well as the hxcpp library for haxe, to generate C ++ classes from your code. combined with a flash-like "standard library" written in C ++, NME will use the Visual Studio C ++ command-line compiler to generate a Native Windows application.
Your application and supporting assets are copied to a single build directory, and if you like, the application is also run.
Publishing to Mac or Linux
If you publish to Mac or Linux, NME will use the haxe language compiler, as well as the hxcpp library for haxe, to generate C ++ classes from your code. NME will then combine your code with a flash-like "standard library" written in C ++ and compile a native executable using the G ++ compiler installed on your system.
If you are using a Mac, G ++ is usually provided by xcode. if you are using Linux, G ++ will probably be installed on your system already. NME supports 32-and 64-bit builds, so you can compile for either or both, so long as you have the necessary libraries on your system to cross-compile. NME will copy your application and supporting assets to the same build directory, and if you like, run your application.