From 2e524c5c8c74e53c0ea753faa6cf550cbefb1ff8 Mon Sep 17 00:00:00 2001 From: biglyderv Date: Fri, 3 Jan 2025 14:59:45 -0500 Subject: [PATCH] reduce number of npcs because of lag --- game.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/game.js b/game.js index b5ee269..027cdd2 100644 --- a/game.js +++ b/game.js @@ -199,15 +199,15 @@ class Game extends GameBasic { let that = this; that.entities = []; - for (let i = 0; i < 20; i++) { + for (let i = 0; i < 10; i++) { that.entities.push(new NPC(false, that)) } - for (let i = 0; i < 35; i++) { + for (let i = 0; i < 10; i++) { that.entities.push(new Shooter(false, that)) } - setInterval(function () { that.sync(false) }, 1000 / 5); + setInterval(function () { that.sync(false) }, 1000 / 10); setInterval(function () { that.sync(true) }, 1000); setInterval(function () { that.clean() }, 1000); }