View Single Post
  #3  
Old 07-07-2011, 10:15 AM
ZaltysZ's Avatar
ZaltysZ ZaltysZ is offline
Approved Member
 
Join Date: Sep 2008
Location: Lithuania
Posts: 426
Default

Collision detection and rendering is different matter. You can't say that if they can draw chimney smokes, they can check trees. No. When rendering is done, it cares only about what camera sees, so only data of one sector is loaded at given time, because only one camera is active at given time. This is different with tree collision checks, because there can be lots of planes on map and more than one sector has to be loaded.

Data for camera (rendering) can be loaded with delay (i.e. missing textures, effects for brief periods), but data for collision checks can't, it must be available almost instantly or simulation will lag badly.

Amount of trees is huge in Channel map and this gives 2 problems: memory usage for keeping tree locations and CPU usage for finding nearby trees around some point. Once you can quickly lookup and get nearby trees, then you can give hit boxes to those trees only and do collision checks. Coordinates loaded into quadtree + heigh map could be used for lookup, but that combined with current memory usage of CoD will probably make impossible to play CoD on 32-bit OS due to memory limitation.
Reply With Quote