Discoveries and Broken Shit

Posted September 10, 2022 by Richard Leek ‐ 2 min read

Did some more NPC research with GameServer and had a very rough first implementation of NPC movements

What’s up with NPC movement speed?

In my testing with GameServer I noticed that certain NPCs moved a lot faster than they do on the clone server. Especially biters underneath the aeven grocery compare the speed between clone and gameserver below.

Biter speed on clone server

Biter speed on GameServer.exe

You can see there’s a HUGE difference. Here’s a youtube video from 2015 showing the same mobs moving. It might seem a bit slower but that could be due to:

  • AI pathing to multiple targets
  • Ping between the player and server
  • Server load

Recording the data

So we know that NPCs moved faster on the original server but how do we record the speed?

At first I turned to existing tools like Plasmastar’s EOStarProxy which can print timestamps of when packets are received from the server. This wasn’t going to be good enough though because it only printed the timestamp to the current second and these packets come in multiple times per second.

eostarproxy
Timestamps are there but only in seconds

A new proxy

I created a new proxy using the existing eo crate in just an hour or two.

It’s pretty basic but it got the job done. With this I was able to accurately measure the rate at which NPC update packets were coming in from the server.

The results

Below are the results of the 8 different speed value types for NPC spawns.

SpeedGameServer.exeEOServ (config/npc.ini)
0400ms900ms (+500ms)
1400ms600ms (+200ms)
2800ms1300ms (+500ms)
31200ms1900ms (+700ms)
42400ms3700ms (+1300ms)
54800ms7500ms (+2700ms)
69600ms15000ms (+5400ms)
7FrozenFrozen

A shoddy implementation

I was feeling great after this discovery and quickly went to implement basic NPC movements in reoserv. The results are.. pretty funny!