simulation flag
This commit is contained in:
parent
e37b48d267
commit
c63d776cc7
8
.vscode/launch.json
vendored
8
.vscode/launch.json
vendored
@ -32,6 +32,14 @@
|
|||||||
"mainClass": "electrosphere.engine.Main",
|
"mainClass": "electrosphere.engine.Main",
|
||||||
"projectName": "Renderer",
|
"projectName": "Renderer",
|
||||||
"args" : "--headless"
|
"args" : "--headless"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "java",
|
||||||
|
"name": "Launch Simulation Only",
|
||||||
|
"request": "launch",
|
||||||
|
"mainClass": "electrosphere.engine.Main",
|
||||||
|
"projectName": "Renderer",
|
||||||
|
"args" : "--simulate"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -62,7 +62,6 @@ import electrosphere.renderer.ui.font.RawFontMap;
|
|||||||
import electrosphere.script.ScriptEngine;
|
import electrosphere.script.ScriptEngine;
|
||||||
import electrosphere.server.ai.AIManager;
|
import electrosphere.server.ai.AIManager;
|
||||||
import electrosphere.server.datacell.EntityDataCellMapper;
|
import electrosphere.server.datacell.EntityDataCellMapper;
|
||||||
import electrosphere.server.datacell.GriddedDataCellManager;
|
|
||||||
import electrosphere.server.datacell.RealmManager;
|
import electrosphere.server.datacell.RealmManager;
|
||||||
import electrosphere.server.db.DatabaseController;
|
import electrosphere.server.db.DatabaseController;
|
||||||
import electrosphere.server.pathfinding.NavMeshManager;
|
import electrosphere.server.pathfinding.NavMeshManager;
|
||||||
@ -247,6 +246,9 @@ public class Globals {
|
|||||||
public static MacroSimulation macroSimulation;
|
public static MacroSimulation macroSimulation;
|
||||||
public static MacroData macroData;
|
public static MacroData macroData;
|
||||||
|
|
||||||
|
//flag to only run a simulation without full client
|
||||||
|
public static boolean RUN_SIMULATION_ONLY = false;
|
||||||
|
|
||||||
//micro simulation
|
//micro simulation
|
||||||
public static MicroSimulation microSimulation;
|
public static MicroSimulation microSimulation;
|
||||||
|
|
||||||
|
|||||||
@ -14,13 +14,10 @@ import electrosphere.controls.ControlHandler;
|
|||||||
import electrosphere.engine.cli.CLIParser;
|
import electrosphere.engine.cli.CLIParser;
|
||||||
import electrosphere.engine.loadingthreads.LoadingThread;
|
import electrosphere.engine.loadingthreads.LoadingThread;
|
||||||
import electrosphere.game.config.UserSettings;
|
import electrosphere.game.config.UserSettings;
|
||||||
|
import electrosphere.game.server.world.MacroData;
|
||||||
import electrosphere.logger.LoggerInterface;
|
import electrosphere.logger.LoggerInterface;
|
||||||
import electrosphere.net.parser.net.message.TerrainMessage;
|
|
||||||
import electrosphere.net.parser.net.raw.NetworkParser;
|
|
||||||
import electrosphere.net.parser.util.ByteStreamUtils;
|
|
||||||
import electrosphere.renderer.Model;
|
|
||||||
import electrosphere.renderer.RenderingEngine;
|
import electrosphere.renderer.RenderingEngine;
|
||||||
import electrosphere.util.worldviewer.TerrainViewer;
|
import electrosphere.server.simulation.MacroSimulation;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -97,22 +94,21 @@ public class Main {
|
|||||||
|
|
||||||
//world gen testing
|
//world gen testing
|
||||||
//gen terrain
|
//gen terrain
|
||||||
// Globals.serverTerrainManager = new ServerTerrainManager(2000,50,100,0.0f,0);
|
if(Globals.RUN_SIMULATION_ONLY){
|
||||||
// Globals.serverTerrainManager.load();
|
//gen world
|
||||||
// Globals.serverWorldData = ServerWorldData.createGameWorld(Globals.serverTerrainManager);
|
Globals.macroData = MacroData.generateWorld(0);
|
||||||
// //gen world
|
Globals.macroData.describeWorld();
|
||||||
// Globals.macroData = MacroData.generateWorld(0);
|
boolean run = true;
|
||||||
// Globals.macroData.describeWorld();
|
Globals.macroSimulation = new MacroSimulation();
|
||||||
// boolean run = true;
|
while(run){
|
||||||
// Globals.macroSimulation = new MacroSimulation();
|
Globals.macroSimulation.simulate();
|
||||||
// while(run){
|
try {
|
||||||
// Globals.macroSimulation.simulate();
|
TimeUnit.MILLISECONDS.sleep(1000);
|
||||||
// try {
|
} catch (InterruptedException ex) {
|
||||||
// TimeUnit.MILLISECONDS.sleep(1000);
|
ex.printStackTrace();
|
||||||
// } catch (InterruptedException ex) {
|
}
|
||||||
// ex.printStackTrace();
|
}
|
||||||
// }
|
}
|
||||||
// }
|
|
||||||
|
|
||||||
// if(1==1){
|
// if(1==1){
|
||||||
// Globals.audioEngine = new AudioEngine();
|
// Globals.audioEngine = new AudioEngine();
|
||||||
|
|||||||
@ -17,6 +17,9 @@ public class CLIParser {
|
|||||||
Globals.RUN_SERVER = true;
|
Globals.RUN_SERVER = true;
|
||||||
Globals.HEADLESS = true;
|
Globals.HEADLESS = true;
|
||||||
} break;
|
} break;
|
||||||
|
case "--simulate": {
|
||||||
|
Globals.RUN_SIMULATION_ONLY = true;
|
||||||
|
} break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user