Last active
November 17, 2017 07:28
-
-
Save turlockmike/fbd7e1470460473c193b8b7e2a793b12 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var GAME_CONFIG = {debugMode: false}; //Put some stuff here | |
var GRAPHICS_CONFIG = {width: 680, height: 400}; | |
var GAME_DATA_FOLDER = "/game_data"; | |
function main() { | |
//Initialize Components | |
Game game = new Game(GAME_CONFIG); | |
GraphicsEngine engine = new SDLGraphicsEngine(GRAPHICS_CONFIG); | |
GameData assets = new GameData(GAME_DATA_FOLDER); | |
assets.load(); | |
game.setEngine(engine); | |
game.addAssets(assets); | |
try { | |
game.start(); | |
} catch(Exception e) { | |
//Report uncaught exceptions | |
} | |
//Deregister Components, close files, etc. | |
engine.close(); | |
assets.unload(); | |
game.close(); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment