May 2021
Mo Tu We Th Fr Sa Su
<< >>


Getting Rid of Flash ?

Posted on Dec 22 2012

In the past months and especially the past weeks I've been working on the H3D/H2D library which is available on github here :

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 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.

Here's a quick example that shows the result (model is made by Shiro Games for our upcoming game Evoland).


But more often you want also to use the same engine to display 2D sprites so I have added the h2d package that provides a full scene with 2D objects : Bitmaps, but also Tile groups, Text, etc.

I've actually built by last LudumDare Compo entry Small Theft Auto using h2d, and you can get the sources for it.


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.

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.

But the best part about h3d and h2d 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.

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.

It brings out the real usefulness of Haxe which is platform neutrality and developer freedom.

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.

Just wanted to bring the word out and hope people are as exited about it as I am !

  • Dec 22, 2012 at 16:55

    Great work on this Nicolas, can't wait to see Evoland and other Shiro projects. Always enjoy your work.

  • Dec 22, 2012 at 17:40

    Typo: "on a the H3D/H2D".

  • Dec 22, 2012 at 19:20

    My thoughts exactly about the Flash API. It's exciting to see new engines that aren't just ports, and take full advantage of Haxe and GPU features. I'm working on a similar project, Flambe.

    When are you planning to put hxsl2 on haxelib? :)

  • Dec 22, 2012 at 20:46

    I'm excited about this. Right now the only game in town for browser-based 3d seems to be Three.js. It would be nice to have an engine capable of targeting Flash when it's needed, WebGL and OpenGL when they are available.

  • Dec 22, 2012 at 20:58

    Nice stuff. As a developer of a multi-platform 3d engine myself ( ) i know of the challenges, but advantages as well. i really like haxe so this is good to see.

  • Dec 22, 2012 at 21:02

    @Bruno : since it requires Haxe SVN, it will have to wait for Haxe 3 RC ;)

  • Dec 22, 2012 at 21:05

    Note that WebGL isn't just a "flash replacement". It offers a host of features above and beyond flashs capabilities in terms of 3D graphics. You can of course ignore those features and write code for the lowest common denominator API, which is fine. But you should know that you're forgoing some tasty stuff if you do.

  • Dec 22, 2012 at 23:36

    Amazing news, Nicolas. That's very exciting, keep up the great work!

  • Franky
    Dec 22, 2012 at 23:41

    Mind. Blown.

  • Dec 23, 2012 at 10:55

    That's huge news!

    For some reason there's a slow down in the demonstration on my computer every 3 seconds. FPS drops down to 30 for 2 seconds. (Intel i7, HD3000)

    May be some Garbage collection?

  • Chris
    Dec 24, 2012 at 01:45

    Wow, that will be GPU everywhere, what an exciting time to be learning Haxe! Thanks Nicolas

  • Dec 24, 2012 at 03:29

    Awesome, looking great. I guess it's a good sign there are lots of different frameworks that are being worked on, though it does make it confusing to know which one to start with.

    Really makes it look even more stupid that Adobe is charging for "speed". They're really just scaring people away :(

  • Dec 24, 2012 at 07:31

    This is the project that will lead open source game development!

  • Jan 02, 2013 at 17:46

    Just for info, the FPS drop I experienced was due to Google Chrome's pepperflashplayer which doesn't work that well yet…

  • designerzen
    Jan 02, 2013 at 20:12

    This is superb! Really hope you can figure out a way to integrate it with Jeash. I may well refactor a 3D project I was working on in Away to use this so I can put it on more devices. It's a solar system simulator with cosmology / cosmonographic star generation, so it is a balancing act between visuals and physics and your engine should alleviate some of these headaches and hopefully improve performance for mobile devices! Thanks and happy new year!

  • tgorkin
    Feb 04, 2013 at 06:47

    Very nice job and thanks for sharing both this and hxsl!

    Curious, what version of Haxe are you using to develop these libraries? The code doesn't compile for me in Haxe 2.10 due to wildcards in the import statement in Test.hx (evidently these aren't supported until Haxe 3 - I've been struggling to get this and your hxsl samples to run and wondering if you could share Haxe version/dependencies.

  • April
    Mar 16, 2013 at 06:24

    That's a super gorgeous bride, I'll definitely come back to see the rest.

  • Rania
    Jan 08, 2018 at 08:29

    good job....
    pls visit my site :

Name : Email : Website : Message :