little doubts about entities and fps.


(mazdaplz) #1

i have a big outdoors map and im planning to push the limits on it, and as far as entities go im concerned. i hear 1024 is the limit of which 64 are the players.
how about the 64 spawns, that’s counted too? i just thought of that.
how about when my shooter_ fires? are the panzer shots also counted? or just the shooter? how do i get rid of that annoying panzer carcass being left after shot? please dont tell me this is an entity too

still my real doubt is this; do lights count as entities in game? or do they get calculated and absorbed into the lightmap and then erased? are they increasing my entity count?.

now i noticed my fps has dropped by some ammount, would this get better by:

a) deleting all entities i can spare?
b) adding fog so it wont draw further than it should?(snipers might suffer tho)
c) gettin rid of alpha blending on my terrain? (not too sure about it yet)

i have a pretty complex script too, and it will get messier when i start cloning stuff and adding objectives etc.
how common is it to have scripts lower your fps? i want the map to be playable, and i will gladly trade compile times for fps for every release; thanks for your time.


(SCDS_reyalP) #2

Yes, there are quite a few runtime entities, including things like projectiles and bodies. You need to leave a couple hundred free.

still my real doubt is this; do lights count as entities in game? or do they get calculated and absorbed into the lightmap and then erased? are they increasing my entity count?.

Lights are compiletime only, as are misc_models and func_groups.

These threads might help you:
http://www.splashdamage.com/forums/viewtopic.php?t=12159&highlight=entity+limit
http://www.splashdamage.com/forums/viewtopic.php?t=11958&highlight=entity+limit
http://www.splashdamage.com/forums/viewtopic.php?t=11854&highlight=entity


(FireFly) #3

In my experience there are 2 things that can increase fps dramatically ( well actually 4, but I don’t think they will apply to your map :stuck_out_tongue:

  1. Too many portals: Portals are created by structural brushes, see if you can turn more structural brushes into detail brushes. If you have a big outdoor map you might want to consider on changing the _blocksize key to 2048 instead of the default 1024 in your worldspawn entity.

  2. Too many verts: With huge outdoor maps this can really be a problem: Hint brushes will have no effect in this type of maps ( as I once noticed in one of my previous maps :frowning: ) One option would be to reduce the amount of verts by simplify your brushwork / or get rid of tjunctions. If you have many tree models in your map try to cut some of them down.Also see if it’s possible to divide the open area into two or more separate parts, connected by a tunnel ( like in fueldump)

As a last resort you can add fog ( culling) to the map, but, like you already said, this might disencourage players to go sniper in your map.

Here are 3 & 4 although they probably don’t apply to your map:

  1. Complex shaders: shaders like reflecting water / mirrors will have a huge impact on your fps

  2. Dlight entities


(mazdaplz) #4

thanks a lot :slight_smile:

i got rid of some entities, added fog to a far distance which is ok still for sniping, i made the map smaller and used r_showtris1 to watch how it was all cutting up in tjunctions, i got a little boost BUT i ALSO got rid of the alpha blend terrain and i can’t begin to tell you what a difference it made. i think it had something to do with my terrain being blended in high angles with the method for terrains instead of decals like they use in walls. dont really know but as i was running around it and shooting on the sand it really got laggy and now it’s not nearly as bad. it was only laggy around that place where i had blended rock and sand anyway, so i suspected that had something to do with it. i kinda like the fog too :slight_smile: im gon’ make it foggier!