Jump to content
The Dark Mod Forums

Elite Guard Turn Left 90 Degrees


Domarius

Recommended Posts

I'm saying D3 does not leave it up to the anim. Their scriptfunctions and pathfinding turn the AI in arbitrary directions all the time. What happens when an AI reaches a pathnode and then to reach the next one, they need to take off at a direction 45 degrees from their original path? I'm not sure whether it starts to play some turning animation and then stops, or what? Maybe we could look at how they did it for their AI.

Link to comment
Share on other sites

  • Replies 97
  • Created
  • Last Reply

Top Posters In This Topic

I don't mean always leave it up to the anim, I mean where the anim shows actual movement, then you leave it up to the anim where possible. D3 does this, all the walk cycles are animated with movement, not walking on the spot.

 

This isn't a turning while walking anim which should be turned with the code, its a "patrol turn on the spot by 90 degrees", which is better left to the animation.

Link to comment
Share on other sites

That's not what the mapper does. The "patrol" settings are a list of finite possibilities, as in DromEd, such as "turn 90 left" every "5 seconds" or "turn randomly" every "10 seconds".

 

In DromEd, a guard can turn 90 left, 90 right, or 180, as far as standing guard goes. That's pretty sufficient and can be animated beleivably without sliding feet due to any sort of interpolation.

Link to comment
Share on other sites

Don't just make assumptions without checking. If you look at the path_* entities in D3 you'll see path_turn, which tells the AI to turn to whatever arbitrary angle the path_turn entity is facing. If you don't believe me, here's the code:

 

Doom3/base/script/monster_base.script (also in darkmod/script/ai_darkmod_base.script)

void monster_base::idle_followPathEntities( entity pathnode ) {
// ...

current_path = pathnode;

// ...


/*
=====================
monster_base::path_turn
=====================
*/
void monster_base::path_turn() {
vector ang;

ang = current_path.getAngles();
turnTo( ang_y );
while( !facingIdeal() ) {
	if ( checkForEnemy( true ) ) {
		return;
	}
	waitFrame();
}
}

 

You'll see that if a mapper places a path_turn, the AI will turn to whatever angle the path_turn entity is facing.

 

If we wanted AI to only be able to turn 90 degrees, 180 degrees, etc, we would have to mod D3 and actually remove functionality that's already there. That's not a very good mod IMO. :)

 

We should look at how Id got their AI to look like they're turning smoothly to face you at any arbitrary direction. Maybe they made a short turning animation and looped it, maybe they made a few, maybe they're just statically turning on the spot and no one noticed. We won't know until we check it out. Btw, idAI::turnTo is a scriptfunction I'd have to look at in the SDK.

 

You can do what you want with a path_anim, that just plays the turn 90 degrees animation every so often, but there may be a more general way to make AI look like they're turning smoothly to any direction.

Link to comment
Share on other sites

I just checked and the D3 zombies seem to have no "turn on the spot" animation, they just pivot statically. You can see this in test_water. Climb up to the platform with the zombie on the island so he sees you, then go into noclip and fly around. He'll pivot to face you as you move around, without moving his body at all.

 

I guess no one noticed this in D3 since it looks okay to do that when the walk animation is playing, since you trick yourself into thinking they're turning normally while walking, and the D3 monsters were usually either standing still facing one direction or walking/running at you to attack.

 

I guess mappers will have to use path_anim with different turn animations (90 and 180 like Domarius mentioned) if they want to make AI turn on the spot without walking. That seems rather awkward though, if you want them to turn and face some important loot object and then turn to face a door, you'd have to make sure in the map the door and loot object were exactly 90 degrees from eachother. Maybe we can make a new path_turn or something that plays the turning anim closest to the angle and slides or blends the rest of the way?

 

Out of curiosity, how would it look to start the turn 90 degrees anim and then blend it into a standing still at 45 degrees to the original orientation? Would that look like a believable turn to 45 degrees? Their planted foot might slide a bit, but it's better than nothing.

 

Maybe if we had turn 90, 45, and 180 directions, we might be able to get away with turning to an arbitrary direction using the closest turn anim (or combination of two turn anims like turn 90 then turn 45), and then sliding or blending the rest of the way. They might moonwalk/ice skate a bit but again, better than pivoting statically.

Link to comment
Share on other sites

That seems rather awkward though, if you want them to turn and face some important loot object and then turn to face a door, you'd have to make sure in the map the door and loot object were exactly 90 degrees from eachother.

 

The head can turn independently, though. Does the mapper have any control over that?

Link to comment
Share on other sites

I guess mappers will have to use path_anim with different turn animations (90 and 180 like Domarius mentioned) if they want to make AI turn on the spot without walking. That seems rather awkward though, if you want them to turn and face some important loot object and then turn to face a door, you'd have to make sure in the map the door and loot object were exactly 90 degrees from eachother.

No you wouldn't - the AI has a FOV remember? Those objects dont have to be EXACTLY 90 from each other, just within his view when he turns. This setup worked fine in Thief 2, it's simple and effective.

Link to comment
Share on other sites

We're aiming a little higher than T2, aren't we? I would think there would be plenty of situations where the FM author would want guards to be able to turn at something other than 90 degrees.

Link to comment
Share on other sites

I don't. 4 compass points is enough to cover everything.

 

This is not about "aiming higher than Thief 2", this is one of the times in a game development where finite increments of something is more benificial in terms of what little you sacrifice compared to the quality and efficiency of the end result.

 

Have either of you actually tried to make any Thief 2 maps anyway? Get the mappers into this discussion.

Link to comment
Share on other sites

Don't know what Thief 2 maps have to do with anything....

 

So you're saying that if a FM author makes a pentagonal room with hallways at each point, it will be impossible for them to make a guard turn to face each point? That they'll just turn 90 degrees each time and wind up facing the wall most of the time? How is that a good thing?

Link to comment
Share on other sites

Wait, what are we talking about here? Eliminating the ability to turn at other than 90 degrees to eliminate any skating? I think versatility is a tad more important that preventing a small slide in rare cases.

 

Their planted foot might slide a bit, but it's better than nothing.

Exactly.

Link to comment
Share on other sites

@Springheel

Thief maps - mapping for thief. Having to deal with guard placements. In your pentagonal room, his FOV is wide enough that 4 compass points are enough to cover all the openings.

 

@SD

It's not a small slide. Even the poor blending between anims in T2 was enough to look stupid and hurt immersion for me. Spinning on the spot will look considerably worse.

 

You guys go ahead and program it so that he can turn any possible direction.

 

I'm still going to animate it accurately because I know from experience that it's important in the long run.

 

So knock yourselves out.

Link to comment
Share on other sites

As I said, we won't have to program turning to an arbitrary direction, because it's already in D3. We would have to actually remove code and take a step backwards from D3 if we wanted to limit turning to 90 degrees only.

 

I was suggesting that we add in animations for turning 45 [deg] and turning 180 [deg], so that we can pick the closest one(s) and any sliding or blending would be less noticable.

 

You already have heard from a mapper saying he would be unsatisfied by a turn limitation of 90 deg, and we're making a toolset for mappers. What more do you need?

Link to comment
Share on other sites

You guys go ahead and program it so that he can turn any possible direction.

 

I'm still going to animate it accurately because I know from experience that it's important in the long run.

 

So knock yourselves out.

 

The only thing that is needef is a small animation that lifts the foot a little bit (on both sides). So when we need to slide, we can blend this animation and it should look realistic. Basically you can use the same animation for standing still and just shuffling the feet as well.

Gerhard

Link to comment
Share on other sites

You already have heard from a mapper saying he would be unsatisfied by a turn limitation of 90 deg, and we're making a toolset for mappers. What more do you need?

Did I leave you with the impression that I needed more in that last post? I thought my stance was pretty clear there.

 

I know we would have been taking a "step back", that was the idea - same principal as the discreet movement speed concept you suggested.

 

And you will have to do more work - you will have to pick the most appropriate anim for the amount being turned at least.

 

I imagine this wouldn't look too bad if I do the 45 degree one as well.

So there will be;

45 left

45 right

90 left

90 right

180 right - don't need a left

Link to comment
Share on other sites

Your stance might be clear, but we can't always stubbornly stick to our own view while ignoring what the FM authors we're making this toolset for are saying. If a mapper wants an AI to turn more or less than 90 degrees, it would be pretty silly to spend time removing the code supporting that.

Link to comment
Share on other sites

Did you even read what I wrote? If we have a simple "Shuffle Feet" animation, we can use that for rotating small degree. It would be the same animation that can be used for standing still and shuffling the feets, but it would cover the sliding for other then well defined degrees. So we have some animation for the major rotations and the shuffling. When the mapper wants to have 98 degrees we use the 90 degree full animation and do the rest with sliding and shuffling. The shuffling will cover the sliding, so it should still look convincing without adding all kind of animations.

Gerhard

Link to comment
Share on other sites

You guys go ahead and program it so that he can turn any possible direction.

There it is again for you guys.

 

I agree with you guys, but you can't see that because you're busy assuming the worst of me just because I was continuing to defend myself.

 

Spar - the 45 degree turn is essentially the shuffle you were talking about, I'm just formalising it.

 

I agree with you guys, there you can't say I wasn't clear enough this time, so can we get over it already?

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

    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 2 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
×
×
  • Create New...