Finishing...
24/Jun 2007
We’ve entered the final stage with The Witcher. This means optimizing & bug fixing. Right now I’m mainly working on the optimization side. So far I’m rather happy with the way I modified our old AI update system (it was legacy code from Aurora), it saved up to 5-7ms at big levels with lots of objects (we’ve up to 200 AI controlled citizens in Wyzima for example, not even counting other types of objects here). Another thing I’m fighting right now is memory usage. We’ve been a little bit to careless, and I’m trying to cut down per-frame allocations. Libraries I found useful:
- dlmalloc - basic malloc replacement
- our own library for small allocations on top of dlmalloc,
- TLSF allocator for Lua/NSS allocations,
- Boost pools
- my own fixed-size allocator (it’s quicker and smaller than the Boost one, but relies on preallocated mem buffer and doesnt grow).
We have a nice auto test system, which just grabs latest code/data every day at 11pm (at 3 different machines), runs several scenarios and records basic performance counters, insertes results into MySQL database, creates some graphs and sends e-mails. When I get to work I grab a drink and can see the latest results.