Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Animation Override - Roll Your Own?

Circe Silvera
Registered User
Join date: 11 Jan 2007
Posts: 11
10-07-2007 08:46
Hi,

I'm learning about animations and have successfully created a simple one, uploaded it, and so on. The next step would be to apply the animations at the right times. I know that people often use existing AO scripts to do this.

It seems to me I'm at the classic buy vs build point. I'm sure it's quicker and easier to use an existing AO script, but are there advantages to doing your own? The first one that comes to my mind is that a custom AO would not have to parse a notecard in order to determine what animations to run, so it would seem to be more efficient. I'm sure there are a lot of pitfalls to writing your own too though.

Has anyone written their own AO? If so, what were the advantages and disadvantages?

Thanks!

Circe
Django Yifu
Beat Island Gaffer
Join date: 7 May 2007
Posts: 189
10-07-2007 10:06
I haven't written an AO but there are a few free and open source ones floating around.

I highly recommend the Wet Ikon powered by the Franimation script. Does all you need, responds to voice commands, easily configured for different anim packages.

I find this more useful as an attachment than the ZHAO HUD AO. I try not to use HUDs as I find it spoils my enjoyment of SL.

There are others but once I found the Wet Ikon I didn't feel the need for anything else. Best of all it's completely free. Only problem I can't remember where I got mine. Bet it's on the forums somewhere though.
_____________________
Tread softly upon the Earth for you walk on my face.
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
10-07-2007 10:48
From: someone
The first one that comes to my mind is that a custom AO would not have to parse a notecard in order to determine what animations to run, so it would seem to be more efficient.


Depends on your understanding of 'efficient'. The notecard is parsed when the user issues the load command. After that, the list of animations that need to be played is held in memory. So you'd be able to remove the code that handles notecards, and end up with a smaller script, but in terms of run-time efficiency (i.e. when the AO is overriding animations), that doesn't make any difference.

I wrote ZHAO and ZHAO-II. The core override mechanics are the same as the Franimation script, written by Francis Chung. I would suggest picking up either the Wet Ikon or the ZHAO-II and looking through the code. Francis' script has some non-obvious things in it, mostly with comments like "SL breaks if you do this, so the script must do this instead" or "The av gets stuck if you play this animation on top of that animation, so add a check for that" or "SL sometimes sends the wrong value here, so check for it"... you get the idea. This is knowledge that she's gained through years of working on AOs. When I took that script and wrote ZHAO based on it, I tried my best to leave all those little quirks in place. That was one wheel I had no intentions of trying to re-invent.

So... I would recommend taking a look through that code before trying to roll your own. It's definitely possible that you'll come up with a more efficient AO if you start from scratch, but I think it might be helpful for you to get some idea of the idiosyncrasies that your script would need to work around.
Lucy Zelmanov
Registered User
Join date: 19 Feb 2007
Posts: 178
10-07-2007 21:35
Zhao 2 ! I use the zhao and love it I realy hate having to type commands in chat to do things and prefere the hud for this. Where can I get the zhao2 and does it allow for fine tuning of animations? I have a few ground sits that are "up in the air" or "up to the waist in the ground" when I use them, it would be nice to be able to adjust the position of these via notecard, so I am actualy sitting on the ground.
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
10-07-2007 22:47
From: someone
Where can I get the zhao2


See my profile in-world.

From: someone
I have a few ground sits that are "up in the air" or "up to the waist in the ground" when I use them


This is an animation that wasn't designed for your av's height. There's nothing a script can do about it. The script only says "play this animation", it's the animation that controls where your av goes. For a poseball, a script can also say "put the av here". But an AO isn't a poseball, you're not sitting on anything, so there's no way to change the position of your av. I'm sorry.
Circe Silvera
Registered User
Join date: 11 Jan 2007
Posts: 11
10-08-2007 02:55
From: Ziggy Puff
Depends on your understanding of 'efficient'. The notecard is parsed when the user issues the load command. After that, the list of animations that need to be played is held in memory. So you'd be able to remove the code that handles notecards, and end up with a smaller script, but in terms of run-time efficiency (i.e. when the AO is overriding animations), that doesn't make any difference.


I suspected it was something like that. So the only benefit to a "dedicated" AO is a slightly shorter load time and a bit less code.

From: someone

I wrote ZHAO and ZHAO-II. The core override mechanics are the same as the Franimation script, written by Francis Chung. I would suggest picking up either the Wet Ikon or the ZHAO-II and looking through the code.


I really appreciate your response -- your kind of experiences are exactly what I was hoping to hear about. I've just picked up ZHAO II, along with the mods and HJAO, and will spend some time looking through the code. It sounds as though for this build vs. buy decision the right call is "buy".

From: someone
It's definitely possible that you'll come up with a more efficient AO if you start from scratch, but I think it might be helpful for you to get some idea of the idiosyncrasies that your script would need to work around.


I'll look, but I suspect I'm going to find that there isn't any point to trying to build my own from the ground up...unless there is some little wrinkle that I need that doesn't currently exist.

Thanks again for your thoughts!
Ziggy Puff
Registered User
Join date: 15 Jul 2005
Posts: 1,143
10-08-2007 12:47
From: someone
So the only benefit to a "dedicated" AO is a slightly shorter load time and a bit less code.


A lot less code :) I implemented a more flexible notecard format in ZHAO-II, and underestimated the amount of code needed to handle that gracefully. I'm sure you could pack in a noticeably larger number of animations into memory by removing the notecard parsing logic. I strongly considered farming out the notecard read to a different script for a while. Might still do that at some point.

From: someone
It sounds as though for this build vs. buy decision the right call is "buy".


It depends on what you're trying to do. if you want an AO so you can make animations, then yeah, maybe use the ones that are around today, because they're not too bad (IMO) given the constraints they operate under (again IMO). If you're trying to write the next generation of AOs - it would be ridiculous for me to say "Don't bother, what we've got now is as good as it can be". I would absolutely encourage you to look at the problem with a clean slate, and see where it takes you. But only if you're interested in trying to solve that problem.