Again.. bfmods.com ate my reply..
Be aware that debugging is always super-duper-ultra tedious..
I once spent whole week doing tiny changes and testing with several files of thousand lines to solve a major problem in an important feature and only find out the problem was caused by a variable isn't assigned a value.. Which caused the major feature break down...
Step 1: find a reliable way of reproducing problem
Step 2: Apply elimination method..
e.g.
remove all static objects
remove all firearms
remove all cars
remove all airplanes
etc.
Only apply one category of changes at a time. Assuming problem due lies in there, then problems will eventually get pin-pointed..
Step 3: Solve problem! You are basically done, just find an alternative solution..
Observations in the past years I think that may be helpful:
1. Lots of fast moving objects causes increased CPU usage than lots of slow moving objects...
I do not know why, my guess is probably due to big numbers and non-constant time mathematical operations are involved...
2. Lots of effects tends to put HUGE stress on GPU which can cause GPU or crash... and cook egg?
I am not sure why, maybe is just the algorithm used by graphics engine can only perform well below certain number?
I am not sure how it will vary if I change settings of effect, since I did not understand effects very well back then, and I don't have time to do so since I am in University.. which is HARD!..
3. Unknown surges in total # of collision check...
Two known reasons are
- OVERSIZED collision triggering check box.. yeah! The weird big box in the model that encapsulate entire vehicle is the one. Game checks if other objects (other than the current object that is checking against) is within that box or not. Simply by doing simple coordinate comparison.
If yes, then it will begin more detailed collision checking (e.g. where does collision occur, what is the speed and damage, etc.), to improve performance.
Therefore more accurate the box is, the better the performance of the mod.
- due to objects clipping through each other while having collision surfaces intersecting each others (similar to reason 1)
Since two objects are always inside each others box that triggering collision check, then the game will always check for the collision between those two objects.
Note: Surges in # of collision check is VERY severe with homing missile or any other objects employing similar techniques( springs with big collision mesh)
Since spring has tendency to get pushed away then restore to its original orientation.
This means, if spring began oscillating due to collision thus causing even MORE collisions.. then good for you! You just discovered the correct way of making a mod unplayable...
The idea about spring I mentioned here can be found in this link:
http://bfmods.com/viewtopic.php?f=43&t=1221
If I recall correctly, one DEV of BG42 mentioned they used similar techniques in BG42, too...
That could be a source of problem...