[INFO] Source engine entity limit & more

grazr

Old Man Mutant Ninja Turtle
aa
Mar 4, 2008
5,441
3,814
Indeed, is there a total entity limit? You should probably include that too. But knowing the dynamic entity restriction is pretty handy even so.
 

Fearlezz

L10: Glamorous Member
May 4, 2008
787
476
Yeah, these stuff are very useful.
 

UKCS-Alias

Mann vs Machine... or... Mapper vs Meta?
aa
Sep 8, 2008
1,264
816
This will output the complete list of all dynamic entities in the map. *Todo: does it really?*
I did check this and it seems it only gives the active dynamic entities. Disabled ones dont show up on the list. However, they are still counted in that list.

To check the hidden ones you can use find_ent and find_ent_index. The normal finding will show all objects where the name or entity type matches. The index will show you the ent on the index.

Some player objects like the weapons you wear show up on it also. Some animated objects also only show up at limited parts so best is to check the index after the last one in the list with find_ent_index and repeat it until you realy hit the last.

I havent checked if in runtime other player do also give all their weapon entities to that list. If thats the case then testing the limit will become a pain at some moment.

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".
They are static as long as you dont mess with the dx levels (if you do i dont know if they will become dynamic though).

There is a simple trick to see if an entity is dynamic. If it has outputs or inputs other than the onuser/fireuser ones then they are dynamic. Same as when they are animated but other than that dont have any actions.
When on a static object you trigger the onuser objects then it will become dynamic if im right.

Another thing, entdata was something for HL2 to see if you are nearing the memory limit for the minimum requirements. As those are outdated that value isnt realy usefull.

Are env_sprites dynamic entities?
You can turn them on or off so yes.

Some others that are important for people to know that they are dynamic:
func_areaportal
func_areaportalwindow
func_brush
func_door
func_illusionary
func_lod
func_nobuild
func_occluder
func_physbox
func_regenerate
func_respawnroom
func_respawnroomvisualizer
func_tracktrain

ambient_generic
game_round_win
info_observer_point
info_player_teamspawn(so per spawn there is no use to exceed 16 when you are nearing it)
item_ammopack_small
item_ammopack_medium
item_ammopack_full
item_healthkit_small
item_healthkit_medium
item_healthkit_full
logic_branch
logic_case
logic_relay
math_counter
math_remap
path_corner
path_track
phys_constraint
team_control_point
team_control_point_round
team_control_point_master
team_train_watcher
team_round_timer
filter_*
trigger_*
+any prop except prop_static and prop_detail (which you shouldnt create anyway)
+any payload cart entity not listed above


Overlays and decals are static in the same way as lights. give them a name and they become dynamic.

Further, i havent checked the multiplayer variants of the prop_physics and func_physbox. I think they are dynamic but as they dont use any server sided actions they might not be. They are dynamic for the player that sees them thats what i know for sure though. Quite bad as people testing the map on lower settings can prevent crashes happening...

And most important. with brush entities that can be merged it should be done to reduce the dynamics.

EDIT: updated the list to have a bigged entity list. All filters, triggers and props are merged. And they are alphabetical now (and if i made a mistake mention it)
 
Last edited:

UKCS-Alias

Mann vs Machine... or... Mapper vs Meta?
aa
Sep 8, 2008
1,264
816
I just did another test. This time with players (well, bots). I checked if their weapons are dynamic and if they can couse the crash... the result: They can.

I did check it on pipeline which has 1488 dynamics when i was the only one on and as demoman. I then spawned 31 bots and made them fire all their stickies... it was close but not enough to realy couse the crash. (19## entities). then after 3 nades i got the no free edicts.

Engies are also massive in that btw, their sentry gibs do count in it! I think valve has a system that does remove them when there are too many but im not 100% sure on that. Ragdolls however do count in it! Even if you have turned them off they are still added in the dynamics pool but disabled.

From my test i also noticed that in any average game there wont be over 600 ents or pipeline would be a crash festival on most servers (i havent seen it crash once).

Also, if you want to test it yourself also note that alot of the entities have a diffirent name ingame (often close though to recognise it)!. The healthkits for example do not show up with the healthpack as name. The list shows C++ classes and not hammer entities.

I however find it quite bad that players can crash the server if the map contains too much... Valve should have added a seperate pool for player entities to ensure maps dont crash if players are doing the same as i did with the bots. Those mad rounds do happen time to time.
 
Aug 19, 2008
1,011
1,158
heyo

i stresstested my entitycrash-ridden cashworks with the "32demomen x 8stickies x 4pipebombs" procedure, so far it is holding up (thanks for your dynamic ent-list btw)

what i´d like to know if that´s the best i can do, or if there is any procedure more bulletproof than the demospam to see if the game crashes due to an entity overflow?

am i good or can i test it any other way?