|
|
|
2 registered members (Grant, JeyKey II),
13,966
guests, and 2
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Code optimisation / LOD
#9157
06/05/02 05:01
06/05/02 05:01
|
Anonymous
OP
Unregistered
|
Anonymous
OP
Unregistered
|
quote: Dan Silverman: Why make 4 LOD models if you only need 2?
Of course I can create only 2 LOD models, but then it's invisible if the player's distance is more than 1/4 of the clip range.
Here's an example:
This exterior of a house is always the same, but I had to save and build it as house_1.wmb, house_2.wmb and house_3.wmb, so the house is visible as long as it's within the clip range. 
And here's the house_0.wmb with all the interior details: 
If I could define LOD2 = <house_1.wmb> and LOD3 = <house_1.wmb>, I would only need 2 entities instead of 4! In a whole game with a lot of LOD models this makes quite a difference.
The other question I have asked: Does it slow down the script execution remarkably, if I have a lot of running functions in a while(1) loop: If (variableX == 0) {my.invisible = on;} else {my.invisible = off;}
I use this function in many situations instead of LOD entities. But if I use it some hundred times? I once made a function for testing purposes, that started 1000 functions: while(1) {wait(1);} With this 1000 "empty" functions the time for script execution went up 2 ms. I'd like to know, how much time others need for the script execution. In my first level (not yet finished) the time is between 2 and 7 ms.
|
|
|
|
|
|
|