Game Development Reference
In-Depth Information
When you need to use scripts like these in great quantities, you should keep an eye on the performance
of the sim and check periodically to see if you are running eficiently. You can track the impact of your
scripted objects with the performance tools provided in the viewer[1]. You will ind the lag meter and
the sim statistics window under the top bar menu, Advanced/Performance tools in Firestorm viewer.
(Note, if your Advanced menu is not showing, it can be activated under the Avatar/Preferences/Advanced
tab on the top bar menu.)
To keep an overview on the server, check the lag meter. The lag meter indicates client, network, and
server lag, with “stoplight”-based graphic indicators for each lag type. Green is good, yellow indicates
some drag on the system, and red is a serious problem with your connection or client.
After you have checked the lag meter, open the statistics window. As you read down the listings on
the statistics window, note the frame rate given in frames per second (fps). A good range for frame rate is
around 15-30 fps for a virtual world. This is much slower than what you would have in an action-based
console game, but it is acceptable for the exploration of a virtual world space. Also look at these three
things in the statistics window: Ping Sim, Packet Loss, and Time Dilation.
The Ping Sim value measures the time (in milliseconds) that it takes for a packet from the viewer
to reach the server. A high number such as 150 milliseconds and above could indicate your network or
Internet connection has a problem or is too slow, or you have just turned your draw distance up too high
and are looking at thousands of objects within that view. Many things affect Ping Sim, and all should be
taken into consideration.
If Packet Loss is greater than zero, there may be a problem with your network or ISP (Internet service
provider) connection.
Time dilation is usually the best indicator for lag; the lower the number is, the better.
Remember, your viewer is doing lots of work, so much of what is considered “lag” may be caused by
your graphics settings and the speed of your graphics card. Try always to have your graphics set for what
is minimally acceptable unless you need to have ultragraphics performance for a snapshot or machinima.
14.9 DEBUGGING AND TESTING AND THE IMPORTANCE OF THOSE TASKS
Eventually, you and your scripter will create that special door or vehicle script that you hope will provide
many useful options for the avatars that use the content you make. Now, how do you test it and add the quali-
ties to make it bulletproof?
You should expect a thorough debugging of all new code from good scripters. They do this in various
ways. They can run the code in test objects under various conditions, such as crowded sims or heavy lag, or
they can utilize the Debug Functions that are available in the viewer to force the system into a demanding
testing mode. Other ways they should test your new script is by running it under other operating systems,
such as the Mac OS and Linux. Scripts that will compile and run in Windows may give error messages in the
Mac OS or not run at all on a Linux-based machine.
Other reasons to test in various systems and conditions are the differences in various LSL editors and
how they will report error messages differently to the script writers. In fact, there is an integer constant
DEBUG _ CHANNEL that is reserved for script debugging and error messages. This is a special chat chan-
nel used for script debugging and error messages. The viewer will display chat on this channel in the script
console to help the scripter ind their errors.
The inal test of good scripting will come when the object and its script are set up by the scripter to be
tested under live conditions, called “play testing.” These sessions are useful, especially if you and your
scripter can have a wide variety of people test the item in question.
Search WWH ::




Custom Search