About Openfl Openfl Is the Successor of NME, for Haxe 3+. Building a Game Or Application with Openfl Is Almost Like Writing

About Openfl Openfl Is the Successor of NME, for Haxe 3+. Building a Game Or Application with Openfl Is Almost Like Writing

About OpenFL OpenFL is the successor of NME, for Haxe 3+. Building a game or application with OpenFL is almost like writing for a single platform. However, when you are ready to publish your application, you can choose between t argets like iOS, webOS, Android, Windows, Mac, Linux and Flash Player. Instead of using the lowest common denominator between platforms with a "universal" runtime, OpenFL projects are compiled as SWF bytecode or C++ applications, using the Haxe language compiler and the standard C++ compiler toolchain for each platform. Read more: http://openfl.org/ Project configuration, libraries, classpaths OpenFL configuration is based on a XML file - it allows you very complex configurations depending on the target platform. There is no GUI for it. DO NOT modify FlashDevelop project properties as they will automatically be synchronized with the XML when you modify it. Development OpenFL is encouraging to develop using the Flash API (ie. flash.display. Sprite) as in ActionScript 3. Just code like you would code a Flash application, with the limitation t hat you can only use the drawing API, bitmaps (see below) and TextFields. However test often all the platforms you plan to target! In OpenFL 3.x, SWFs and videos aren't supported yet. Assets Place all your images, sounds, fonts in /assets and access them in your code using the global Assets class which abstracts assets management for all platforms: var img = new Bitmap(Assets.getBitmapData("assets/my-image.png") ); addChild(img); Tutorials: https://github.com/openfl/openfl/wiki/Get-Started Debugging By default your project targets Flash so you'll be able to add breakpoin ts and debug your app like any AS3 project. HTML5 target can be debugged in the browser - some browsers, like Chrome , support "script maps" which let you interactively debug .hx code directly instead of the gener ated JS. There is however no interactive debugger yet for native targets. Changing target platform For OpenFL projects, an additional drop-down menu appears in the main to olbar where you can choose a supported targets on Windows: flash, html5, windows, neko, android, we bos, blackberry. You can also manually enter a custom target not in the list. Attention, for native targets you'll need to install additional compiler s & SDKs. The compiler will tell you in the Output panel what command to execute for that. More information here: https://github.com/openfl/openfl/wiki/Get-Started Tips: - in C++ expect first compilation to be very long as it first compiles t he whole OpenFL API, - if a change is not taken in account, delete everything in /bin to star t a fresh compilation, - on mobile, Bitmap blitting is NOT performant, - use spritesheets and Tilesheet.drawTiles for optimal rendering perform ance..

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    2 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us