I was going to post Fallout 3 as an example, and was thinking of that quest specifically. That has to be one of the most poorly thought out quests I’ve ever seen. IIRC, siding with either faction gets you negative karma. If you don’t kill all the vampires/cannibals before talking to the hostage, you get a failed quest, and the citizens of Arefu become hostile, which makes no sense whatsoever since they’re enemies. Fortunately, the rest of the game isn’t that bad, although when you kill an NPC in a town, it apparently sets off some kind of silent alarm to the rest of the town, even people in their basements. FWIW, I went the negative karma route on my play through, and killed the vampires because they were arrogant and rude to me. I then killed the citizens of Arefu for being ungrateful bastards. Which was kind of satisfying and in line with my character, although I did fail the quest.
There was a Medal of Honor game for the PC (I think it was Allied Assault), where the bad guys were always aware of exactly where you were and could hit you with pinpoint accuracy even if you were under heavy cover and they couldn’t possibly see or hear you moving around. It’s just lazy programming.
In the Civ games. I can’t move a unit past enemy units without taking a wide detour (which I can accept, I understand the concept of sphere of control), but then I have a city completely surrounded and under siege, and the computer is able to deftly slip a half a dozen units into the town by moving diagonally right between two of my adjacent units. BULLSHIT! It’s why I stopped playing Civ games.
Amen. I can be in the middle of the wilderness, in an abandoned coal mine, at night and kill some NPC. When I get back to town, everyone’s giving me the stink-eye. Do they have nanny-cams in those things?
I’m confused. You don’t have to kill any of the “vampires”, and it’s very easy to complete the quest with positive karma. You go chat with Vance a bit, and eventually ask to see Ian. You may have to jump through a few hoops before he’ll give you the passcode for the door (though there are a couple other ways to get the code). Then chat with Ian, deliver Lucy’s letter to him if you have it, or not, doesn’t really matter. Then return to Vance and you can broker a deal whereby the Family will cease attacking Arefu, or even provide protection to it. It’s a bit of sloppy coding for the latter protection deal that makes residents of Arefu and the Family all members of the same faction that trips the aggression of the one group after you’ve attacked the other, but the quest works fine if you’re not in killing mode on your way in.
Anyways, someone’s probably already made a mod that changes the quest to deal better with a few random homicides.
Isn’t all this crap just lazy programming? Obviously the method the AI uses to gather information isn’t being based on the senses the NPCs would use in real life.
That’s because neither side is really that “evil” or “hostile”, so wiping out one or the other is bad. Especially compared with the third option of arranging a mutually beneficial agreement between the two parties.
In Oblivion, I committed a crime in the capital city then got away and rode straight to another town. As soon as the town guards saw me, they tried to arrest me. WTF? Do they have telephones I don’t know about?
Nicely, the opposite thing happens in Far Cry. one of my missions was to assasinate someone. I tried to do it on the sly, using my machete, but people found out.
But all I did was ride out of town until the ‘escape the town’ message went away, and then rode staight back in and everyone had forgotten. NPCs have very short memories.
I was going the negative karma route, and decided to kill the vampires. Why this would have gotten negative karma is beyond me, which is why I thought the quest didn’t make any sense.
The vampires are attacking the town, throwing rocks at their houses, killing their cattle, and drinking their blood. Sounds bad to me. By contrast, the townsfolk aren’t guilty of anything except living on an overpass.
Presumably your crime was Observed by Forces Unknown. Or maybe Forces Known since they’re just the city watch.
Just as bad - “I’m not going to buy that knife/armor/torn bit of cloth from you, it’s stolen!” “How do you know that? Nobody saw me do it! I mean, erm…” “Ha, I didn’t need you to confess anyway - I could see it marked in your inventory. But don’t worry, even though I know you have stolen items I won’t report you to the city watch.”
At least with Oblivion they can honestly say, “A wizard did it”, as annoying and immersion-killing as it is. Fallout doesn’t have that excuse.
Line of sight checks tend to be pretty expensive computationally. You’ve got to trace an arbitrary line through the environment and test collision against lots of different pieces of world geometry. If you want to simulate real-world vision you need to do it multiple times a second and trace multiple rays to different parts of the player’s body to simulate the effects of cover. If you’ve got more than one enemy the number of calculations you have to do every frame can get unweildy quickly.
That’s why most games use some form of shortcut. They do purely range-based detection, or they exclude parts of the world from being included in the line-of-sight checks.
I agree that when it happens it sucks. And there are things you can do so it’s not so noticeable. But for a game programmer it’s not a trivial problem to solve.
Forgive me for saying, “It wouldn’t be that hard if …” but I think it would at least be nice to do range detection first followed by line of sight to/through the incoming missile/object as a double check. It would not add a great deal of extra time given the rarity of incoming shots, and might even feel a bit realistic, for example if you fire and duck out of sight you might not get noticed until they’re hit, but if you’re still standing in plain sight, their catlike reflexes will see you and react. That only goes to one part of the problem, but I think it would work (maybe it has been done already.)
Don’t most games have enemies that do LOS checks already? I know Mass Effect doesn’t because I’ve seen my team mates attempt to shoot enemies through walls (and me, on more than one occasion. Or maybe they just thought I was an asshole :p). The game does make a big deal about your character being able to duck and peek around corners, in fact it’s necessary. I don’t recall most enemies attempting to kill people through walls, just a few. My squad on the other hand, pfft. “Maybe THIS time I can do it.” <empties clip> “Hmmm, maybe THIS time one will get through.” It’s almost comical.
Anyhow, with a few exceptions, I’m pretty sure a lot of other shooting games including Fallout 3, the enemies do LOS checks, duck for cover, etc. I haven’t noticed anyone attempting to shoot me through walls or doors. Can’t speak for computer controlled team mates, as I only picked up the dog. So if they’re already checking for LOS, it can’t be that much more difficult to throw the same sort of deal into NPC’s. In range? Check. In sight. Check? Noisy weapon? Check. “Hey, you killed the shop guy! Help! Haaaalp!”. Fail one of those checks, and you get away clean.
I have played around a little with 3D game programming and LOS calculations are very much not trivial. To do true LOS coding for the NPCs, the computer would have to create a virtual screen for every NPC that you are in it’s detection range. Gad that was an ugly sentence, but you should get the meaning.
You want 20 fps while you’re playing. Even allowing a lower framerate and resolution for the NPC is going to be a noticable hit to your performance. Computers just don’t have the processing power to make it realistic yet.
We’ve mentioned Fallout 3 so I’ll assume you have played it some. When you go to VAT mode there’s a pause before it throws up the to-hit percentages. That pause is while it’s calculating LOS on all the target areas.
Most games at least do field of view and range checks. Some do a prioritized LOS check. In other words, objects are given a value and the computer will factor them in if it has free clock cycles. Starting with boulders and buildings down to vehicles and then bushes and smaller objects.
I’ve hijacked this thread far enough. Open a GQ thread if you want more information on the subject.
Suffice it to say, there’s just not enough processing power to do realistic target detection in games at this point in time.
EXACTLY! I’m not trying to go all out good, but I thought I was doing the noble thing killing the boss of a cult that, you know, murdered village folk and eats people. I even took a hell of a lot of shot in the ass trying to run out of there without killing any of the other cultists, but it didn’t even matter.
On a similar note, in the latest World of Warcraft expansion, there’s a hunting club headed by a guy named Hemet Nesingwary.* You’ve encountered him and his group on another continent and another world earlier in the game, now he’s moved to this new continent. When you first start on this continent, you encounter a PETA-parody-type group that hates how he kills Da Furry Widdle Animals, and you can do a series of quests for them that involve setting clamp traps to maim/kill his (now bloodthirsty and murderous - and will attack you on sight even if you don’t know who the Animal Lovers are) trappers and even killing his subordinates. Many levels later, you end up in a different region of the continent where Nesingwary has set up a hunt camp, and he and his people welcome you in and offer you chances to join them on the hunt and prove what a good hunter you are. I’d think word of the killer of his trusted men would have filtered over to him in the intervening time! In fact, I think you can even carry out both quest lines at the same time, if you never got around to helping the PETA-parody types.
Which should work out to an anagram of Ernest Hemingway if I spelled it correctly.
The one that welcomes you to join his hunt (after you do a few tasks for him) is Nesingway Jr., I believe. they are two different NPCs. Its concievable that one may not have knowledge of what the other is doing. (I could be wrong, I have not played a quest with the senior Nesingway yet.)