Firmament Engine Home

Firmament is an open-source, 2 dimensional game engine developed for the easy creation of video games. It is currently under heavy development, so its feature list is constantly expanding. Its main features are:

  • Robust 2D physics engine for realistic 2-dimensional simulations. Make physics-based games like ‘Angry Birds’ with ease!
  • Easy game creation using full-featured API.
  • Haxe NME based - runs on virtually any platform - Flash, PC, Mac, iOS, android, HTM5, and more
  • Open source - Firmament is licensed under the GPL version 3. Download the engine and use it in your open source project for free.
Get started in 10 minutes or less

Firmament is really easy to set up and get running on.

Check out the Installation guide and then the Creating a new project guide to get started now.

Once you're done with those guides, check out the Firmament Manual for more tutorials and references.

 

News

New FConfig class!

Until now, Firmament has used dynamic {} objects for storing and passing around configuration data. This worked, but validating data and handling default values was manual and a pain. To help with this, I created the FConfigHelper class, which would wrap these objects and give you methods for validating etc. However, to keep backwards compatibility, you had to instantiate these helpers on your own. But now, thanks to Haxe's abstract types, we can have all the functionality of FConfigHelpers automatically and with complete forwards and backwards compatibility with the old {} type configs!

Now, FDataLoader returns FConfig objects, instead of Dynamic type {} objects. These FConfig objects can be be implicitly cast between dynamic {} objects and FConfig objects so no backwards compatibility should be broken. You can still use the Reflect methods to read them, but now if you accept the config object as type FConfig, you have access to FConfig's methods, like get:

//Returns the field with name field, validating it has a type of type. If it's not set, returns default.
get(field:String,?type:Dynamic=null,?def:Dynamic=null)

You can also use array-access, though no validation is done when using array access:

class MyComponent extends FEntityComponent  {
	var _myVar:Float;
	public function new(){
		super();
	}
	override public function init(config:FConfig){
		_myVar = config.get("myVar",Float,0);
		//Same, but without validation or default:
		_myvar = config["myVar"];
		//can also write with array access:
		config["myVar"] = 2.5;
	}
}

 

 

I am now pleased to announce that Firmament is up and running with Haxe 3 and openFL support!

Because NME is for Haxe 2, and openFL is for haxe 3, the decision has been made that all future major releases will be released for Haxe3, and haxe 2 support will only contain minor bug fixes going forward.

Also, because the Haxe version of Firmament has become the defacto version of the Firmament engine, I have decided to put the haxe 3 version in a completely new git repository, simply called 'Firmament' (as opposed to 'Firmament.hx', which will remain the haxe 2 version.

The new repository with Haxe 3 support can be found here: https://github.com/martamius/Firmament

A few notes regarding the new Haxe 3 version:

  • There appears to be a bug in the flash target's implementation of drawTiles regarding rotation. This may cause entities to be rendered at the wrong angle when targetting flash. If this isn't fixed in openFL soon, I will create workarounds. CPP targets do not seem to have this bug.
  • Firmament is no longer shipping with a modified version of Box2d. Instead, it simply requires the haxelib box2d package.
  • We are now using TJSON for both parsing and encoding of JSON.
  • Firmament is not yet available on the new Haxe 3 haxelib. I am working on this and will get it up soon. There are some complications with running the editor from the command line that need to be worked out.
New Website

Once again, I have decided to move Firmament's website location. I have ditched the github pages setup, for this confluence wiki setup after evaluating both for a while. 

Confluence is just a lot more convenient with it's wysiwyg editor (which is pretty amazing by the way) so makes posting news posts a lot easier. The real thing that sold me however was the wiki for documentation. Here I can write Firmament's documentation in a nice, organized, easy to use format.

Another nice perk is Atlassian gave me an unlimited license to Confluence and JIRA for free. I have also moved Firmament's issues over to Jira.

I've already added a few 'getting started' guides. Just take a look at them in the Guides and Tutorials section on the left. 

 

Version 2.0 Released!

Firmament 2.0 has finally been released! Version 2.0 brings many large changes to the APIs, making the engine more flixbile, but also more easy to use at the same time.

  • Entity Component Dependency Injection System - The entity system has been completely overhauled with an extremely powerful component sysyem to allow you to customize the behavior of entities by attaching simple component objects to them.
  • Tilesheet Animation System - Create animations to your hearts content without sacrificing performance with the flexible new built-in animation system.
  • Entity Tweening
  • Fully updated map editor
  • Lots of generic components for working with and responding to events
  • Parallaxing - Can now create great scrolling effects with parallaxing
  • Scenes - Define entire scenes (cameras, maps, etc) in JSON config files.
  • Tilesheet render priorities - specify which tilesheet entities should display above others,etc.
  • Entity query system - Query all worlds for entities of a certain type, and/or in a certain location, etc.
  • NoPhysics - A new world and physics component type for entities that may move or rotate, but don’t have any collision detection. This should be used for entities that don’t need collisions so we can skip a lot of the weight from the physics engine.
  • Fully functional wireframe renderer
  • Box2d Joints - Connect multiple entities together using joints!
  • Fully functional Texture Mapper plugin for automatic generation of tilesheet .json files
  • Full API documentation

And many many more changes and bug fixes! Check out the github page for details on all the changes.

Download Firmament Version 2 today and start making some great games!