Natural Selection 2
Login Now >
Click here to create a new account
Unknown Worlds Entertainment
Home
Game Guide
Community
Media
Forums
Store
Twitter
Facebook
YouTube
Latest Developer Posts
Promoted Content
matso
Master of Patches
1:47PM
Location Relevancy; get around max-relevancy distance by location based relevancy
Short summary: You can use multiple location entities to build up a manual relevancy tree, freeing the mapper from any restrictions on distance. Even if you don't modify the map, entities in the same Location as the player will always be visible to him. Use with care. Documentation: // ======= // // lua\LocationRelevancy.lua // // Created by: Mats Olsson (mats.olsson@matsotech.se) // // Adds the ability to make entities relevant by location. // // Background: // For performance and bandwidth reasons, updates for entities in NS2 are only sent // from the server to the client if the entity is "relevant". // // Relevancy is mainly calculated using distance (40m normally). Maps are usually carefully // constructed to avoid longer sight ranges than this, though you can sometimes notice them // (in Summit/Crevice, you will notice that if you go all the way west, everything around the // resource node disappears and then blinks into existence when you get close enough). // // Some custom maps (Skyfall, Goliath) are built around very large locations where this // problem is glaringly obvious. // // How it works: // // This mod uses a feature of the spark engine to make entities relevant depending on location. // // It adds the concept of a relevancyGroup and lets a location be part of one or more // relevancyGroups. Whenever a player enters a location, everything in all locations that // share at least one relevancyGroup with a players current location becomes relevant to // the player (a relevancyGroup is just a name, bw, nothing fancy about it). // // By default, each location creates a relevancyGroup with the locations name, meaning that // when a players enters a named location, all entities in locations with the same name becomes // relevant to him. This is done automatically, and applies to all maps. // // For advanced uses, where the mapper want more control over relevancy, a new field has been added // to the location entity in the Editor, location.relevancyGroups. This field may contain a // comma-separated list of relevancyGroup names to which the location will belong. // // If a '-' is part of the list of relevancyGroup names, this location will NOT use its name // as a relevancy group. No need to consider this unless you start running out of relevancyGroups, // there is a maximum of about'ish 25 available (print out kMaxRelevancyGroups for exact numbers). // There will be errors logged in the log if you run out. Oh, and you need to mark up all locations // with a name that you don't want with a '-' to get rid of it. // // In order to see this field, you need to use the LaunchPad and open the LocationRelevancy mod - // it is in your NS2 AppData file, workshop id m8bead14_... before starting the Editor from the // LaunchPad. You should see a "Relevancy Groups" field when you select a location entity. // // You can turn on and off location relevancy by using the (cheats-guarded) "locrel" console command. // // // Examples: // Veil, Cargo (those large container walls were added to avoid long sightlines) // AAAAA // AAAAA // AAAAA // B C // bbbB Cccc // // A is a large location with two adjecent locations, B and C, and we assume that the view-distance from // B into A is longer than max relevancy distance. Setting B and C relevancyGroups to "A" would make all of // A,B,C belong to one relevancyGroup, "A". So as soon as you enter any of those three, all entities in all // three locations would be relevant to each other. // // Notice that you could have the named location "B" be spread over two location entities - marked as // "B" and "b" above, and only set the relevancyGroup to "A" for the B location. // // Example 2 (Goliath, Storage) // TTT // SSSSSSSSSSSSSSSSSSSSSSSSSSSSS // SSSSSSSSSSSSSSSSSSSSSSSSSSSSS // LLLL SSSSSSSSSSSSSSSSSSSSSSSSSSSSS RRRRR // SSSSSSSSSSSSSSSSSSSSSSSSSSSSS // SSSSSSSSSSSSSSSSSSSSSSSSSSSSS // BBB // // The Storage location can be accessed from four different directions. Using the same // trick as for Cargo would make all of them the same relevancy group, which would mean // that everyting in the Top, Left and Right locations would become relevant if when you // entered the Bottom location. May or may not be a problem; it would depend on how many // entities you would expect to be in those areas. // // Assuming it IS a problem, and also assuming that there is no LOS between Top/Left/Right/Bottom, // you can handle this by having creating four new relevancy groups "LS", "TS", "RS" and "BS", // and using: // // Storage.relevancyGroups = LS,RS,TS,BS // Left.relevancyGroups = LS; // Right.relevancyGroups = RS; // ... etc // // This means that if you are in Storage, all entities in all five locations are relevant. If // you are in one of the entrance locations, only entities in your own location and in Storage // are relevant. // // It is highly unlikely that this will be an actual problem - the cost of keeping 10-20 extra // entities relevant is not likely to significantly affect your framerate and if you are in // the Storage location, you would have them all relevant anyhow. // // You could go further, splitting the Storage into multiple entities, each having its own set // of relevancy groups. This can quickly get quite complicated though. // // The best way of working is to design the map with location relevancy in mind. // // =========
Sewlek
The programmer previously known as Schimmel
11:31AM
Sewlek's Balance mod
mod is now updated
Squeal_Like_A_Pig
Janitor
3:02AM
Build 247 is now live on Steam! - Natural Selection 2
Evil.Iguana wrote: » Did Docking not get any alterations this patch? I had thought it was planned to remove locker rooms as a possible start location as it gives a huge advantage to the team that starts there. There are much much larger changes then just removing locker rooms as a marine start location, though that has been done in the WIP version. The new and improved Docking is almost done, but didn't quite make this patch. It will definitely go out with the next patch, though.
Hugh
Cameraman
May 20
Build 247 is now live on Steam! - Natural Selection 2
Updated post to include Descent and Mineshaft changes
MurphyIdiot
NS2 programmer
May 20
time to make the mods - problem
Can you email me a zip of your mod? I can try to figure out what is going on. brianc@unknownworlds.com
Hugh
Cameraman
May 20
Build 247 is now live on Steam! - Natural Selection 2
Bitey wrote: » Could do that in my sleep Everyone knows you don't sleep, Bitey!
Hugh
Cameraman
May 20
Build 247 is now live on Steam! - Natural Selection 2
Updated post to include Veil changes by @Mendasp and make the YouTube video work
Hugh
Cameraman
May 20
Build 247 is now live on Steam! - Natural Selection 2
Bump to open comment thread. Enjoy Build 247 everyone! Remember, it is ten pushups every time you get killed by one of Steve's bots!
Squeal_Like_A_Pig
Janitor
May 20
Do the "Perfomance-Jam"!!!
Ricez wrote: » An easy place to start is to remove clutter from the maps. You guys did a great job making the maps very detailed, but having 20+ individual cups in cafe or 100+ servers in server room can't be helping performance. I have no idea how many things could be removed or replaced with flat textures, or even if it would give a noticeable performance increase but maybe it's worth a shot. I think when you get to this stage in the game's lifetime, most players are here for the gameplay and not the ooohh shiny things As stated in this thread and many others, people are having issues with performance mid to late game. Most do not have a problem running at an acceptable frame rate at the beginning of the game, so it is not the level of detail in the maps that are the main culprit. And in fact, the benchmarks we've done show that the rendering time on high detail areas is really not a noticeable factor in the framerate, and the Spark engine can push around a surprising amount of poly detail. Clearly, if you look at extremes - a greybox map vs a fully textured and prop detailed one -- there will be framerate differences, but anything much short of that is not going to be a win for performance, compared to the loss in visual quality and time spent to make all those changes. On the visual side, lighting probably has the most impact on framerate, as well as the various layers of effects such as ambient occlusion, but beyond that, it is largely the game that is running on top of the graphics engine that is hurting performance the most, and and where we have spent and are spending a lot of our time optimizing. biz wrote: » and this isn't even a pretty game or a particularly complicated one... it's a somewhat small-scale multiplayer game in an arena - a problem that was more or less solved 15 years ago Well, naturally I take exception to the comment that NS2 is not a pretty game. Running it at full quality, I think it can hold up quite well to most games out there, in level of detail, texture quality, etc. And NS2 is by no means a small - scale multiplayer game, when you really get into the level of complexity that is in the game, compared to many other FPS shooters. Sure, some may be able to support more players - different versions of the same guys running around with guns, basically - but they don't have to deal with stuff like dynamic infestation, and all the structure entities for both sides, and commander mode, etc. If we made the game into a marine vs marine and removed the RTS side, and thus all the structures and other entities that are always needing to be updated in the game code, there would likely be far fewer, if any, complaints about performance.
Forums
Recent Threads
Activity
Best of...
Unknown Worlds Entertainment
Getting Started
Editor grid tool display problem
1
view
0
comments
0
points
Started by
[AwE]Sentinel
12:02PM
Technical Support
New vote system....
21
views
1
comment
0
points
Most recent by
Ironsoul
11:58AM
Server Discussion
[Error- Build 247] Altab or press Windows key >>> Game crash "Engine state can not recover"
131
views
11
comments
1
point
Most recent by
Agiel
11:27AM
Technical Support
B247 does not launch.
531
views
20
comments
0
points
Most recent by
LaserDestroyer
9:33AM
Technical Support
Game lags for about a minute since update.
221
views
29
comments
0
points
Most recent by
IronHorse
7:08AM
Technical Support
More Discussions
General
UWE to replace Vanilla NS2 with Sewlek's balance mod in the near future
5.4K
views
220
comments
0
points
Most recent by
thelawenforcer
1:50PM
General Discussion
Anyone else sick of this invincible structure bug
721
views
35
comments
2
points
Most recent by
nezz
1:48PM
General Discussion
Build 247 is now live on Steam! - Natural Selection 2
4.5K
views
75
comments
0
points
Most recent by
nezz
1:45PM
General Discussion
There's No Updated Wiki/Manual
21
views
1
comment
0
points
Most recent by
DC_Darkling
1:38PM
General Discussion
Rifle Butt, SMACK DOWN!
41
views
4
comments
1
point
Most recent by
Samus1111111
1:14PM
Ideas and Suggestions
More Discussions
Veteran
Australian Cyber Gamer Tournament Season 1 comes to a close
131
views
7
comments
0
points
Most recent by
nezz
6:31AM
Competitive Play
Pro players - Competitive play Vs Pub Play
1.2K
views
36
comments
0
points
Most recent by
zenef
3:46AM
Competitive Play
NSL/Comp Summit/Tram/Veil/Descent
4.3K
views
133
comments
2
points
Most recent by
Mendasp
May 20
Competitive Play
Custom HUD mod
211
views
7
comments
0
points
Most recent by
Mendasp
May 20
Competitive Play
Server mods for scrims/matchs
31
views
4
comments
0
points
Most recent by
Rich_
May 20
Competitive Play
More Discussions
Creation
Location Relevancy; get around max-relevancy distance by location based relevancy
1
view
0
comments
0
points
Started by
matso
1:47PM
Mapping
co_BlackMesa
141
views
10
comments
1
point
Most recent by
CarNagE1
1:18PM
Mapping
Spark Editor - Features (to speed up mapping) - you are (personally) missing ?
331
views
27
comments
0
points
Most recent by
WhiteDevil
11:31AM
Mapping
Combat Mode Relaunch
54.1K
views
1.1K
comments
2
points
Most recent by
Cuel
9:25AM
Modding
Remake List
Which NS1 map is still missing and your favorite?
451
views
20
comments
0
points
Most recent by
[AwE]Sentinel
1:11AM
Mapping
More Discussions
Other
Basic income (Unconditional cash) to poor people showed big results
441
views
35
comments
0
points
Most recent by
Faulty
12:17PM
Discussions
NASA and Google appear to be dabbling in Quantum Computing
181
views
5
comments
2
points
Most recent by
ezekel
May 18
Off-Topic
Interesting new scam from ESEA: farm clients for bitcoins
581
views
56
comments
0
points
Most recent by
Scythe
May 17
Off-Topic
Nintendo cuts off youtube ad revenue
111
views
2
comments
0
points
Most recent by
EgoGamer
May 16
Discussions
Editing A Post / Thread Bug
241
views
15
comments
0
points
Most recent by
Vindaloo
May 16
Web Site Feedback
More Discussions
Community
Copyright
Developer
Terms of Use
Privacy
Unknown Worlds Entertainment Logo
© 2013,
Unknown Worlds Entertainment
. All rights reserved.
Visual Design by
Fully Illustrated