Large custom TF2 Map crashes randomly when running on 32 slot server

AwesomeX

L1: Registered
Jan 26, 2014
15
1
Hello everyone, I'm not sure what's happening here, but I'll do my best to explain it, so hopefully you kind mates could help me.

I've been working on a map for my TF2 server and community for a while now.

And only just released a new update to it yesterday, which added quite a lot, making the map larger.

The older versions never had any problems, and would run smooth without crashing, ever.

But this update, just out of the blue. The server will die.

I've checked compile logs, Hammer's Alt+P problem checker thingy and made sure there are no errors.

I've also made sure most of the interior are func_details.

So I'm wondering what the heck I can do to stop these crashes, and I'm wondering if maybe its to large for TF2 to handle?

Here are some pictures of the top-down view of the map.

tow4Wti.png


hUAUQkY.png


It doesn't seem like its TO LARGE, that's why I'm not sure what to do, or check to prevent any crashes when running the map.

Any help would be great, thanks for reading.
 

Snowbat

L4: Comfortable Member
Apr 23, 2013
165
74
Doesn't seem too large to me.
Could you give us some info on where it crashes? When it crashes? Are you doing something specific when it does? Is it in a certain area? Is it when you're getting a certain object in your sight?
Also, I'm sure you know this but I prefer to be sure, you do know that func_detail doesnt block vvis right? So you didn't make the main walls of your rooms func_detail I hope?
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
It is possible you are going over the edict (entity dictionary) limit for the engine since it looks like you have a lot of entity stuff going on in the map. Load up the map by yourself and type cl_showents in the console. That will list every edict that exists. What you are after is the number at the beginning of the last line. You should have at most ~1400 edicts in your map when by yourself, more and you risk crashing when the player count rises. 1 edict for the player, +3 weapons, +0-3 cosmetics, times 32 players, +engy buildables, +rockets/grenades/stickies/other transient weapon entities, +gibs and more... it adds up.

The edict limit is 2048, and 1400 is the guideline we use because that is around what Pipeline has, the most edict-heavy valve map. Pipeline can still crash in an extreme worst-case scenario, though that is unlikely to occur (everyone demoman, putting out stickybombs).
 
Mar 23, 2013
1,013
347
It is possible you are going over the edict (entity dictionary) limit for the engine since it looks like you have a lot of entity stuff going on in the map. Load up the map by yourself and type cl_showents in the console. That will list every edict that exists. What you are after is the number at the beginning of the last line. You should have at most ~1400 edicts in your map when by yourself, more and you risk crashing when the player count rises. 1 edict for the player, +3 weapons, +0-3 cosmetics, times 32 players, +engy buildables, +rockets/grenades/stickies/other transient weapon entities, +gibs and more... it adds up.

The edict limit is 2048, and 1400 is the guideline we use because that is around what Pipeline has, the most edict-heavy valve map. Pipeline can still crash in an extreme worst-case scenario, though that is unlikely to occur (everyone demoman, putting out stickybombs).

after my experience they number should be even lower then 1200 for a 32 man server. I could be wrong though

If you have prop_dynamics which use models with multiple bones, you should replace/delete them since a prop dynamic adds 1+1*bones entities in your map. so if you have an engineer as prop somewhere in your map, it adds around 15 edicts. If the prop is custom, you can simply delete the .phy file of it and it counts only as one edict somehow.
 
Last edited:

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
Well, it just depends on what you expect out of your map. Planning for the worst case scenario is not a good idea because of how unlikely it is. Demomen and engineers and the most edict producing classes, and they generally aren't seen in very high numbers. If you are building a "fun" map where there might be a reason for 10 demomen to show up... then yeah you may need to adjust a bit.
 

AwesomeX

L1: Registered
Jan 26, 2014
15
1
Well I just did cl_showents in console.

And the last line is this
Ent 1606:

Looks like I'm past 1400, and when the server has like 20 players it starts getting stressed and eventually crashes..

What can I do to lower them?
 
Mar 23, 2013
1,013
347
Well I just did cl_showents in console.

And the last line is this
Ent 1606:

Looks like I'm past 1400, and when the server has like 20 players it starts getting stressed and eventually crashes..

What can I do to lower them?

Like I have said before:

If you have prop_dynamics which use models with multiple bones, you should replace/delete them since a prop dynamic adds 1+1*bones entities in your map. so if you have an engineer as prop somewhere in your map, it adds around 15 edicts. If the prop is custom, you can simply delete the .phy file of it and it counts only as one edict somehow.

Every entity adds edicts, so you should remove some like sprites and point_spotlight

Light entities do count as edict ONLY if they have a name. So only use names on lights if you need to switch them on/off. overlays and decals dosn't count as edicts either

Every player spawn is an edict, maybe use less of them instead of 16 for every team in a room? Player will probably spawn on the same spot but I guess you ahve to live with it if you need to reduce the edict amount

In case you have multiple game_text entities you can eventually only use one and if you need a new message displayed, change the message with AddOutput.


EDIT: also combine brush entities. Instead of having e.G. 10 trigger_hurts which instant kill around the map, combine them all to only 1 entity. Now you save 9 edicts :D
 
Last edited: