IA Logo


IA Information
Communication

Dave Mark's books

Post-Play'em - Observations on Game AI


Half Life 2: Paying Attention to Me

When I posted my first observation on Half Life 2, “Movement on Rails” the other day my colleague, William van der Sterren commented that one of the cool things that they did in HL2 was making the NPCs acknowledge the player’s position during conversations. While I certainly agreed at the time, I thought this was limited to eye contact and head position. That was just the beginning. I had not experienced the full depth of what they had done in the game.

Last night as I was playing some more, I had some of the extended conversations at Black Mesa East. As Dr. Mossman was walking me through the lab, I was surprised to not only see her turning her head, but even walking backwards (convincingly well) at times so that she could continue to face me. I’m tempted to go through that section again just to mess with her. If I keep moving, does she keep changing?


Anyone who has coached kids playing baseball has probably taught the drill of how to watch the ball as you are running backwards. Part of that drill is to change sides without turning your head. That is, looking over your left shoulder, then turning your lower body to run with the other shoulder leading so that you are now looking over your right shoulder. I think it would be interesting to watch the NPCs in HL2 react to that sort of situation.

All in all, I agree with William that it was a new point of immersion for a game NPC. More specifically, it worked to not break the suspension of disbelief simply because it looked natural.

Monlogue Breaks

On the other hand, there were awkward pauses in the monologues of the various characters. Sometimes, I figured that they were waiting for me to cross an invisible trigger threshold. That is, as they entered a room, they waited for me to cross through the doorway that they were then going to close behind me. However, the next line of monologue was put into the same queue as the actions such as closing the door. Therefore, they could not proceed with their spiel until such time as I allowed them to close the door. If I had not moved, they would never have continued.

A solution for this would be to have a separate queue for the speaking and the actions. However, the speaking could be superseded by ad hoc lines such as, “Come on through the door so I can close it behind us.” and then continuing on with the monologue. This shouldn’t be too difficult to do with a priority-based system. The insertion of the vocal line “Come on through…” would be a higher priority than the other lines. As each normal line finishes, it triggers the insertion of the subsequent line into the queue with the appropriate priority. If there is nothing else more pressing, it would chain right on the end as per usual.

One of the effects you can pull off with this method is reaction-based stuff. For example, I was dying to fire my pistol into the ceiling during some of the speeches and conversations. Would they have reacted? I don’t know about HL2, but in other games, probably not. However, a priority-based system would override whatever sequence is being dictated with “What the hell are you doing?”, a few follow-ups about shooting weapons in the house (“You’ll put your eye out, kid!”), and the revert back to the regularly scheduled monologue.

Another effect would be acknowledging random people walking by. For example, during the hallway monologue, Dr. Judy could have received an event that a colleague was approaching coming the opposite direction. She could have inserted a slightly higher priority event to say “Hi” to the person in between lines of her monologue. She would say “Hi” at a break between lines and then go back to what she was talking about. Sure, there are caveats that you have to look for, but the inclusion of simple mechanisms like this work in a similar fashion to the head-turning one. They look natural and therefore feel natural to us.

(Remember to check the other Post-Play’em observations on Half Life 2.)

Tags: ,



Leave a Reply

Add to Google Reader or Homepage




Content 2002-2018 by Intrinsic Algorithm L.L.C.

OGDA