MB Dev Notes added to critical classes.

This commit is contained in:
2024-04-26 08:09:07 -04:00
parent 7d6407fbf5
commit 67bc13dcde
6 changed files with 91 additions and 67 deletions
+13 -8
View File
@@ -24,10 +24,16 @@ import java.time.Duration;
import java.time.Instant;
import java.util.Collection;
/*
* This class contains all methods necessary to drive periodic
* updates of the game simulation from the main _exec loop.
*/
// MB Dev Notes:
//
// Class models timers that drive Magicbane simulation ticks used
// for movement updates, triggers and more. Eventually we hope to
// refactor to more of a traditional simulation appropriate for a
// mmo with a transform class and other bells and whistles.
//
// Do as little as possible in here. For any tick you do not want
// deltaTime to approach 1.0f.
public enum SimulationManager {
SERVERHEARTBEAT;
@@ -35,15 +41,14 @@ public enum SimulationManager {
private static final long CITY_PULSE = 2000;
private static final long RUNEGATE_PULSE = 3000;
private static final long UPDATE_PULSE = 1000;
private static final long FlIGHT_PULSE = 100;
private static final long FLIGHT_PULSE = 100;
public static Duration executionTime = Duration.ofNanos(1);
public static Duration executionMax = Duration.ofNanos(1);
private static SimulationManager instance = null;
private long _cityPulseTime = System.currentTimeMillis() + CITY_PULSE;
private long _runegatePulseTime = System.currentTimeMillis()
+ RUNEGATE_PULSE;
private long _updatePulseTime = System.currentTimeMillis() + UPDATE_PULSE;
private long _flightPulseTime = System.currentTimeMillis() + FlIGHT_PULSE;
private long _flightPulseTime = System.currentTimeMillis() + FLIGHT_PULSE;
private SimulationManager() {
@@ -181,7 +186,7 @@ public enum SimulationManager {
player.updateFlight();
}
_flightPulseTime = System.currentTimeMillis() + FlIGHT_PULSE;
_flightPulseTime = System.currentTimeMillis() + FLIGHT_PULSE;
}
private void pulseCities() {