WIP
This commit is contained in:
parent
37954e2ef1
commit
cd75bdbfde
1 changed files with 252 additions and 130 deletions
|
|
@ -25,9 +25,6 @@ Random.seed = 42;
|
|||
|
||||
const objects = new PhysicalContainer();
|
||||
createDungeon(objects);
|
||||
createDungeon(objects);
|
||||
createDungeon(objects);
|
||||
createDungeon(objects);
|
||||
|
||||
objects.initialize();
|
||||
|
||||
|
|
@ -99,15 +96,6 @@ const handlePhysics = () => {
|
|||
console.log(players.map((p) => p.latency));
|
||||
}
|
||||
|
||||
if (deltas.length > 100) {
|
||||
deltas.sort((a, b) => a - b);
|
||||
console.log(`Median physics time: ${deltas[50].toFixed(2)} ms`);
|
||||
console.log(
|
||||
`Memory used: ${(process.memoryUsage().rss / 1024 / 1024).toFixed(2)} MB`,
|
||||
);
|
||||
deltas = [];
|
||||
}
|
||||
|
||||
objects.sendCommand(step);
|
||||
players.forEach((p) => p.sendCommand(step));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue