as few as possible but as many as needed.
Areaportals are manually created by the user and triggered by a trigger.
spike: areaportals aren't like that.
example: if you have a spawn room with 2 doors on opposite sides and 1 window, you will have 3 areaportals. the door areaportals you'll tie to the door entity too, so it's closed when not in use.
if you have a big open area, for example my map CTF_underside - in the middle part, you will have zero areaportals generally.
think of it like this: area portals break up your map into different areas.
e.g.:
outside, inside.
or large warehouse/traindepot and the corridors on the sides.
if you have a small room in the middle of that traindepot, you're probably better off not putting areaportals on it.
also you can reduce number of areaportals with a bit intelligent design of the map - areas of the map that aren't able to see many other areas, and aren't able to support large numbers of players fighting there (like the entirety of badwater blu spawnroom, which is about 4-5 rooms really) don't need a single areaportal.
also, you don't need an areaportal where the opening can only be seen close up on one side, and hasn't much detail on that side (e.g. spawn room doors in badwater), simply because on one side you aren't going to be hiding much with the areaportal, and on the other, there's not much to hide in the 1st place.
i suppose if you really want a rule of thumb, use areaportals for every major building on your map. and more importantly use areaportals between two areas of high detail/high action, but not in a case where the areaportal basically sits 1/2 down a large room, as it won't have any positive results here.
hope that helps.
I believe you can't do this in TF2 (same with open/close with door) because it screws with the multiplayer aspect of the game. Besides, they work fine without triggers.
Yeah I know how areaportals work, I just want to know the average of them on a map. I'm not using them to block doors or buildings since my map doesn't have any building. I've divided my map on some parts with areaportals for optimizating reasons (huge open areas).
Also I was wrong with areaportal number, I've 8 on first stage. Just want to know the average number so it doesn't affect server/client performance.
I think Valve made areaportals in that way on CP well, at least, there's one areaportal for each base door.
And they doesn't work without triggers, areaportalwindows are the only ones doesn't need triggers, normal areaportals need to be triggered.
Also I don't understand the multiplayer thing, areaportals works half-client side, I mean they need to be triggered by the server, but only works on activator, so if you close an areaportal, that doesn't mean another player will see it closed.
In multiplayer games, areaportals are considered seperately for every player. That is, if player 1 cannot see area A because of a closed areaportal, then that doesn't mean that player 2 cannot see area A too; Player 2's computer will also determine what area's he can or cannot see, and they don't have to be the same as that of other players. So you don't have to worry about players seeing the rooms around them disappear because an areaportal has closed.
And they doesn't work without triggers, areaportalwindows are the only ones doesn't need triggers, normal areaportals need to be triggered.
I believe you can't do this in TF2 (same with open/close with door) because it screws with the multiplayer aspect of the game. Besides, they work fine without triggers.
Areaportals are based on the player's view angle. So if the player can't see directly into an area portal then the portal is closed.
According to this website, areaportal visibility is individual for each player:
http://www.student.ru.nl/rvanhoorn/...ls&PHPSESSID=ea8f081e189f6a845d2c8b980899125c
My question is:
-If a player triggers an areaportal to close (because he's far away from it), would another player next to the areaportal see it closed?
-Having 20 on a big map like dustbowl (size) is ok? Or would it affect performance?