I've had a few people in my community ask about the difference between the two, and while I *think* I have a good idea on what is and isn't and entity or edict, I'd like to clarify some points. Partly for my own curiosity sake, but also so I can actually explain this stuff to other people without getting it wrong. So what follows is what I understand the difference between them to be. Feel free to pick it apart and correct me where I am wrong, I'm here to learn!
EDIT TO CLARIFY: This isn't a guide. This is me fact checking by presenting what I know, as I understand it in the hopes that someone will correct me where I am wrong, or confirm where I am correct.
As my understanding goes, anything that has to be coordinated between players on a server is an edict, which means some entities are edicts and some are not. So for example, an env_soundscape is not an edict because it only controls what some individual players can hear in the background. A func_door is both an entity and an edict because it has to be open to everyone or closed for everyone. It can't be open for one person and closed for another person.
On a similar note, do hats and cosmetics count as entities and/or edicts? My guess is that they do as aren't most hats treated as prop_dynamics parented to players heads? Any unusual weapon or hat basically has an info_particle_system parented to the players hat or head. That would certainly make them entities, but also edicts as those props and particles have to move about the map with the player.
Which in turn leads me to wonder how many entities and edicts a basic, vanilla player is made up from? As in a totally new player with no cosmetics just spawned into a server. Wouldn't it be 1) The invisible hitbox, 2) The player model, and 3) The player's active weapon?
In comparison, what would a fancy tricked out limescunt scout 'cost' a server? Assuming a worst case scenario, that player would also have 4) a hat, 5) a particle effect on the hat, 6) a particle effect on the active weapon, 7+8) cosmetics in the other two slots, and 9) an item in the action slot.
I should quickly add I am assuming only the players active weapon should be the only edict, because its the only one in use. But then I remembered we still have the bug where you see players holding all 3 of their weapons at the same time, so I supposed we have to a 2 more edicts. That's (theoretically) 11 in total.
Then as for anything fired by those weapons only projectiles such as rockets, stickies, arrows, balls, etc, are edicts. None of the bullet-scan weapons are/have edicts because the bullets 'travel' instantly and a value of damage is done to the target. In other words the target isn't actually 'hit' by anything, the system just pretends something did and takes of some health as if something had.
The one thing I am very certain on is the edict cap of 2048. Go over that and a server crashes. As mappers we have to be careful that our maps don't use too many edicts because once the map is loaded onto a server full of players with cosmetics, weapons, projectiles and unusual effects, the total number of edicts can creep over that hard 2048 limit and boom, crashed server.
I've seen disagreements over what the safe maximum limit we can use is, but we all seem to be in agreement that we should use as few entities as possible. Hopefully once we figure out exactly how many edicts players are made from, we can work out some scenarios with full 24 or 32 player servers.
Does what I have written sound like a fair and reasonably accurate description of the difference between the two? As I said before, feel free to pick apart what I've said and correct me where I'm wrong, I'm here to learn!
EDIT TO CLARIFY: This isn't a guide. This is me fact checking by presenting what I know, as I understand it in the hopes that someone will correct me where I am wrong, or confirm where I am correct.
~~~~~~~
As my understanding goes, anything that has to be coordinated between players on a server is an edict, which means some entities are edicts and some are not. So for example, an env_soundscape is not an edict because it only controls what some individual players can hear in the background. A func_door is both an entity and an edict because it has to be open to everyone or closed for everyone. It can't be open for one person and closed for another person.
On a similar note, do hats and cosmetics count as entities and/or edicts? My guess is that they do as aren't most hats treated as prop_dynamics parented to players heads? Any unusual weapon or hat basically has an info_particle_system parented to the players hat or head. That would certainly make them entities, but also edicts as those props and particles have to move about the map with the player.
Which in turn leads me to wonder how many entities and edicts a basic, vanilla player is made up from? As in a totally new player with no cosmetics just spawned into a server. Wouldn't it be 1) The invisible hitbox, 2) The player model, and 3) The player's active weapon?
In comparison, what would a fancy tricked out lime
I should quickly add I am assuming only the players active weapon should be the only edict, because its the only one in use. But then I remembered we still have the bug where you see players holding all 3 of their weapons at the same time, so I supposed we have to a 2 more edicts. That's (theoretically) 11 in total.
Then as for anything fired by those weapons only projectiles such as rockets, stickies, arrows, balls, etc, are edicts. None of the bullet-scan weapons are/have edicts because the bullets 'travel' instantly and a value of damage is done to the target. In other words the target isn't actually 'hit' by anything, the system just pretends something did and takes of some health as if something had.
The one thing I am very certain on is the edict cap of 2048. Go over that and a server crashes. As mappers we have to be careful that our maps don't use too many edicts because once the map is loaded onto a server full of players with cosmetics, weapons, projectiles and unusual effects, the total number of edicts can creep over that hard 2048 limit and boom, crashed server.
I've seen disagreements over what the safe maximum limit we can use is, but we all seem to be in agreement that we should use as few entities as possible. Hopefully once we figure out exactly how many edicts players are made from, we can work out some scenarios with full 24 or 32 player servers.
~~~~~~~
Does what I have written sound like a fair and reasonably accurate description of the difference between the two? As I said before, feel free to pick apart what I've said and correct me where I'm wrong, I'm here to learn!
Last edited: