Jump to content
The Dark Mod Forums

Simple animals


Baddcog

Recommended Posts

I got him switching again. I think I had cut out alot of stuff in the def because he wasn't quite done and I was just testing him. Not really sure anymore.

 

Anyway, I've just been waithing to upload my progress as I've gone back and redone the anims. I'll upload his current state but the walk is slightly buggered and I'm gonna redo that, he's slow so the main thing is speeding him up. I had moved the origin bone vertically too which stuck him into the ground. Had to add another bone to fix it, not the up/down motion won't play in Doom though it's fine in Max, so the walk will be fixed.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

  • Replies 179
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Alright, took a new approach to him this time.

 

I made a simple walk anim consisting only of foward movement to test his speed. Looks like 4x the distance over 20 frames is good.

Glad I did this instead of animating him for 2x the distance. Now just to make his legs move that fast :D

 

Scamper will be quicker yet.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

I don't know if the rat would actually 'walk' very often anyway. Small animals shouldn't be set to 'patrol' as it would look quite unnatrual. Couldn't the rat just have some idle animations (one of which might involve a few steps forward), and then just 'scamper' any time it needs to get somewhere specific? I haven't seen that many rats roaming around freely, but I know that mice never seem to actually 'walk' more than a few steps--if they go further than that, they're generally scampering/running.

Link to comment
Share on other sites

Well, in T2 it was common to have rats trol. Of course that and standing there was about all they could do.

 

Anyway, I'm just about done with the new walk, just finishing up the tail. Sometimes it takes me a few tried to even really understand what I'm trying to accomplish, I still haven't done enough animating to have a good solid base.

This time though the walk is going smooth :D

 

It's only gonna be a 10 frame walk cycle so really small file size. I do think authors will expect to have the ability to trol as it was so common in T2.

Personally I think that should be minimal though. But rats do get around so I think it's good to include.

 

I guess the biggest thing is it would be good to institue some kindof random patrol in a small area. They aren't going to walk around a city, they'd probably stay close to home. But they still should move around in a small area (10-20 feet). Walk, sniff about, walk, get on hind legs... looking for food and whatnot. I think the scamper could be thrown into that also, but mainly scamper should be to get away from an ai quick if it's gonna get stepped on. Maybe scamper for 10 feet then resume random anims.

 

We could do anims with him wandering in a 10 foot circle (example) but it would be a very large anim and file size. Would be better to script the behavior and use small anim files to accomplish it. Also, if it was an anim of moving in a small area it would be very repetitve and noticeable.

I think scripting could make it very random and unpredictable.

 

This was an issue I had with the butterfly. For him to take off in flight from a bush, fly around it and land (to complete the anim) ended up with a very large anim file. It was also very repetitve.

So even for a butterfly/dragonfly I think we're gonna need some very basic flying animal scripts. Then we could make a very small wing flap anim and either have the player trol them, or have a random flight script.

I think greebo would have to handle that, didn't sound like Crispy was interested.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

We could do anims with him wandering in a 10 foot circle (example) but it would be a very large anim and file size. Would be better to script the behavior and use small anim files to accomplish it. Also, if it was an anim of moving in a small area it would be very repetitve and noticeable.

I think scripting could make it very random and unpredictable.

I agree, and this is quite possible with scripting. Way back when our AI were just starting out, I wrote a "search" algorithm that basically did just that, wander around randomly within a given area (the radius of the area was defined by spawnargs). Basically it would wander for a time, return to the center of the area, wander for a time, etc. It didn't look very believable for intelligent human beings searching for an enemy, but I think it could work very well for simple animals searching for food.

 

I'm not sure if we can actually re-use the old script now that our AI have been overhauled so much, but it was a simple algorithm that should be easy to reproduce.

Link to comment
Share on other sites

Yes, I think that would much more realistic than a rat/cat/etc patrolling from A to B to C and back to A again.

Link to comment
Share on other sites

Awesome, I'd love to see someone pull it off since I am clueless to all that.

 

I suppose this could be very handy with small flying creatures too like butterflies/dragonflies. I hadn't thought about it but they can just be 4 feet above the origin. No reason that we actually need 'flying' creatures.

 

I guess the biggest issue would be bounding boxes. Would it reach all the way down to the origin on the floor or can it just be around the mesh itself? I'd think the origin would be a part of the mesh, but as it doesn't actually contain any verts I don't know.

Either way I don't suppose they'd be able to fly over solids like a barrel or brick, but they could 'fly' over non-solid bushes.

They probably have to have some kindof of bounding box no matter how small just so they don't fly into walls/Ai/ect...

We could mix up their anims so one would be low, one high, ect... and it would really make their flight seem random.

 

I might mock up the butterfly like that just to see how it goes.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

No reason that we actually need 'flying' creatures.

 

Well, we do, actually, for fire elementals. But it probably isn't necessary for something like a butterfly.

I guess the biggest issue would be bounding boxes. Would it reach all the way down to the origin on the floor or can it just be around the mesh itself? I'd think the origin would be a part of the mesh, but as it doesn't actually contain any verts I don't know.

Either way I don't suppose they'd be able to fly over solids like a barrel or brick, but they could 'fly' over non-solid bushes.

 

That's actually how fire elementals work atm. They 'fly' at a set height above their origin. Anything a regular AI could step onto or over, the elemental flies over, it just raises in the air a little as it does so. They can't get into small spaces, which is not ideal for elementals, but that would probably be sufficient for an insect.

Link to comment
Share on other sites

OK, rat is up to date and working great.

 

Hmm, when I load him I get the same behaviour as before...he just loops his get-on-hind-legs animation over and over again. I tried shooting him with an arrow and the arrow broke.

Link to comment
Share on other sites

umm, I've uploaded all the current files and he'll chase me around the room. (Kindof slow for a chase scene but...)

 

Right now he is set -up to play the hind leg anim, but if he sees you he should walk towards you.

 

Yeah, I noticed that arrow thing too, he's a tough little bugger. A fire arrow will kill him though and then you can throw him around, it's actually quite fun.

 

I think he has like 80 health which is just what the file had, obviously he needs some final tweaks but he should walk towards you at least.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

Hmmm, I'm really liking this guy, but he still behaves weird for me. He still loops his standing on hind legs animation over and over. After I alert him, he'll spin to face me, but still plays that animation. One time, when I was shooting fire arrows, I did notice him walk forward a bit, and then he stopped and seemed to be playing some other kind of animation, though he was clipping the ground and might have been stuck.

 

One cool thing, I was able to pick him up while still alive. He dangled in front of me twitching like I had picked him up by the tail. It was hilarious, and at the same time relatively believable (couldn't throw him though, he just dropped when I tried).

 

I think the textures could use a bit of tweaking as well...the normalmap is a little strong in spots, especially on the tail. And the grey colour on his head is pretty light--makes him look a bit patchy. I still can't get over how much better he looks than the TDS one. :)

Link to comment
Share on other sites

Hmmm, I'm really liking this guy, but he still behaves weird for me. He still loops his standing on hind legs animation over and over. After I alert him, he'll spin to face me, but still plays that animation.

This is because there is no run animation yet, so the poor rat is stuck on idle and can't switch.

 

One time, when I was shooting fire arrows, I did notice him walk forward a bit, and then he stopped and seemed to be playing some other kind of animation, though he was clipping the ground and might have been stuck.

 

One cool thing, I was able to pick him up while still alive. He dangled in front of me twitching like I had picked him up by the tail. It was hilarious, and at the same time relatively believable (couldn't throw him though, he just dropped when I tried).

Sorry that I have to say this, but the rat was already dead. What you could see was the "dead AI twitching" bug (which is already fixed). He clipped into the ground for me too, but I don't know why this can happen.

Link to comment
Share on other sites

thanks.

 

You should try notarget and shoot a noise arrow, then you'll see his walk anim for sure.

 

When you shot the fire arrow you did kill him, that's why you can pick him up. But he's got the same issue I brought up before, there is no death anim and that's why I believe he doesn't stop moving.

The reason I've determined is that only 3 of his joints are tied to constraints[AF bodies] (Head, groove_bone [i think for the body], and tail1 for the tail). So those joints stop animating, thus the weird clipping into floor. Other joints are still moving and make him bend down without the groove_bone's anim making him adjust to stay above ground.

 

So he's still got 3 spine joints, neck joint, 6 leg joints, 4 arm joints, and 3 tail joints that don't stop.

 

It just occured to me that I could probably use the AF pose anim as a death anim, that would stop his joints moving if death anims do work.

 

The lantern bot does it too, but when I set up his Af I wasn't aware that you could lump a bunch of joints into one AF body. So he's not as efficient after death, although I don't think he really taxes performance any. I didn't put a body on his gauge and it still moves after death.

 

I do have 2 local maps for him, I'm gonna copy paste the top of his back from this current local and paste it onto the old local and I think it will turn out pretty good. His back was too smooth in the last vers. I'm gonna leave his colors as is, I just hacked apart a pic of a rat sparhawk had posted. But I'll try and make another skin too that is all darker. His tex is 1024 right now but there's really no reason they can't be at least half that size, he's so small it's just a waste of pixels. 256 tex might even be plenty good enough.

 

I wish I could sleep... got a bit of the flu and all I'm doing right now laying down is coughing. I think I slept 2 hours total tonight. :(

 

@angua, he actually does have a scamper anim, but the def file needs work. I haven't had much luck getting him to do more than one anim while searching (so the def has either been walk or scamper), and he'll do the back leg thing again when he sees ya.

I'm not very happy with the scamper though, it's more like bunny hopping. Although once we have some random stuff going (greebo's gonna do that) I think it'll be a good one. I did see him jump only once and it looked cool, but if he plays it all the way across the room it's odd. This is why I'm staying away from animating the humans, this little bugger is tough enough :)

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

But he's got the same issue I brought up before, there is no death anim and that's why I believe he doesn't stop moving.

 

It's not related to a death animation--AI don't actually need one. As Angua said, it was because some animations were continuing to play after death. Sounds like it's fixed now.

Link to comment
Share on other sites

Well, I just checked and tried to use the af_anim (single frame no movements) as a death anim, doesn't work. So I made a quick 3 frame death anim. He still moves.

 

I think it lies here:

"inherit" "atdm:ai_base"

 

The spider also uses this, I haven't tried spider today but my guess is he still twitches.

 

The guards use this:

"inherit" "atdm:ai_humanoid"

 

Is that where the fix was done? I'm sure once greebo has a small animals or whatever in place it will solve this issue as we'll be using a more specific class but it probably wouldn't hurt to fix it at ai_base if possible.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

Strange, you shouldn't get the twitching anymore. Are you synced with SVN? The changes for this are in scripts/ai_darkmod_base.script, around line 700. There should be a disableAnimchannel function in Legs_Death and Torso_Death.

 

The problem with the rat not running away was also caused by a bug in the flee task, which is fixed now on my end. (Your rat has already helped my squashing two bugs in the ai code, I really like him :) ) I've also added a run anim in the rat def (which is also the scamper anim) so that he can at least hop away.

Link to comment
Share on other sites

umm, der, DOH ! No I didn't synch first. Retract that statement until further testing has been done...

 

Glad he's helping you out, he's a kindof filthy but he's not a bad guy. ;)

 

OK, he stops animation if I shoot him with an arrow. But not if I shoot with a fire arrow. Haven't tested other weapons yet, I was only using a fire arrow cause I've bben testing them and it's an assured hit, hard to hit him from distance with an arrow.

But the lantern bot's anims do stop now when he's hit with a fire arrow, so it's gotta be something with the rat. His health is really low and I wonder if that's it.

Dark is the sway that mows like a harvest

Link to comment
Share on other sites

  • 3 months later...

I've adjusted the rat's entityDef so that the rat can go into patrol mode again. I also changed the AAS size of the rat to 20x12x16, which fits the model far better then the 32x32x82 bounding box our AI are using. (I also uploaded a test/rat.map testmap).

 

I've noticed that the scamper animation (which is used as run animation) has rather long pauses between the hops, which makes the rat rather slow. The ordinary walk animation is also quite slow.

 

@Baddcog: Can these two animations be tweaked to be (much) faster, especially the scamper anim? Right now you can walk along with the rat, it should at least reach the player's run speed.

 

I'll try to implement some special rat patrol algorithm, which fits the AI. A separate path_corner-like entity will be needed for that, I reckon.

Link to comment
Share on other sites

I'll try to implement some special rat patrol algorithm, which fits the AI. A separate path_corner-like entity will be needed for that, I reckon.

 

Couldn't you use some kind of variation of your 'flee' behaviour? My memory is sketchy, but I thought fleeing AI did not run to pathnodes but to AAS locations far away from the player. Could rats and other ambient animals do some kind of similar, random-AAS pathing?

Link to comment
Share on other sites

Yes, I could use this one, but I had something more rat-like in mind. Instead of choosing a random point and linearly running towards it (and repeating that process), I intended to let the rat run around in more "curve-like" paths and let it randomly stop and stand up on its back feet. Something like that. This applies to idle rats only, of course. Fleeing rats will just use the existing algorithm.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recent Status Updates

    • Ansome

      Finally got my PC back from the shop after my SSD got corrupted a week ago and damaged my motherboard. Scary stuff, but thank goodness it happened right after two months of FM development instead of wiping all my work before I could release it. New SSD, repaired Motherboard and BIOS, and we're ready to start working on my second FM with some added version control in the cloud just to be safe!
      · 0 replies
    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
×
×
  • Create New...