Half an update

This week has just not been going well. It doesn’t help that the AC in my office is blowing a tornado ¬†and after a few minutes sitting in here my ears are ringing. It doesn’t seem to bother anyone else, so I get to feel like the whiny little Brit.

Right now my main tasks are finishing up localization of the host, which is dragging out as I work thru all those fancy /commands like “/own” and some fairly significant under-the-hood overhaul of the grid system in the cell hosts.

It’s something that needed doing for a while to catch the cell host up with other changes, making a bunch of other critical work possible, and as the basis for a very simple partitioning system, sometimes referred to as instancing. This round of instancing is trivial, however; only partition 0 (the live campaign) has strat and supply data, all the other instances have unlimited/free supply like the training server, all buildings/etc are in their default state, etc.

Just now I’m converting the low-level system that tracks where everyone is and thus who can see whom with a nice simple grid system (in matter of fact, the current systems are called “the grid” and “the vis system”).

There’s an old coding adage that you should never rewrite code. I refactored the grid system quite some time ago as the basis for the area chat system in the chat host, and this replacement will largely be based on that. But the vis system is designed to do the opposite of what I need it to do, the code is written in C rather than C++ and it uses some very bad shortcuts to achieve performance and the cost of … well, actually performance.

My design is significantly simpler… Shoe-horning the old system into it would require far more new coding than rewriting the thing, and since I’m making heavy use of existing well-documented systems (STL) and creating a system at least an order of magnitude simpler … I find it hard not to see replacement as justified over refactoring… 15,000+ lines of code replaced by under 1500? And mine have comments in them. (Well, the old code does if you count “// i?”)