Merge branch 'marchingCubesTerrain' of ssh://git.austinwhoover.com:222/electrosphere/Renderer into marchingCubesTerrain
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit

This commit is contained in:
austin 2023-11-05 10:10:41 -05:00
commit 4506964edd
4 changed files with 24 additions and 26 deletions

4
.vscode/launch.json vendored
View File

@ -35,11 +35,11 @@
},
{
"type": "java",
"name": "Launch Main (Macro Simulate)",
"name": "Launch Simulation Only",
"request": "launch",
"mainClass": "electrosphere.engine.Main",
"projectName": "Renderer",
"args" : "--macro-simulate"
"args" : "--simulate"
}
]
}

View File

@ -61,7 +61,6 @@ import electrosphere.renderer.ui.font.RawFontMap;
import electrosphere.script.ScriptEngine;
import electrosphere.server.ai.AIManager;
import electrosphere.server.datacell.EntityDataCellMapper;
import electrosphere.server.datacell.GriddedDataCellManager;
import electrosphere.server.datacell.RealmManager;
import electrosphere.server.db.DatabaseController;
import electrosphere.server.pathfinding.NavMeshManager;
@ -245,6 +244,9 @@ public class Globals {
//macro simulation
public static MacroSimulation macroSimulation;
public static MacroData macroData;
//flag to only run a simulation without full client
public static boolean RUN_SIMULATION_ONLY = false;
//micro simulation
public static MicroSimulation microSimulation;

View File

@ -14,13 +14,10 @@ import electrosphere.controls.ControlHandler;
import electrosphere.engine.cli.CLIParser;
import electrosphere.engine.loadingthreads.LoadingThread;
import electrosphere.game.config.UserSettings;
import electrosphere.game.server.world.MacroData;
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.util.worldviewer.TerrainViewer;
import electrosphere.server.simulation.MacroSimulation;
@ -97,22 +94,21 @@ public class Main {
//world gen testing
//gen terrain
// Globals.serverTerrainManager = new ServerTerrainManager(2000,50,100,0.0f,0);
// Globals.serverTerrainManager.load();
// Globals.serverWorldData = ServerWorldData.createGameWorld(Globals.serverTerrainManager);
// //gen world
// Globals.macroData = MacroData.generateWorld(0);
// Globals.macroData.describeWorld();
// boolean run = true;
// Globals.macroSimulation = new MacroSimulation();
// while(run){
// Globals.macroSimulation.simulate();
// try {
// TimeUnit.MILLISECONDS.sleep(1000);
// } catch (InterruptedException ex) {
// ex.printStackTrace();
// }
// }
if(Globals.RUN_SIMULATION_ONLY){
//gen world
Globals.macroData = MacroData.generateWorld(0);
Globals.macroData.describeWorld();
boolean run = true;
Globals.macroSimulation = new MacroSimulation();
while(run){
Globals.macroSimulation.simulate();
try {
TimeUnit.MILLISECONDS.sleep(1000);
} catch (InterruptedException ex) {
ex.printStackTrace();
}
}
}
// if(1==1){
// Globals.audioEngine = new AudioEngine();

View File

@ -17,8 +17,8 @@ public class CLIParser {
Globals.RUN_SERVER = true;
Globals.HEADLESS = true;
} break;
case "--macro-simulate": {
//TODO: macro simulate
case "--simulate": {
Globals.RUN_SIMULATION_ONLY = true;
} break;
}
}