Nicolas Cannasse Blog http://ncannasse.fr/ Blog haXe Wiki System en Small Update http://ncannasse.fr/blog/small_update http://ncannasse.fr/blog/small_update Sun, 4 May 2014 22:40:55 +0200 Sun, 4 May 2014 22:40:55 +0200 Nicolas Cannasse Nicolas Cannasse <p>Looks like I haven't been writing much on my blog recently. Today I mostly write stuff on Twitter, a...</p> <p>Looks like I haven't been writing much on my blog recently. Today I mostly write stuff on Twitter, and have less time for full fledged articles.</p> <p>Here's a list of links if you still want to follow my activity:</p> <ul><li><a href="https://twitter.com/ncannasse" class="extern">@ncannasse</a> on Twitter</li><li><a href="http://shirogames.com" class="extern">Shiro Games</a>, the game studio I co-founded and which I'm happily giving most of my time</li><li><a href="http://haxe-foundation.org" class="extern">Haxe Foundation</a> which I'm managing on a daily basis</li><li>My <a href="http://www.ludumdare.com/compo/author/ncannasse/" class="extern">Ludum Dare</a> games, which I try to attend as much as possbile</li></ul> <p>Maybe when I have some time I'll try to replace the blog with a small website presenting my games.</p> WWX 2013 Keynote http://ncannasse.fr/blog/wwx_2013_keynote http://ncannasse.fr/blog/wwx_2013_keynote Sat, 1 Jun 2013 23:29:53 +0200 Sat, 1 Jun 2013 23:29:53 +0200 Nicolas Cannasse Nicolas Cannasse <p>Here's the keynote I gave at this year <a href="http://wwx.haxe.or" class="extern">WWX Conference</a>, it shows the new things we have in Haxe 3.0 a...</p> <p>Here's the keynote I gave at this year <a href="http://wwx.haxe.or" class="extern">WWX Conference</a>, it shows the new things we have in Haxe 3.0 and Haxe Foundation plans for the future:</p> <iframe width="420" height="315" src="http://www.youtube.com/embed/ytDBqbEm8Xk" frameborder="0" allowfullscreen="allowfullscreen"></iframe> Getting Rid of Flash ? http://ncannasse.fr/blog/getting_rid_of_flash http://ncannasse.fr/blog/getting_rid_of_flash Sat, 22 Dec 2012 16:39:49 +0100 Sat, 22 Dec 2012 16:39:49 +0100 Nicolas Cannasse Nicolas Cannasse <p>In the past months and especially the past weeks I've been working on the H3D/H2D library which is a...</p> <p>In the past months and especially the past weeks I've been working on the H3D/H2D library which is available on github here : <a href="http://github.com/ncannasse/h3d" class="extern">http://github.com/ncannasse/h3d</a></p> <p>The h3d part is a generalistic low level 3D engine that wraps and abstract the Flash Stage3D API. It also nows integrate well with HxSL shader engine v2 <a href="http://github.com/ncannasse/hxsl" class="extern">http://github.com/ncannasse/hxsl</a> and have a scene graph that makes it easy to manipulate 3D objects, with support for the popular FBX file format with Skinned meshes animation support.</p> <p>Here's a quick example that shows the result (model is made by <a href="http://shirogames.com" class="extern">Shiro Games</a> for our upcoming game <a href="http://evoland.shirogames.com" class="extern">Evoland</a>).</p> <p><div class="swf" id="swf_1" style="width : 600px">[fbxViewer.swf]</div><script type="text/javascript" id="js_1">var o = new js.SWFObject('/file/fbxViewer.swf','swfobj_1',600,400,'9','#FFFFFF');o.addParam('wmode','direct');o.write('swf_1');</script></p> <p>But more often you want also to use the same engine to display 2D sprites so I have added the <code>h2d</code> package that provides a full scene with 2D objects : Bitmaps, but also Tile groups, Text, etc.</p> <p>I've actually built by last LudumDare Compo entry <a href="http://ncannasse.fr/file/ld25/" class="extern">Small Theft Auto</a> using h2d, and you can get the <a href="http://github.com/ncannasse/ld25" class="extern">sources</a> for it.</p> <p><img src="/file/57fd08d9eec1a89be6fe843d114377b8.jpg" alt="57fd08d9eec1a89be6fe843d114377b8.jpg" class="intern"/></p> <p>Since h2d is built on top of h3d, it also makes a good use of the GPU, which is absolutely necessary to get decent performances on mobile devices.</p> <p>While inspired by what is provided by the Flash API - and much of people familiar with it will feel at home - both h2d and h3d also go their own way in order to adapt to what is efficient for the GPU, allowing fancy graphics effects that would put any CPU on its knees.</p> <p>But the best part about <code>h3d</code> and <code>h2d</code> is that they are entirely written in Haxe, and make very minimal usage of the Flash API. As a result I'm planning to adapt it to use WebGL and NME/OpenGL rendering, so it can target much more platforms in a much more efficient way.</p> <p>With these tools on the table, Flash is no longer something important, it's just a commodity, a platform that you can target if you wish, or do something else depending on your target audience.</p> <p>It brings out the real usefulness of Haxe which is platform neutrality and developer freedom.</p> <p>At the moment, both h2d and h3d are still evolving quickly, so there might still be a few breakages in the API. They also require a quite recent SVN version of Haxe, but I think they will most likely be ready for release in early 2013.</p> <p>Just wanted to bring the word out and hope people are as exited about it as I am !</p> Haxe Foundation http://ncannasse.fr/blog/haxe_foundation http://ncannasse.fr/blog/haxe_foundation Thu, 15 Nov 2012 22:36:41 +0100 Thu, 15 Nov 2012 22:36:41 +0100 Nicolas Cannasse Nicolas Cannasse <p>After years of development, Haxe finally have its dedicated Foundation !</p> <p>I think that given Haxe inc...</p> <p>After years of development, Haxe finally have its dedicated Foundation !</p> <p>I think that given Haxe increasing success over the past years it should have been done before, but I was lacking the time and focus for it. After leaving <a href="http://motion-twin.com" class="extern">Motion-Twin</a> to create <a href="http://shirogames.com" class="extern">Shiro Games</a> it was necessary to make it clear for our users that Haxe is here to stay, and will be supported in the long term.</p> <p>The Haxe Foundation is now the main point of contact for companies that want to adopt Haxe and have questions about it. We are also offering Paid Support Plans and sponsoring various Haxe-related open source projects.</p> <p>You can read more about it on <a href="http://haxe-foundation.org" class="extern">http://haxe-foundation.org</a></p> <p>Long live to Haxe, long live to the Haxe Foundation !</p> Evoland http://ncannasse.fr/blog/evoland http://ncannasse.fr/blog/evoland Wed, 29 Aug 2012 01:05:37 +0200 Wed, 29 Aug 2012 01:05:37 +0200 Nicolas Cannasse Nicolas Cannasse <p>On Sunday night when I went bed at 4am, tired but satisfied by the game I built in 48 hours for the ...</p> <p>On Sunday night when I went bed at 4am, tired but satisfied by the game I built in 48 hours for the 24th <a href="http://ludumdare.com" class="extern">Ludum Dare</a>, i was not expecting that the next day it will be such a success.</p> <p><img src="/file/evoland.png" alt="evoland.png" class="intern"/></p> <p>First thing I learnt this morning was that DropBox was limiting the amount of traffic you can have on your Public links, and that it has then blocked the game. I was quite surprised since it didn't happen before with my previous games.</p> <p>Then I started noticing little by little that the game buzz had spread a lot further than the original LD contest...</p> <p>Here's so far the press links I have found :<ul><li><a href="http://boingboing.net/2012/08/27/evoland.html" class="extern">Boing Boing</a></li><li><a href="http://indiegames.com/2012/08/an_evolution_of_zelda_with_a_t.html" class="extern">IndieGames.com</a></li><li><a href="http://www.reddit.com/r/gaming/comments/z1rl3/found_an_enjoyable_little_zeldaish_game_that_lets" class="extern">Reddit Thread</a></li><li><a href="http://www.freeindiegam.es/2012/08/evoland-ncannasse/" class="extern">FreeIndieGam.es</a></li><li><a href="http://www.howtogeek.com/122881/evoland-a-video-game-about-video-game-history/" class="extern">HowToGeek</a></li><li><a href="http://www.lazytechguys.com/news/evoland-details-video-game-history-through-well-a-video-game/#.UD3H3sEaNZ4" class="extern">LazyTechGuys</a></li><li><a href="http://www.iheartchaos.com/post/30364653667/evening-free-games-evoland" class="extern">I Heart Chaos</a></li><li><a href="http://www.pcworld.com/article/261678/free_game_friday_three_games_on_evolution.html" class="extern">PCWorld</a></li></ul></p> <p>And in French :<ul><li><a href="http://www.gizmodo.fr/2012/08/27/evoland.html" class="extern">Gizmondo.fr</a></li><li><a href="http://blog.lefigaro.fr/hightech/2012/08/evoland-levolution-du-jeu-vide.html" class="extern">Le Figaro Blog</a></li><li><a href="http://playtime.blog.lemonde.fr/2012/08/28/la-ludum-dare-et-le-defi-de-l-evolution/" class="extern">LeMonde Blog</a></li><li><a href="http://www.jeuxactu.com/evoland-tous-les-details-sur-ce-jeu-cree-en-48-heures-82686.htm" class="extern">JeuxActu.com</a></li><li><a href="http://www.jeuxvideo.org/index.php/2012/08/28/evoland-un-jeu-qui-vous-fait-retracer-lhistoire-des-jeux-video/" class="extern">JeuxVideo.org</a></li><li><a href="http://www.ash-k.fr/ludum-dare-evoland/" class="extern">Ash-K.fr</a></li><li><a href="http://www.nikopik.com/2012/08/un-jeu-dont-les-graphismes-evoluent-au-fur-et-a-mesure-de-la-progression.html#comment-12366" class="extern">Nikopik.com</a></li><li><a href="http://www.afjv.com/rp/revue_presse?rp=540" class="extern">AFJV</a></li><li><a href="http://www.gameblog.fr/news/30746-le-jeu-gratuit-de-la-semaine-24-evoland" class="extern">GameBlog.fr</a></li></ul></p> <p>... and looks like there's more to come as the buzz is spreading, with a lot of <a href="https://twitter.com/#!/search/evoland" class="extern">tweets</a> </p> <p>That was, well, unexpected, and even if more reviews does not guarantee at all a good final score for the LD contest, I'm quite happy that people get to play and like my game.</p> <p>For those interested, you can :<ul><li>get the complete sources (with commit history) on <a href="http://github.com/ncannasse/ld24" class="extern">GitHub</a>. Evoland is entirely written in my beloved <a href="http://haxe.org" class="extern">Haxe</a> programming language</li><li>watch the Timelapse - one image taken of my screen every 10s while making the game - for both <a href="http://www.youtube.com/watch?v=fHmByKMttHs" class="extern">Day1</a> (done at Motion-Twin) and <a href="http://www.youtube.com/watch?v=XjNa58bN0uc" class="extern">Day2</a> (at home)</li><li>read my <a href="https://github.com/ncannasse/ld24/blob/master/TIME.txt" class="extern">time log</a> that tells how I spent my time - the game took me actually 25 hours to develop - including lunchs :)</li><li>play my friends LD games <a href="http://www.ludumdare.com/compo/ludum-dare-24/?action=preview&amp;uid=2952" class="extern">Benjamin</a> <a href="http://www.ludumdare.com/compo/ludum-dare-24/?action=preview&amp;uid=2982" class="extern">deepnight</a> <a href="http://www.ludumdare.com/compo/ludum-dare-24/?action=preview&amp;uid=4185" class="extern">mr_Hk_</a> and <a href="http://www.ludumdare.com/compo/ludum-dare-24/?action=preview&amp;uid=5105" class="extern">Procedural team</a></li></ul></p> <p>And of course you can play the Evoland game <a href="/file/ld24/ld24.html" class="broken">here</a></p> <p>I'll try posting a complete post-mortem on Ludum Dare later.</p> <span class="box1"><b>Edit :</b> Evoland actually got the first place at Ludum Date ! I'm working on an Full version now</span> Announcing Shiro Games ! http://ncannasse.fr/blog/announcing_shiro_games http://ncannasse.fr/blog/announcing_shiro_games Mon, 13 Aug 2012 21:55:38 +0200 Mon, 13 Aug 2012 21:55:38 +0200 Nicolas Cannasse Nicolas Cannasse <p>A <a href="/blog/time_for_new_adventures" class="intern">few months ago</a> I announced that I was leaving Motion-Twin.</p> <p>After giving some thoughts to different...</p> <p>A <a href="/blog/time_for_new_adventures" class="intern">few months ago</a> I announced that I was leaving Motion-Twin.</p> <p>After giving some thoughts to different opportunities, I have settled to start again from scratch a new game company called <a href="http://shirogames.com" class="extern">Shiro Games</a></p> <p>We will be making games. Great games. And we have big dreams for the present and future (one of them is to move the company office into an actual castle - since <em>Shiro</em> means both <em>castle</em> and <em>white</em> in japanese).</p> <p>I will be teaming with Sebastien Vidal, which was director at NCSoft Europe, and our first game will be available for PC in mid-2013</p> <p>Please check our brand new website at <a href="http://shirogames.com" class="extern">http://shirogames.com</a></p> <p>Oh ! And most important : we are <b>RECRUITING</b> ! </p> <p>If you want to join our team and work on the (hopefully) next big thing ™, don't hesitate to contact us !</p> <p>And even if you're not interested, please spread the word :)</p> Haxe 2.10 Released http://ncannasse.fr/blog/haxe_2.10 http://ncannasse.fr/blog/haxe_2.10 Mon, 16 Jul 2012 21:02:08 +0200 Mon, 16 Jul 2012 21:02:08 +0200 Nicolas Cannasse Nicolas Cannasse <p>Haxe 2.10 has been released !</p> <p>It's one of the best release so far : two new targets (Java and C#) at...</p> <p>Haxe 2.10 has been released !</p> <p>It's one of the best release so far : two new targets (Java and C#) at once, and many cool features, languages improvements and fixes !</p> <p>Check it out there : <a href="http://haxe.org/doc/release/2.10" class="extern">http://haxe.org/doc/release/2.10</a></p> Haxe 2.10 RC http://ncannasse.fr/blog/haxe_2_10_rc http://ncannasse.fr/blog/haxe_2_10_rc Fri, 22 Jun 2012 19:17:27 +0200 Fri, 22 Jun 2012 19:17:27 +0200 Nicolas Cannasse Nicolas Cannasse <span class="align_right"><img class="intern" alt="logo.png" src="/file/logo.png"/></span> <p>Today we're making available for testing the Haxe 2.10 Release Candidate.</p> <p>At first, 2.09 was suppos...</p> <span class="align_right"><img src="/file/logo.png" alt="logo.png" class="intern"/></span> <p>Today we're making available for testing the Haxe 2.10 Release Candidate.</p> <p>At first, 2.09 was supposed to be the last 2.x so we can focus on 3.0, but we got so many nice things that we decided to make a mid-term release, still keeping best compatibility with 2.x, and allowing you also to enable some of the Haxe3 changes by adding a simple <code>-D haxe3</code> to your compilation parameters.</p> <p>Here's a very short list of the main things we got in 2.10 :</p> <div class="biglist"> <ul><li><b>Java and C# targets</b> ! compile with <code>-java</code> or <code>-cs</code> to output Java or C# source code ! Big thanks to Cauê Waneck which is working on this. It's still in beta, should be a lot better for 3.0, but you can already play with it, report bugs and improvements.</li></ul> <ul><li><b>Reduced JS output</b> : we worked a lot so that <code>--dead-code-elimination</code> really eliminates a lot of standard Haxe things from the output. As you can see on <a href="http://try.haxe.org/#1cf90" class="extern">http://try.haxe.org/#1cf90</a>, a simple <code>Hello Haxe</code> example will be reduced to only 7 lines of JS. We will still activate great features such as reflection, but only when you start using the corresponding API calls (such as <a href="http://haxe.org/api/Type" class="extern">Type.getClassName</a> for instance)</li></ul> <ul><li><b>Smarter Type inference</b> : Haxe type inference got several levels smarter. It can now correctly infers the &quot;minimal type&quot; for constructs using multiple values such as constant arrays / switch / etc. , it can auto detects the expected enum in many cases, enabling you to use the constructor without the need to import it, it can now also do subtyping and variance on constant structures and arrays.</li></ul> <ul><li><b>Macros reification</b> : Haxe macros have been available since early 2011, leading to many successful usages. However it is often hard to manipulate AST enums by hand. With the addition of <a href="/blog/reification_for_macros" class="intern">reification</a>, macros just became much more accessible / usable.</li></ul> <ul><li><b>A Haxe/C++ Debugger</b> is on the way ! You should soon be able to debug your code interactively whatever the platform you target.</li></ul> <ul><li><b>Languages improvements</b> : we also made several small language improvements, which together makes Haxe a lot better :<ul><li>allow direct initialization of properties and member variables</li><li><code>using</code> now imply <code>import</code> as well</li><li>sub classes can now widen method visibility</li><li>overriden methods can now be covariant wrt to the original definition</li><li>allows <code>callback(foo,_,0)</code> notation instead of <code>function(x) return foo(x,0)</code></li><li>local named functions can now have type parameters and be declared as inline</li><li>type constraints are now supported on function and methods type parameters</li><li>improved @:overload so it can now use type parameters</li></ul></li></ul> <ul><li>and of course, the usual minor improvements, bug fixes, optimizations, etc.</li></ul> </div> <p>Big thanks to the whole compiler team, and in particular to Simon Krajewski which have been of a great help with the compiler internals since he joined us.</p> <p>You can download Haxe 2.10 Release Candidate on <a href="http://haxe.org/download#manual-install" class="extern">haxe.org</a>, please don't use the automatic installer (or use the <code>r4946</code> Windows installer <a href="http://haxe.cmt.tc/windowsInstaller/haxe_r4946.exe" class="extern">here</a>).</p> <p>We need your help to test this RC and make sure everything is fine for a proper 2.10 release, which should happen in around two weeks, please report any bugs or regression issues that you might have by posting on the <a href="http://groups.google.com/group/haxelang" class="extern">Haxe Group</a></p> <p>Enjoy !</p> Reification for Macros http://ncannasse.fr/blog/reification_for_macros http://ncannasse.fr/blog/reification_for_macros Sun, 17 Jun 2012 23:22:36 +0200 Sun, 17 Jun 2012 23:22:36 +0200 Nicolas Cannasse Nicolas Cannasse <p>In case you don't know, Haxe has a power <a href="http://haxe.org/manual/macros" class="extern">macro system</a> which allows you to do a lot of compile-time c...</p> <p>In case you don't know, Haxe has a power <a href="http://haxe.org/manual/macros" class="extern">macro system</a> which allows you to do a lot of compile-time checking and code generation. It's a really neat feature that enable you to extend the language in many different ways while still keeping the same syntax and being strictly typed.</p> <p>But up to now it was quite difficult to write macros, since you had to construct the AST (which is the piece of Haxe code you want to generate) by-hand with enums. For instance let's say you want to generate a String &quot;Hello World&quot;, you would have to write :</p> <pre class="haxe">@:macro <span class="kwd">static</span> <span class="kwd">function</span> hello<span class="op">(</span><span class="op">)</span> <span class="op">{</span> <span class="kwd">var</span> pos = haxe<span class="number">.</span>macro<span class="number">.</span>Context<span class="number">.</span>currentPosition<span class="op">(</span><span class="op">)</span>; <span class="kwd">return</span> <span class="op">{</span> expr : EConst<span class="op">(</span>CString<span class="op">(</span><span class="string">"Hello World"</span><span class="op">)</span><span class="op">)</span>, pos : pos <span class="op">}</span>; <span class="op">}</span></pre> <p>And for a more complex <code>for( x in 0...n ) </code> loop :</p> <pre class="haxe"><span class="comment">// repeat the expression 'e' for 'n' times</span> @:macro <span class="kwd">static</span> <span class="kwd">function</span> repeat<span class="op">(</span> e : Expr, n : <span class="type">Int</span> <span class="op">)</span> <span class="op">{</span> <span class="kwd">var</span> pos = haxe<span class="number">.</span>macro<span class="number">.</span>Context<span class="number">.</span>currentPosition<span class="op">(</span><span class="op">)</span>; <span class="comment">// 0...n</span> <span class="kwd">var</span> ezero = <span class="op">{</span> expr : EConst<span class="op">(</span>CInt<span class="op">(</span><span class="number">0</span><span class="op">)</span><span class="op">)</span>, pos : pos <span class="op">}</span>; <span class="kwd">var</span> eN = <span class="op">{</span> expr : EConst<span class="op">(</span>CInt<span class="op">(</span>n<span class="op">)</span><span class="op">)</span>, pos : pos <span class="op">}</span>; <span class="kwd">var</span> iter = <span class="op">{</span> expr : EBinop<span class="op">(</span>OpInterval,ezero,eN<span class="op">)</span>, pos : pos <span class="op">}</span>; <span class="comment">// x in n</span> <span class="kwd">var</span> ein = <span class="op">{</span> expr : EIn<span class="op">(</span><span class="op">{</span> expr : EConst<span class="op">(</span>CIdent<span class="op">(</span><span class="string">"x"</span><span class="op">)</span><span class="op">)</span>, pos : pos <span class="op">}</span>,iter<span class="op">)</span>, pos : pos <span class="op">}</span>; <span class="kwd">return</span> <span class="op">{</span> expr : EFor<span class="op">(</span>ein,e<span class="op">)</span>, pos : pos <span class="op">}</span>; <span class="op">}</span></pre> <p>This looks quite hard to read, and while you can construct the whole language expressions this way, the more complex it become, the longer it takes.</p> <p>Until today.</p> <p>On SVN we have just added a new <code>macro</code> special word that will greatly simplify the task of writing macro, let's look at how the two previous examples are translated :</p> <pre class="haxe">@:macro <span class="kwd">static</span> <span class="kwd">function</span> hello<span class="op">(</span><span class="op">)</span> <span class="op">{</span> <span class="kwd">return</span> macro <span class="string">"Hello World"</span>; <span class="op">}</span> @:macro <span class="kwd">static</span> <span class="kwd">function</span> repeat<span class="op">(</span> e : Expr, eN : Expr <span class="op">)</span> <span class="op">{</span> <span class="kwd">return</span> macro <span class="kwd">for</span><span class="op">(</span> x <span class="kwd">in</span> <span class="number">0</span>...$eN <span class="op">)</span> $e; <span class="op">}</span></pre> <p>What <code>macro</code> does is to translate a Haxe expression into the corresponding AST enum, by also replacing all $-prefixed identifiers by the corresponding variable value.</p> <p>I guess this way will make Haxe macros much more easy to write and maintain !</p> <p>PS : we will make a 2.10 release of Haxe very soon, since we have many great things to share. This will be part of it.</p> Time For New Adventures http://ncannasse.fr/blog/time_for_new_adventures http://ncannasse.fr/blog/time_for_new_adventures Fri, 25 May 2012 16:02:36 +0200 Fri, 25 May 2012 16:02:36 +0200 Nicolas Cannasse Nicolas Cannasse <p>As announced on the Haxe mailing list, after more than 10 years I'll be leaving Motion-Twin in a few...</p> <p>As announced on the Haxe mailing list, after more than 10 years I'll be leaving Motion-Twin in a few months.</p> <p>This will not affect in any aspect my personal investment in Haxe or any part of the project, since most of the time spent in compiler development was already made on my spare/hobby time. I will also make sure that any future work that I do after that is mostly done in Haxe, since I don't feel much like writing in another language anymore.</p> <p>In order to have something very clean for Haxe perceptions for companies, I'll make sure that we create soon a Haxe Foundation (NonProfit) that will hold the rights on the code, trademark, host the website etc. Any help is welcome.</p> <p>I have not 100% decided yet what I will do next, although I have some serious paths I'm currently exploring. I might then be still open to proposals ;)</p> <p>Time for new adventures !</p>