diff --git a/lib/Server/HttpServer.js b/app/bootstrap/HttpServer.js similarity index 100% rename from lib/Server/HttpServer.js rename to app/bootstrap/HttpServer.js diff --git a/lib/Server/Socket.js b/app/bootstrap/Socket.js similarity index 100% rename from lib/Server/Socket.js rename to app/bootstrap/Socket.js diff --git a/client.js b/app/bootstrap/client.js similarity index 100% rename from client.js rename to app/bootstrap/client.js diff --git a/server.js b/app/bootstrap/server.js similarity index 100% rename from server.js rename to app/bootstrap/server.js diff --git a/lib/Chuck/Collision/Detector.js b/app/game/Client/Collision/Detector.js similarity index 100% rename from lib/Chuck/Collision/Detector.js rename to app/game/Client/Collision/Detector.js diff --git a/lib/Chuck/Control/Key.js b/app/game/Client/Control/Key.js similarity index 100% rename from lib/Chuck/Control/Key.js rename to app/game/Client/Control/Key.js diff --git a/lib/Chuck/Control/InputControlUnit.js b/app/game/Client/Control/KeyboardController.js similarity index 100% rename from lib/Chuck/Control/InputControlUnit.js rename to app/game/Client/Control/KeyboardController.js diff --git a/lib/Chuck/Control/KeyboardInput.js b/app/game/Client/Control/KeyboardInput.js similarity index 100% rename from lib/Chuck/Control/KeyboardInput.js rename to app/game/Client/Control/KeyboardInput.js diff --git a/lib/Chuck/Processors/ClientProcessor.js b/app/game/Client/GameController.js similarity index 100% rename from lib/Chuck/Processors/ClientProcessor.js rename to app/game/Client/GameController.js diff --git a/lib/Client/Networker.js b/app/game/Client/Networker.js similarity index 100% rename from lib/Client/Networker.js rename to app/game/Client/Networker.js diff --git a/lib/Chuck/View/CameraController.js b/app/game/Client/View/CameraController.js similarity index 100% rename from lib/Chuck/View/CameraController.js rename to app/game/Client/View/CameraController.js diff --git a/lib/Client/Dom.js b/app/game/Client/View/DomController.js similarity index 100% rename from lib/Client/Dom.js rename to app/game/Client/View/DomController.js diff --git a/lib/Chuck/View/ViewController.js b/app/game/Client/View/ViewController.js similarity index 100% rename from lib/Chuck/View/ViewController.js rename to app/game/Client/View/ViewController.js diff --git a/lib/Chuck/Settings.js b/app/game/Config/Settings.js similarity index 100% rename from lib/Chuck/Settings.js rename to app/game/Config/Settings.js diff --git a/app/game/Core/Collision/Detector.js b/app/game/Core/Collision/Detector.js new file mode 100644 index 0000000..e69de29 diff --git a/lib/Chuck/Control/InputController.js b/app/game/Core/Control/InputController.js similarity index 100% rename from lib/Chuck/Control/InputController.js rename to app/game/Core/Control/InputController.js diff --git a/app/game/Core/GameController.js b/app/game/Core/GameController.js new file mode 100644 index 0000000..e69de29 diff --git a/lib/Chuck/Loader/Level.js b/app/game/Core/Loader/Level.js similarity index 100% rename from lib/Chuck/Loader/Level.js rename to app/game/Core/Loader/Level.js diff --git a/lib/Chuck/Physics/Doll.js b/app/game/Core/Physics/Doll.js similarity index 100% rename from lib/Chuck/Physics/Doll.js rename to app/game/Core/Physics/Doll.js diff --git a/lib/Chuck/Physics/Engine.js b/app/game/Core/Physics/Engine.js similarity index 100% rename from lib/Chuck/Physics/Engine.js rename to app/game/Core/Physics/Engine.js diff --git a/lib/Chuck/Player.js b/app/game/Core/Player.js similarity index 100% rename from lib/Chuck/Player.js rename to app/game/Core/Player.js diff --git a/lib/Protocol/Helper.js b/app/game/Core/Protocol/Helper.js similarity index 100% rename from lib/Protocol/Helper.js rename to app/game/Core/Protocol/Helper.js diff --git a/lib/Protocol/Parser.js b/app/game/Core/Protocol/Parser.js similarity index 100% rename from lib/Protocol/Parser.js rename to app/game/Core/Protocol/Parser.js diff --git a/lib/Server/Channel.js b/app/game/Server/Channel.js similarity index 100% rename from lib/Server/Channel.js rename to app/game/Server/Channel.js diff --git a/app/game/Server/Collision/Detector.js b/app/game/Server/Collision/Detector.js new file mode 100644 index 0000000..e69de29 diff --git a/lib/Chuck/Processors/ServerProcessor.js b/app/game/Server/GameController.js similarity index 100% rename from lib/Chuck/Processors/ServerProcessor.js rename to app/game/Server/GameController.js diff --git a/lib/Server/NotificationCenter.js b/app/game/Server/NotificationCenter.js similarity index 100% rename from lib/Server/NotificationCenter.js rename to app/game/Server/NotificationCenter.js diff --git a/lib/Server/User.js b/app/game/Server/User.js similarity index 100% rename from lib/Server/User.js rename to app/game/Server/User.js diff --git a/lib/Vendor/Box2D.js b/app/lib/Box2D.js similarity index 100% rename from lib/Vendor/Box2D.js rename to app/lib/Box2D.js diff --git a/lib/Vendor/SocketIO.js b/app/lib/SocketIO.js similarity index 100% rename from lib/Vendor/SocketIO.js rename to app/lib/SocketIO.js diff --git a/lib/Vendor/Three.js b/app/lib/Three.js similarity index 100% rename from lib/Vendor/Three.js rename to app/lib/Three.js diff --git a/lib/Vendor/Three/Three.js b/app/lib/Three/Three.js similarity index 100% rename from lib/Vendor/Three/Three.js rename to app/lib/Three/Three.js diff --git a/lib/RequestAnimationFrame.js b/app/lib/Utilities/RequestAnimFrame.js similarity index 100% rename from lib/RequestAnimationFrame.js rename to app/lib/Utilities/RequestAnimFrame.js diff --git a/lib/Server/Coordinator.js b/app/lobby/Coordinator.js similarity index 100% rename from lib/Server/Coordinator.js rename to app/lobby/Coordinator.js diff --git a/lib/Chuck/ClientGame.js b/lib/Chuck/ClientGame.js deleted file mode 100644 index 91c0f16..0000000 --- a/lib/Chuck/ClientGame.js +++ /dev/null @@ -1,38 +0,0 @@ -define(["Chuck/Processors/ClientProcessor"], function(ClientProcessor) { - - function ClientGame(networker, id) { - this.networker = networker; - this.clientProcessor = new ClientProcessor(this); - this.clientProcessor.spawnMeWithId(id); - - this.players = {}; - } - - ClientGame.prototype.loadLevel = function(path) { - this.clientProcessor.loadLevel(path); - } - - ClientGame.prototype.userJoined = function(userId) { - this.players[userId] = this.clientProcessor.spawnNewPlayerWithId(userId); - } - - ClientGame.prototype.userLeft = function(userId) { - var player = this.players[userId]; - player.destroy(); - delete this.players[userId]; - } - - ClientGame.prototype.processGameCommand = function(command, options){ - this.clientProcessor.processGameCommand(command, options); - } - - ClientGame.prototype.sendGameCommand = function(command, options) { - this.networker.sendGameCommand(command, options); - } - - ClientGame.prototype.destruct = function(){ - this.clientProcessor.destruct(); - } - - return ClientGame; -}); \ No newline at end of file diff --git a/lib/Chuck/Constants.js b/lib/Chuck/Constants.js deleted file mode 100644 index f10054f..0000000 --- a/lib/Chuck/Constants.js +++ /dev/null @@ -1,9 +0,0 @@ -define({ - COLLISION_IDENTIFIER_PLAYER: 'player', - COLLISION_IDENTIFIER_PLAYER_HEAD: 'head', - COLLISION_IDENTIFIER_PLAYER_CHEST: 'chest', - COLLISION_IDENTIFIER_PLAYER_LEGS: 'legs', - COLLISION_IDENTIFIER_PLAYER_FOOT_SENSOR: 'footsensor', - - COLLISION_IDENTIFIER_TILE: 'tile' -}); \ No newline at end of file diff --git a/lib/Chuck/Server.js b/lib/Chuck/Server.js deleted file mode 100644 index 9306fdb..0000000 --- a/lib/Chuck/Server.js +++ /dev/null @@ -1 +0,0 @@ -Server.js \ No newline at end of file diff --git a/lib/Chuck/ServerGame.js b/lib/Chuck/ServerGame.js deleted file mode 100644 index f57ab65..0000000 --- a/lib/Chuck/ServerGame.js +++ /dev/null @@ -1,33 +0,0 @@ -define(["Chuck/Processors/ServerProcessor"], function(ServerProcessor) { - - function ServerGame(channel) { - this.channel = channel; - this.serverProcessor = this.factory.new(ServerProcessor, this); - } - - ServerGame.prototype.loadLevel = function(path) { - this.serverProcessor.loadLevel(path); - } - - ServerGame.prototype.progressGameCommandFromUser = function(command, options, user) { - this.serverProcessor.progressGameCommandFromId(command, options, user.id); - } - - ServerGame.prototype.destruct = function() { - this.serverProcessor.destruct(); - } - - ServerGame.prototype.createPlayerForUser = function(user) { - this.serverProcessor.createPlayerWithId(user.id); - } - - ServerGame.prototype.userIdLeft = function(userId) { - this.serverProcessor.userIdLeft(userId); - }; - - ServerGame.prototype.updateClientsWorld = function(update_world) { - this.channel.sendCommandToAllUsers('gameCommand', {worldUpdate: update_world}); - } - - return ServerGame; -}); \ No newline at end of file diff --git a/lib/Server/Factory.js b/lib/Server/Factory.js deleted file mode 100644 index 36ebc84..0000000 --- a/lib/Server/Factory.js +++ /dev/null @@ -1,29 +0,0 @@ -define(['Server/NotificationCenter'], function(NotificationCenter) { - - function Factory() { - this.notificationCenter = new NotificationCenter(); - } - - Factory.prototype.new = function (constructor /*, arg1, arg2, ... */) { - - if (arguments.length < 1) - throw 'Too fiew arguments'; - if (typeof arguments[0] != 'function') - throw arguments[0] + ' is not a function'; - - var instance = Object.create(constructor.prototype, { - notificationCenter: { - value: this.notificationCenter - }, - factory: { - value: this - } - }); - - constructor.apply(instance, Array.prototype.slice.call(arguments, 1)); - return instance; - } - - return Factory; - -}); \ No newline at end of file diff --git a/lib/Vendor/.DS_Store b/lib/Vendor/.DS_Store deleted file mode 100644 index 5008ddf..0000000 Binary files a/lib/Vendor/.DS_Store and /dev/null differ