{"id":607,"date":"2012-04-30T17:33:44","date_gmt":"2012-04-30T16:33:44","guid":{"rendered":"http:\/\/www.aymericlamboley.fr\/blog\/?p=607"},"modified":"2012-04-30T22:01:33","modified_gmt":"2012-04-30T21:01:33","slug":"the-citrus-engine-goes-on-haxe-nme-welcome-to-the-citruxengine","status":"publish","type":"post","link":"http:\/\/www.aymericlamboley.fr\/blog\/the-citrus-engine-goes-on-haxe-nme-welcome-to-the-citruxengine\/","title":{"rendered":"The Citrus Engine goes on Haxe NME, welcome to the CitruxEngine"},"content":{"rendered":"<p>One month ago I started to work on the CitruxEngine. I was very confident with <a href=\"http:\/\/haxe.org\/\" target=\"_blank\">Haxe<\/a> performance on mobile and <a href=\"http:\/\/haxenme.org\/\" target=\"_blank\">NME<\/a> cross platform opportunities. And now, I can say those are awesome!<\/p>\n<p>In April 14-15th, I was in Paris to assist to the Haxe conf 2012. It was really cool, <a href=\"http:\/\/www.silexlabs.org\/\" target=\"_blank\">Silex Labs<\/a> has made a good job! Conferences were very interested and the community greatly friendly. And I had the opportunity to make a lightning talk concerning my contribution to the <a href=\"http:\/\/citrusengine.com\/\" target=\"_blank\">Citrus Engine<\/a> 2D game framework and its port on Haxe NME. The presentation was a bit from scratch, but that was a good experience! I&#8217;m very happy to be the first to start the lightning talk, since there were very serious projects \ud83d\ude00<\/p>\n<p><a href=\"https:\/\/github.com\/alamboley\/CitruxEngine\" target=\"_blank\">CitruxEngine Github.<\/a><br \/>\n<a href=\"http:\/\/alamboley.github.com\/CitruxEngine\/\" target=\"_blank\">CitruxEngine Demo.<\/a> Simple demo which have been tested on Flash &#038; CPP (using left\/right key and spacebar) and iOS (touch &#038; accelerometer). There are sound, animations (idle, walk and jump) and physics.<br \/>\n<em>The port is currently not finished!<\/em><\/p>\n<p>I will not present some code here. If you are already familiar with the Citrus Engine, there will be no problem. Take a look on the example on Github.<\/p>\n<p><strong>HTML5<\/strong><br \/>\nWhen I started the port, I would the CitruxEngine be as cross platform as possible. HTML5 is promising, and <a href=\"https:\/\/twitter.com\/#!\/grumpytoad\" target=\"_blank\">Niel Drummond<\/a> the man behind <a href=\"http:\/\/jeash.com\/\" target=\"_blank\">Jeash<\/a> has made an incredible job! However I found that the Haxe NME Box2D port has not very good performance with HTML5. So I&#8217;ve dropped the HTML5 target at the moment, but I keep an eye on Jeash!<\/p>\n<p><strong>Box2D<\/strong><br \/>\nThanks to Haxe NME, Box2D runs very well on mobile! This is mostly the reason why I&#8217;ve started the CitruxEngine. The Citrus Engine uses the AS3 Alchemy version of Box2D which has some differences with the original. It seems there is a bug with the Haxe NME Box2D port : <em>the beginContact &#038; endContact listeners are fired all the time if a dynamic body is on a static body (like a hero on a platform), whereas it fires only once if there are 2 dynamics bodies<\/em>. This behavior is blocking me.<\/p>\n<p><strong>SpriteSheets<\/strong><br \/>\nI made my test with the spritesheet haxelib which uses <a href=\"http:\/\/www.loqheart.com\/spriteloq\/\" target=\"_blank\">SpriteLoq<\/a>. At the moment it works well. I&#8217;ve not made serious test with animations.<\/p>\n<p><strong>Level Editor<\/strong><br \/>\nI love how the Citrus Engine handles Flash Pro as a Level Editor. I would like the Haxe NME version handles it as well. But at the moment we can&#8217;t read AS3 code in a SWF file (it is the way that class and properties are defined), so I need to think to an external way. Maybe it&#8217;s time to reconsider the Level Architect!<\/p>\n<p><strong>Console<\/strong><br \/>\nThe console is really a cool feature of the Citrus Engine, it will be available in the CitruxEngine too. I&#8217;ve started to implement it, but it&#8217;s not ready yet.<\/p>\n<p>I will continue to work on the CitruxEngine, but now I&#8217;ve to focus on my school project using Objective-C, it&#8217;s really hard to get back when you have tested Haxe power ! In less than two months I will be graduate and looking for a job, future is exciting.<\/p>\n<p>Thanks to <a href=\"https:\/\/twitter.com\/#!\/postite\" target=\"_blank\">postite<\/a> &#038; <a href=\"https:\/\/twitter.com\/#!\/elsassph\" target=\"_blank\">elsassph<\/a> for their help!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One month ago I started to work on the CitruxEngine. I was very confident with Haxe performance on mobile and NME cross platform opportunities. And now, I can say those are awesome! In April 14-15th, I was in Paris to assist to the Haxe conf 2012. It was really cool, Silex Labs has made a &hellip; <a href=\"http:\/\/www.aymericlamboley.fr\/blog\/the-citrus-engine-goes-on-haxe-nme-welcome-to-the-citruxengine\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">The Citrus Engine goes on Haxe NME, welcome to the CitruxEngine<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[4,115,51,33,11,70,106,114,6],"tags":[119,27,52,128,127,34,26,71,126,190,117,74],"_links":{"self":[{"href":"http:\/\/www.aymericlamboley.fr\/blog\/wp-json\/wp\/v2\/posts\/607"}],"collection":[{"href":"http:\/\/www.aymericlamboley.fr\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.aymericlamboley.fr\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.aymericlamboley.fr\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.aymericlamboley.fr\/blog\/wp-json\/wp\/v2\/comments?post=607"}],"version-history":[{"count":13,"href":"http:\/\/www.aymericlamboley.fr\/blog\/wp-json\/wp\/v2\/posts\/607\/revisions"}],"predecessor-version":[{"id":621,"href":"http:\/\/www.aymericlamboley.fr\/blog\/wp-json\/wp\/v2\/posts\/607\/revisions\/621"}],"wp:attachment":[{"href":"http:\/\/www.aymericlamboley.fr\/blog\/wp-json\/wp\/v2\/media?parent=607"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.aymericlamboley.fr\/blog\/wp-json\/wp\/v2\/categories?post=607"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.aymericlamboley.fr\/blog\/wp-json\/wp\/v2\/tags?post=607"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}