I'm happy now so I've decided to write some info for beginners.
Most of us know that:
Source engine can handle 2048 dynamic entities at once.
If there are more of them, the game will quit with engine error.
But how do we know how many dynamic entities are there at some moment? Note, that
hammer entities and ingame entities is a bit different things. So, to do this:
- Start your map
- In console type "sv_cheats 1"
- Type "cl_showents"
This will output the complete list of all dynamic entities in the map. *Todo: does it really?*
Not to be confused,
hammer entities quantity can be viewed using:
Map -> Show Information
Note that PointEntities and SolidEntities are hammer entities and their number does not represent ingame behavior.
So now let's talk about some common entities to destroy every myth and common mistake:
- light and light_spot
Any light or light_spot without name (targetname) is not a dynamic entity ingame. You can place more than 2048 lights in your map and it will work without game crashes. Any light or light_spot with name (targetname) is a dynamic entity and therefore is under 2048 limit.
- func_detail
Any func_detail in hammer is not a dynamic entity ingame. You can have more than 2048 func_details in your map in hammer. Also, there is no difference if u make some big multibrush object a single func_detail or each brush of it. It's the same for engine. Why? During the BSP stage of compile, vbsp analyze the vmf and mark func_detail brushes that they don't block visibility. Then it generates portal file (*.prt). After that, all func_detail information and entities are discarded and not used in VIS or RAD. *Todo: does it really? DX levels * So there is no need trying to merge all your func_details in a single entity to "reduce number of them".
- prop_static
prop_static is not a dynamic entity ingame. You can have more than 2048 prop_statics in your map and it will work without game crashes. Also, you can't see it's properties using "ent_text", you can't spawn it using "ent_create", you can't manipulate it using "ent_fire". But you see some info using "surfaceprop".
- point_spotlight
point_spotlight is always a dynamic entity. It's under 2048 limit. Plan your lights carefully or u can reach the limit very fast.
- move_rope and keyframe_rope
move_rope and keyframe_rope are dynamic entities. They're under 2048 limit.
- decals, overlays - 512 overlay limit, more info soon.
- sprites - needs some testing. Hopefully will finish in a few days.
*POST IN PROGRESS*