var Game = {
    map: null,
    maps: [],
    lastMapId: null,

    initialize: function () {
        Canvas.initialize();
        Keyboard.bind();
    },

    start: function () {
        Canvas.$canvas.hide();

        // Clear out the persistent map cache so the entire game world is reset.
        this.maps = [];
        this.lastMapId = null;

        // Generate the backstory for this game session randomly.
        // This will generate the characters, where they were, what they did, what they know, etc.
        Story.generateStory();

        // Show the intro text (nametag / time)
        IntroText.run(function (e) {
            // Load up the main hall / living room and spawn the guests in the living room.
            this.loadMap('main_room', function (map) {
                e.done();

                Story.spawnGuests(map);

                Music.loopSound('rain_loop.mp3');

                map.runScript(scrWalkIn);
            });
        }.bind(this));


    },

    resetting: false,

    reset: function (callback) {
        if (callback == null) {
            callback = function() { };
        }

        if (this.resetting) {
            return;
        }

        this.resetting = true;

        Dialogue.hide();
        $('#hud').hide();

        if (this.map != null) {
            this.map.pause();
        }

        var completeReset = function() {
            this.map = null;
            this.start();
            this.resetting = false;
        }.bind(this);

        Canvas.$canvas.fadeOut(3000, function() {
            Music.stopAll();
            window.setTimeout(completeReset, 1000);
        });
    },

    loadMap: function (id, loadCallback) {
        if (loadCallback == null) {
            loadCallback = function () { };
        }

        var mapReady = function () {
            loadCallback(this.map);

            Canvas.$canvas.fadeIn(this.lastMapId == null ? 2000 : 'fast');
            this.lastMapId = id;

            Camera.onMapLoaded();

            $('#location').text(this.map.data.properties.name);
        }.bind(this);

        var execLoad = function() {
            if (typeof this.maps[id] == 'undefined') {
                this.map = new Map();
                this.maps[id] = this.map;
                this.map.load(id, function (okay) {
                    if (!okay) {
                        alert('Something went wrong, could not load the next part of the game. Sorry... we let you down.');
                        return;
                    }

                    if (!this.map.paused) {
                        $('#hud').show();
                    }

                    mapReady();
                }.bind(this));
            } else {
                this.map = this.maps[id];
                this.map.redeploy();
                mapReady();
            }
        }.bind(this);

        if (!Canvas.$canvas.is(':visible')) {
            execLoad();
        } else {
            Canvas.$canvas.fadeOut('fast', execLoad);
        }
    },

    draw: function (ctx) {
        if (this.map != null) {
            this.map.draw(ctx);
        }
    },

    update: function () {
        if (this.map != null) {
            this.map.update();
        }

        Dialogue.update();
        Keyboard.update();
        Camera.update();
    }
};
@@ -55,16 +55,38 @@
 d: null,
+%0A    resetting: false,
 %0A%0A    in
@@ -220,32 +220,82 @@
 canvas.hide();%0A%0A
+        console.info('%5BGame%5D Starting game...');%0A%0A
         // Clear
@@ -430,264 +430,76 @@
  // 
-Generate the backstory for this game session randomly.%0A        // This will generate the characters, where they were, what they did, what they know, etc.%0A        Story.generateStory();%0A%0A        // Show the intro text (nametag / time)%0A        IntroText.run(
+TODO Load up the map and set up the environment.%0A    %7D,%0A%0A    reset: 
 func
@@ -504,17 +504,24 @@
 nction (
-e
+callback
 ) %7B%0A    
@@ -528,412 +528,60 @@
     
-   
- // Load up the main hall / living room and spawn the guests in the living room.%0A            this.loadMap('main_room', function (map) %7B%0A                e.done();%0A%0A                Story.spawnGuests(map);%0A%0A                Music.loopSound('rain_loop.mp3');%0A%0A                map.runScript(scrWalkIn);%0A            %7D);%0A        %7D.bind(this));%0A%0A%0A    %7D,%0A%0A    resetting: false,%0A%0A    reset: function (callback) %7B
+if (this.resetting) %7B%0A            return;%0A        %7D%0A
 %0A   
@@ -671,59 +671,49 @@
     
-if (this.resetting) %7B%0A            return;%0A        %7D
+console.info('%5BGame%5D Resetting game...');
 %0A%0A  
@@ -1527,73 +1527,8 @@
 d();
-%0A%0A            $('#location').text(this.map.data.properties.name);
 %0A   
@@ -1901,34 +1901,8 @@
 ame.
- Sorry... we let you down.
 ');%0A

Remove old, game-specific code.