ANALYSIS OF NPC & ANIMESH PERFORMANCE ON KITELY

Talk about anything, whether on topic or off topic
Post Reply
User avatar
Snoots Dwagon
Posts: 422
Joined: Mon Jul 30, 2018 9:45 pm
Has thanked: 442 times
Been thanked: 779 times

ANALYSIS OF NPC & ANIMESH PERFORMANCE ON KITELY

Post by Snoots Dwagon »

ANALYSIS OF NPC PERFORMANCE ON KITELY

Halloo dere! Snoots here. I've been part of discussions regarding NPCs, animesh, and scripts in general as far as performance on Kitely. So just on a whim I thought I'd run a test using a standard NPC generator. Function: To create and animate an NPC.

For those not acquainted, an NPC is a "non-player character"... in the case of virtual worlds, an artificial avatar with no user on the other end. NPCs are limited in function, able to perform only the tasks they're scripted to perform.

Note that this test involves ONLY generation and animation of dancing NPCs. Whether or not functions beyond that have impact on a world depends on the additional scripting involved. One must always be aware of poorly-written scripts.

To perform this test, I checked stats on an empty sandbox, then rezzed 50 (fifty) NPC generators consisting of several different dancing NPCs. Then I compared the two stat boxes line by line. Here are the results:

UDP data rates remained relatively unchanged (this figure fluctuates regularly, but the range of figures was similar)

Sim FPS & Physics FPS were unchanged

---> AGENT UPDATES PER SECOND: Showed -2... so not sure this measurement is accurate / valid. But the NPCs registered no agent updates.

Objects: As would be expected, for 50 "avatars" Objects increased significantly. I used pretty detailed avatars. So NPC's do count as "objects". However although there were 50 NPCs, that had no discernible affect on region or Viewer performance. This is significant, because 50 avatars would most certainly affect both server and viewer performance. Conclusion: NPCs are not "avatars".

---> ACTIVE OBJECTS: 0

ACTIVE SCRIPTS: jumped from 5420 to 5765. That is likely due to the fact i didn't de-script the NPCs before genning them. When creating an NPC it is good to make sure it is fully de-scripted and contains only the script(s) necessary to NPC performance.

SCRIPT EVENTS however only jumped from 455 to 462, indicating those active scripts are taking very little overhead (a .01% increase).

TOTAL TIME FRAMES showed no impact throughout.

ANALYSIS and OBSERVATIONS
NPCs do not appear to lag the server at all. They may have some effect on less-powerful, low-graphics, slow computers due to the fact that they are generated viewer side, but such computers would likely have trouble with most worlds, with or without NPCs.

Observation: NPCs are not actually avatars; they are images of avatars. They do not have users. Data is not being constantly sent between the NPC and an external user. The NPCs are "static"; despite appearances they do not move at all. The animation is created viewer side. NPCs are phantom so they have zero impact on physics. It would thus be expected that NPCs have no measurable affect on the server system, and very little effect on standard Viewer systems. There is an increase in Objects (depending on the form of the NPC) but that does not seem to impact region / world performance.

The only disadvantage I can find is that the Viewer does not differentiate NPCs from regular avatars on the Main Map and Mini Map; it shows green dots for NPCs and Agents (avatars) alike. This can be handy in role playing situations, or disappointing if one is looking for local folks to chat with and is checking out map dots. That situation is of course, for the world owner to decide.

In moderate use, NPCs can serve a valuable function and seem to have no more impact on a region than any other object. Data indicates they take approximately the same amount of resources as animesh: virtually none server side and only minimal impact on the Viewer side.

ANIMESH
In this discussion I am mentioning ONLY decorative animesh items, not operative items such as riding horses.

Animesh refers to animating a rigged mesh creation so that it moves. Kitely WIKI recommends that all animesh creations be PHANTOM so they don't affect physics. This is sensible; a mesh creation is an OBJECT... something one doesn't wish to constantly collide with other objects.

In all tests, the indication is that animesh has no more impact on a region than any other object, nor any more impact than an NPC (perhaps even less since mesh creations often have fewer "parts" than NPCs). Like NPCs the movement on an animesh is Viewer-side; in reality the object isn't moving at all. Thus there is nothing to impact server-side performance. As far as the server is concerned, the animesh object is a scripted rock... and that script is non-active (only runs at trigger-time, such as when touched).

So in summary (and this is an important "if"): IF the NPC/animesh script is zero-lag scripted (not an active script), NPCs and animesh will have very little or no effect on system performance. As with any creation they can have emotional effect on visitors (to varying degrees), which is a concept world owners always should take into consideration when designing their world for visitors. In other words, one would want to consider the need / wisdom of setting up 100 NPCs on a world. There are instances in which that might be beneficial, and instances where it would be counter-productive. If one feels an NPC here or there is beneficial to the world, I can find no technical reason to not use them.

Performance-wise, tests conducted determined near-zero effect of well-designed NPCs or Animesh items on world performance. I hope these findings are of assistance. : )

-- Snoots
These users thanked the author Snoots Dwagon for the post (total 2):
Dot MatrixAda Radius
~~~~~~~
I'm a dwagon in real life too. (Ask my sister, who totally agrees.)

~~~~~~~
Post Reply