Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

which concept will be laggier?

Senuka Harbinger
A-Life, one bit at a time
Join date: 24 Oct 2005
Posts: 491
06-14-2007 15:32
I've been contracted to create a scripted sequence for a vehicle which has to dock with a platform, drop off a cargo package, fly across the sim through a series of waypoints, pick up a cargo, and then return to the platform to repeat the cycle.


I have no problem doing any of these steps, but I'm at a dividing line in terms of how I should implement my work: I can do this easily enough with a non-physical vehicle (moderatel difficult), or I could implement a low-level AI to control a physical vehicle (moderately difficult, but more potential for things to go wrong).

My big concern will be sim lag, as I'm not sure which method will be faster. Here are some key points for each:

Non-physical
*Fast timer loop to spout off link messages to a distributed set of scripts for llSetPos() and llSetRot() calls bypassing the .2 second script pause for each call.
*Waypoints can be reached exactly, as well as exact positioning/rotation of the vehicles for docking purposes
*griefers won't be able to physically interfere with the vehicles' progression
*would have to code my own "physics" to handle realistic turning and accelleration/decelleration in a believable manner.

Physical
*fast timer loop for the AI to check position, velocity, and rotation and to make adjustments to the controls of the vehicle
*would need to use at_target() and not_at_target() events to determine if it's reached it's destination yet
*would need to switch to a non-physical movement state when docking and dropping off cargo to have exact rotations/positions align up
*smooth movement for any observers.
*susceptable to outside interferrence.



both methods have their good and bad points I think, so going either way would be the same amount of effort in my book. my big concern is how badly would both methods impact the sim? I'm planning on using a timer loop of .1 seconds for either implementation.
_____________________
My SLExchange shop

Typos are forgiven; desecrating the english language with reckless abandon and necrophilic acts is not.


The function is working perfectly fine. It's just not working the way you wanted it to work.
RJ Source
Green Sky Labs
Join date: 10 Jan 2007
Posts: 272
06-14-2007 15:55
The physical vehicle seems to result in smoother movement for the rider, and also more realistic responses to the drivers commands, especially when the route is not predictable. But all at the expense of more processing power. If there is not going to be a rider or driver, and the route will be fixed, then I'd go with the non-physical.