Skip to content

Commit a4e2c2f

Browse files
Doing some memory cleanup so she runs a little better
1 parent 40796b8 commit a4e2c2f

File tree

4 files changed

+10
-2
lines changed

4 files changed

+10
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ The server runs on the 435 revision of the game, which was a game update made on
4141
- A simplified JavaScript plugin system for quickly and easily bootstrapping game content
4242
- Flexible quest and dialogue systems for more advanced content development
4343

44-
## Usage
44+
## Setup
4545

4646
1. Download and install NodeJS **version 13 or higher**: https://nodejs.org/en/
4747
2. Clone the Github Repo: https://github.com/rune-js/server

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"main": "src/game-server.ts",
66
"scripts": {
77
"start": "concurrently \"npm run build:watch\" \"node --max-old-space-size=4096 dist/main.js\"",
8+
"start:server": "concurrently \"npm run build\" \"node --max-old-space-size=4096 dist/main.js\"",
89
"lint": "tslint --project tsconfig.json",
910
"fake-players": "concurrently \"npm run build:watch\" \"node --max-old-space-size=4096 dist/main.js -fakePlayers\"",
1011
"fake-players-tick": "concurrently \"npm run build:watch\" \"node --max-old-space-size=4096 dist/main.js -fakePlayers -tickTime\"",

src/game-server.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,17 @@ export function runGameServer(): void {
9090
});
9191
generateCrcTable();
9292

93+
delete cache.dataChannel;
94+
delete cache.metaChannel;
95+
delete cache.indexChannels;
96+
delete cache.indices;
97+
9398
world = new World();
9499
injectPlugins().then(() => {
95100
world.init();
96101

102+
delete cache.mapData;
103+
97104
if(process.argv.indexOf('-fakePlayers') !== -1) {
98105
world.generateFakePlayers();
99106
}

src/world/world.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ export class World {
428428

429429
const spawnChunk = this.chunkManager.getChunkForWorldPosition(new Position(x, y, 0));
430430

431-
for(let i = 0; i < 990; i++) {
431+
for(let i = 0; i < 1500; i++) {
432432
const player = new Player(null, null, null, i, `test${i}`, 'abs', true);
433433
this.registerPlayer(player);
434434
player.activeWidget = null;

0 commit comments

Comments
 (0)