Playing with Citrus, Cadet Editor 3D and AwayPhysics

Exactly a month ago I showed you the new Citrus engine which now supports Away3D. On the other hand, Away3D supports its own Physics engine called awayphysics, and I showed an example of what you can do with with a quick 3D physics with Away3D 4.1 and Bullet Physics Engine demonstration.

Aymeric Lamboley, the mind (and fingers) behind the Citrus Engine, pushed the thing further and gave me the permission to publish his way to quickly generate 3D physics scenes with Citrus Engine and Away3D + awayphysics.

« Now that 3D views and physics are supported, it’s time to give a look on which tool we can use as a 3D game Level Editor. At first, I thought to Prefab. This is the best tool to create a scene with Away3D, importing assets, add lights… But too complex for a simple level design, I mean : hey the Citrus Engine is not a concurrent to Unity3D (which I started to learn thanks to this awesome tutorial). Its 3D physics part is just here to create basic 3D game / puzzle. Also the level editor has to support object creation (physics object), this isn’t obvious with Prefab.
Then I gave a look to Cadet Editor, the 3D editor is very easy to handle. You can create quickly sphere, cube and plane objects, add lights… That’s the right tool to see what can be done!

I really enjoy the design of Cadet Editor, however it should manage right click with camera rotation instead of displaying a simple menu with a link to Away3D.
In Cadet3D project are saved into a format close to MXML. See our examples and its code:

This format isn’t easy to handle! Cadet should really export to XML or JSON format.
Anyway this what I’ve done:

You can remove the AwayPhysics debug view via the console:

set awayPhysics visible false

As usual all the source code is available on the GitHub.

This is the GameState:

Like Flash as Level Editor or Tiled Map Editor, we use the ObjectMaker class. This is the template for Cadet Editor 3D:

As you can notice, the object maker uses CE prebuilt objects for AwayPhysics but not in a dynamic way.

This is some points that Cadet Editor should allow to be an excellent level editor :
– quickly most of the points are in Tiled Map Editor, checkout Citrus Engine support there.
– an easy to parse exporter format (xml or json).
– adding personal properties so we can precize type, gravity, view for example directly in the level editor. A must have! »

Follow Aymeric Lamboley blog for the latest news.