12:25:07 PM Apr 7th 2013
To be honest, the argument of removing bodies not to further slow down the CPU or not to use more memory, only applies for respawning enemies or enemies from mook makers (as cleverly made in the first half-life). let me explain, the memory usage after having killed the enemies will be the same to slightly less, as the memory have been kept track of them even when they were alive, less in some cases, as I assume active/animated npc's most of the times those nearer to you, use not only considerably more CPU but also quite more memory, to keep track of status and AI/AI reaction variables, even for the idle ones, than those needed for a corpse just laying there unanimated (in Unreal they get explicitly replaced by an identical looking carcass class of the same entities, which uses fairly less variables, freeing ram, nevertheless they have an expiring time after which they vanish as you look away from them). Letting alone the obvious need for less CPU power for a still corpse as it lacks processing animation and AI. Games like Doom 3 or Quake 4, have a predetermined number of entities, that simply change state and pose, whether they are alive or dead, the world is not heavier that i know, when they die. Yeah, ragdoll phisics process the limb body animation, but that's only until it becomes static. Unless there is a form of grid compression for the position not yet met enemies, I don't know. So the only purpose, of corpse fading in games with fixed number of entities is to flush the game, i'd say, to use less ram and CPU than needed before going on in the level. Another reason I could think of might be statistic, before facing your enemies, you're most likely not in front of that much entities for the CPU-GPU to be processed in screen, so they'll remove them for preventing the system to process more items until the next fight. You're more likely to have these entities in the screen after you killed them and progress especially when you backtrack. Though this detract from atmosphere. It's a real necessity in Gta, as there, there is not a fixed number of entities, they always dynamically spawn. This can be justified as in city, bodies would be eventually removed and cars towed away. But in Tomb Raider 4 it's ludicrous, as the enemies are relatively rare, imho. Strange thing, in Half Life, in the Xen levels, pretty much any enemy body disappears, despite not having anything to do with respawing and mook makers. Also it gets more and more frequent the more you approach the end of the Black Mesa section anf you get teleported in Xen.