Cadet Engine Launch


Today we’re proud to announce the launch of CadetEngine, the engine behind CadetEditor. CadetEngine is an open source, component-based ActionScript3 scene engine, which has been designed from the ground up to be plug-and-play in order to support editability.

http://cadeteditor.github.io/

What’s special about CadetEngine? Unlike many other game engines available in Flash, CadetEngine is fully supported by an extensible editor tool, namely CadetEditor. Generally, building an editor for a custom game would be a task too large to contemplate on most indie game development timelines. However, when using CadetEngine, the process of editor creation is almost entirely automatic.

CadetEngine code is organised into Components, everything within the CadetScene (itself a component) must be a Component. Components tasked with displaying things are called Skins, Components tasked with executing custom code are named Behaviours or Processes, depending on whether they’re local to an entity or scene-wide.

In order to demonstrate how games can be built in CadetEngine, we’ve ported the open source HungryHero game from the original AIR gaming SDK. The CadetEngine version can be found here. We’ve tried to keep the code as similar to the original as possible to make things easier to understand, but the main difference is that the code has been organised into Cadet Components.

The key trick to getting your custom code to play well with the editor is using the [Serializable] and [Inspectable] metadata tags. [Serializable] means that the Serializer will store the state of this property when saving the scene to XML, [Inspectable] means that the editor’s property inspector will provide an editor for the property. Take the following code example from hungryHero.components.behaviours.ParallaxBehaviour:

[Serializable][Inspectable( editor="Slider", min="0", max="1", snapInterval="0.05" )]
public function set depth( value:Number ):void
{
	_depth = value;
}
public function get depth():Number { return _depth; }

[Serializable][Inspectable]
public function set speed( value:Number ):void
{
	_speed = value;
}
public function get speed():Number { return _speed; }

The inclusion of the [Inspectable] metadata above causes the editor to display the following interface in the properties inspector when the ParallaxBehaviour Component is selected. The inclusion of the [Serializable] metadata ensures that the state of these properties will be saved when the user saves the scene.

properties

Hopefully that gives a reasonably quick overview of how to build editable games with CadetEngine, please check the website and the wiki for more videos and tutorials. We hope this helps you with your game projects! 🙂

Advertisements
This entry was posted in Misc. Bookmark the permalink.

4 Responses to Cadet Engine Launch

  1. Joaquín says:

    Excellent work! I´m going to try it right now.

  2. Emile Jobity says:

    looks interestin. been looking for an awesome 2d game engine with an easy to use editor.

  3. Emile Jobity says:

    looks cool. been looking for an easy to use 2d game engine with an awesome game editor. and the list is limited. would love to give this a try. thanks.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s