+ Run(app);
+}
+
+void Runtime::RunServer() {
+ HeadlessEnvironment env(config.asset_path);
+
+ WorldSave save(config.save_path + config.world_name + '/');
+ if (save.Exists()) {
+ save.Read(config.world);
+ } else {
+ save.Write(config.world);
+ }
+
+ HeadlessApplication app(env);
+ ServerState server_state(env, config.world, save, config.server);
+ app.PushState(&server_state);
+ Run(app);
+}
+
+void Runtime::RunClient() {
+ Init init(config.doublebuf, config.multisampling);
+
+ Environment env(init.window, config.asset_path);
+ env.viewport.VSync(config.vsync);
+
+ WorldSave save(config.save_path + config.world_name + '/');
+ if (save.Exists()) {
+ save.Read(config.world);
+ } else {
+ save.Write(config.world);
+ }