load(levelId, options) {
		options = Object.assign(
			{
				container: game.world,
				onLoaded: game.onLevelLoaded,
				flatten: game.mergeGroup,
				setViewportBounds: true,
			},
			options || {},
		);

		// throw an exception if not existing
		if (typeof levels[levelId] === "undefined") {
			throw new Error("level " + levelId + " not found");
		}

		if (levels[levelId] instanceof TMXTileMap) {
			// check the status of the state mngr
			const wasRunning = state.isRunning();

			if (wasRunning) {
				// stop the game loop to avoid
				// some silly side effects
				state.stop();

				setTimeout(() => {
					safeLoadLevel(levelId, options, true);
				});
			} else {
				safeLoadLevel(levelId, options);
			}
		} else {
			throw new Error("no level loader defined");
		}
		return true;
	}
load a level into the game manager<br>
(will also create all level defined entities, etc..)
@name load
@memberof level
@public
@param {string} levelId - level id
@param {object} [options] - additional optional parameters
@param {Container} [options.container=game.world] - container in which to load the specified level
@param {Function} [options.onLoaded=game.onLevelLoaded] - callback for when the level is fully loaded
@param {boolean} [options.flatten=game.mergeGroup] - if true, flatten all objects into the given container
@param {boolean} [options.setViewportBounds=true] - if true, set the viewport bounds to the map size
@returns {boolean} true if the level was successfully loaded
@example
// the game assets to be be preloaded
// TMX maps
let resources = [
    {name: "a4_level1",   type: "tmx",   src: "data/level/a4_level1.tmx"},
    {name: "a4_level2",   type: "tmx",   src: "data/level/a4_level2.tmx"},
    {name: "a4_level3",   type: "tmx",   src: "data/level/a4_level3.tmx"},
    // ...
];

// ...

// load a level into the game world
me.level.load("a4_level1");
...
...
// load a level into a specific container
let levelContainer = new me.Container();
me.level.load("a4_level2", {container:levelContainer});
// add a simple transformation
levelContainer.currentTransform.translate(levelContainer.width / 2, levelContainer.height / 2 );
levelContainer.currentTransform.rotate(0.05);
levelContainer.currentTransform.translate(-levelContainer.width / 2, -levelContainer.height / 2 );
// add it to the game world
me.game.world.addChild(levelContainer);