After building the universe( Build Static Portals ), static objects cannot move. Place objects before calling Make Static Object. Note that you can save your work using Save Static Objects ( in conjunction with Load Static Objects ). You should use a 3D editor to build your level and then load it; set it to static and save that to be reused.
If your goal is to squeeze as much detail as possible into your maps; just keep a consistent polycount for each view of the map. For each location, if there will be many characters walking through that part, keep it low. If you stand somewhere and there are lots of moving objects, keep it low; if you have a multiplayer game and the area is likely to be highly populated, keep it low. Otherwise, keep adding nice looking detail but keep an eye on the primitive draw count ( Statistic(5) ) and the nearby polycount in view( Statistic(6) ), and use the following example to determine what type of objects to use where.
You have to perform scientific method to figure out what works best for your game. Consider this demo. When static objects in large quantity are created, in this scenario the FPS is more consistent than with the objects set to dynamic; BUT, when you face away from the objects, the FPS remains the same due to that consistency!
With the dynamic objects, they do not get updated when you face away from them (visually speaking). So they are better for things that you often turn your back to often (EG: Trees, flag poles, small rooms side by side that are never in full view, building blocks that are not always in view, small bridges, furniture, ladders etc.)
Dynamics can be hidden collision meshes or excluded visuals when away (or in the case of Dark Occlusion, hidden when out of sight; or with Dark Imposters, drawn to a simple plane when far away.) You also have the free command 'Add LOD To Object' for your detailed meshes, this will tell the engine to draw a particular mesh for an object depending on its distance from view; this is good for plantation and caves.
You will see that if you rem out the static rooms, the frame rate is better because only certain rooms are drawn in dynamic mode; but if you get a situation where all rooms are in view, static would have been better.
When you rem out the dynamic detail wall; you will see that the frame rate is better when they are in view as static objects. As dynamics the effect is opposite, the frame rate is worse when they are in view.
The program displays the statistics in the top left.
`%Project Title%
`Static Test.dba
`======================
Autocam Off
` Set size of universe in multiples of 100
Set Static Universe 10000, 200, 10000
Make Matrix 1, 20, 20, 10, 10
Position Matrix 1, -10,-2,-10
Make Object Cube 1, 1
Move Object Right 1, 2
Make Static Object 1, 0, 0, 0, 0
Make Object Sphere 2, 2
Make Static Object 2, 0, 0, 0, 0
` See the difference with rooms
remstart Static is more consistent and better in view, but the FPS stays the same when you face away;
` dynamic is good for few rooms or for rooms in general when you face certain directions
For I = 501 to 525 Step 6
Make Object Box I, 1, 20, 20
Move Object Left I, 9.5
Make Object Box I+1, 1, 20, 20
Move Object Right I+1, 9.5
Make Object Box I+2, 20, 1, 20
Move Object Up I+2, 9.5
Make Object Box I+3, 20, 1, 20
Move Object Down I+3, 9.5
Make Object Box I+4, 20, 20, 1
Move Object I+4, 9.5
Make Object Box I+5, 20, 20, 1
Move Object I+5, -9.5
For o = I to I + 5
Move Object Right o, (i-501)*3.0
Set Object Wireframe o, 1 ` For dynamic mode
`Make Static Object o, 0, 0, 0, 2
Next o
Next I
remend
` Detail objects
For I = 3 to 499
Make Object Box I, 2, 3, 2
Move Object Right I, 3 + ( (I-2) * 1.99 )
`Set Object Wireframe I, 1
Make Static Object I, 0, 0, 0, 0 ` Better consistancy, but slighty slower when you face away from the objects
`Hide Object I ` Collision will work and the framerate will be high
`Exclude Object On I ` Collision will not work
Next I
` Build the static universe. Any statics created after this will be invisible.
Build Static portals
` Move Object Right 1, 5
` ^ Would not work
FPS# = 0
Position Camera 0,0,-3
Set Camera Range 0.01, 2000
Automatic Camera Collision 0, 1, 0
Do
Set Cursor 0, 0
FPS# = Screen FPS()
If FPS# <> 0
Delta# = 60.0 / FPS#
If Delta# < 0.02 Then Delta# = 0.02
If Delta# > 5.0 Then Delta# = 5.0
Else
Delta# = 0.02
Endif
Print "FPS: " + Str$(FPS#,0) + " | Delta:" + Str$(Delta#,2)
Print "Polys in total: "; Statistic(1)
Print "Polys in area box: "; Statistic(6)
Print "Primitive draw calls: "; Statistic(5)
Print "Polys tested for collision: "; Statistic(8)
Print "Volumes tested for collision: "; Statistic(9)
Control Camera Using Arrowkeys 0, Delta#*0.2, Delta# * 1
Loop
This stuff is too complicated in my opinion, because both systems have specific advantages in many different situations; but that's life...