Skip to content

Instantly share code, notes, and snippets.

@turlockmike
Last active November 17, 2017 07:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save turlockmike/fbd7e1470460473c193b8b7e2a793b12 to your computer and use it in GitHub Desktop.
Save turlockmike/fbd7e1470460473c193b8b7e2a793b12 to your computer and use it in GitHub Desktop.
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