Just updating the engine to have less trees didn't cut it for U.S.A. It also turns out that there was still a hell of a lot more work to do under the hood with respect to optimisations.
I've had to remove the glass decals on the vehicles for the low memory mode, as this impacted the Rally Cross too with 6 vehicles loaded and on the track.
There was a pretty large memory leak going on with the render targets too, which only got "freed" when the race was over and the user quit back to the main menu, so this has now been fixed, and the memory requirements for a Rally cross race went down by a further 90Mb!
The other issue, which is often overlooked in games programming until memory becomes an issue, is the alignment of structures. For modern hardware to be efficient with neon and simd instructions, all variables have to be aligned to a certain byte boundary. Most Vectors/Matrices are aligned to 16 bytes so you can use intrinsics, of course if you don't think about how you lay out your structures/classes, the compiler will end up padding out the structures to align them. For example U.S.A. has about 20,000 trees, and the alignment of each class instance was bad, meaning it padded out about an extra 0.5Mb just for trees. So ensuring everything was aligned correctly really helped out here too!
Anyway to cut a long story short, there are going to be a lot of happy people out there when the update drops, as people who are on the lowest spec device will be able to play U.S.A and the Rally Cross tracks in all their glory and be able to play the game to completion!
Comments