Speed scale is 2, rather than 10.

Server simulates frames every 16ms rather than 50ms.
This commit is contained in:
fjc40
2017-09-15 01:00:26 +12:00
parent 5c58ca11ff
commit 191f249bfb
2 changed files with 4 additions and 4 deletions
@@ -91,7 +91,7 @@ public class RaceLogic implements RunnableWithFramePeriod, Observer {
server.parseSnapshot(); server.parseSnapshot();
waitForFramePeriod(previousFrameTime, currentTime, 50); waitForFramePeriod(previousFrameTime, currentTime, 16);
previousFrameTime = currentTime; previousFrameTime = currentTime;
} }
} }
@@ -128,7 +128,7 @@ public class RaceLogic implements RunnableWithFramePeriod, Observer {
race.setBoatsStatusToRacing(); race.setBoatsStatusToRacing();
} }
waitForFramePeriod(previousFrameTime, currentTime, 50); waitForFramePeriod(previousFrameTime, currentTime, 16);
previousFrameTime = currentTime; previousFrameTime = currentTime;
} }
@@ -206,7 +206,7 @@ public class RaceLogic implements RunnableWithFramePeriod, Observer {
previousFrameTime = currentTime; previousFrameTime = currentTime;
} }
waitForFramePeriod(previousFrameTime, currentTime, 50); waitForFramePeriod(previousFrameTime, currentTime, 16);
previousFrameTime = currentTime; previousFrameTime = currentTime;
} }
} }
@@ -28,7 +28,7 @@ public class Constants {
* Frame periods are multiplied by this to get the amount of time a single frame represents. * Frame periods are multiplied by this to get the amount of time a single frame represents.
* E.g., frame period = 20ms, scale = 5, frame represents 20 * 5 = 100ms, and so boats are simulated for 100ms, even though only 20ms actually occurred. * E.g., frame period = 20ms, scale = 5, frame represents 20 * 5 = 100ms, and so boats are simulated for 100ms, even though only 20ms actually occurred.
*/ */
public static final int RaceTimeScale = 10; public static final int RaceTimeScale = 2;
/** /**
* The race pre-start time, in milliseconds. 30 seconds. * The race pre-start time, in milliseconds. 30 seconds.