It’s time for some Revolution News!
Over the last few weeks I’ve been working on some new projects supporting the CC2 community (read about it here) I’ve betting up various dedicated servers for hosting events and recording game stats and looking back at historic events and also creating some control panel-like software for these new servers and events database.

While doing all this I’ve been trying to correctly size the CC2 server hardware. It’s a fairly demanding server game in that you really do need good networking and high clock speed rather than a lot of cores or a lot of memory. The first few events we’ve run on the new rented virtual machines were fun and playable but we were hitting performance problems (new ones we’ve not seen before that I recall) so I went on to investigate.

I went back to the mod code and tried to debug more things, to see if there were performance hotspots in the mods that were causing problems in big games. It is noticeable that when you join a dedicated server with no mods at all, that the game really does feel snappier, so there IS a problem, the question is where? and why? and can we fix it?
Some fairly recent mod changes this year were when I added the extra side-screen for the captain. At the same time as this, I made it so the vehicle control screen here could also update the captian’s shared holomap cursor. If the captain uses this screen, the rest of the crew screens see this cursor.
The cursor us updated by setting a value in a special waypoint for each team. Every time the captain moves the mouse more than 10m, the cursor location is updated. If nobody is using the holomap then these updates don’t happen. All the same, I reduced the update frequency of this a little.
While testing this small change I noticed that there were more updates than I was expecting, just flying around my manta, I was getting lots of updates to the cursor. Just playing by myself I wasn’t seeing lag, but it was strange. It meant some part of the game wasn’t behaving how I understood it!

You know that side-screen update? well, it turns out, that when you are operating an aircraft or ground unit, if you use the mouse, the mouse events STILL get sent to the control screen you were attached to. The mouse pointer moves around quickly, especially when you are flying. Every one of these huge movements is FAR more than 10m of real world difference, so another cursor update is triggered! This was filling up my debug log with a lot of noise. My mistake was, the previous “is the user connected to the screen” check returns true if you are using the screen OR if you using a unit from that screen.
This annoying bug is worse than it appears. Every time the cursor changes, it updates a waypoint, which means it sends it to the game server, and the server then has to send that waypoint change to EVERY player on ALL teams. Do this far too often and the server is going to spend more time doing this than simulating the game!
So! with this now fixed, the captain will no longer accidentally cause loads of network traffic just by trying to fly a Petrel!

I’ve also taken the opportunity to trim out a few other things, some features that aren’t really needed but were also CPU hotspots. I think the performance is a little better. Loading the old “Busy” map for performance tests I have been getting about 332 updates/sec where before it was an average of 324/sec. Not huge, but better and more stable.
Get the update now over on Steam! ๐
Bred


