Hacker News new | ask | show | jobs
by faanghacker 1748 days ago
I watched the video again. Still don't see what the big deal is. For example...

NPCs blocking doors? Don't put NPCs there, and tell AI to avoid door zones rather than trying to make them know how to move out of the way when doors open.

Car on the other side of the door? Don't let the door open all the way.

In the elevator example in the IGN article: Implement an elevator door like in modern elevators, or if it's more primitive, don't let players or NPCs walk under the elevator, or worst case, kill the character -- can't call the AI dumb if they avoid being under the elevator that can kill them.

This isn't an unsolved problem. Halo did this with telefragging someone who is blocking a teleporter, and StarCraft did this by destroying the siege tank under a landed building.

4 comments

Everything you describe is an ugly hack that ruins immersion and suspense of disbelief. Are you proposing the AI shouldn't be able to use doors? What if an NPC wants to open a door at the same time as a player? Are you suggesting that gamedevs should add an entire myriad of these exceptions to all the interactive aspects of the game? That's wholly infeasible. Players can and will break sort of game design in wild abandon.

You are trying to build a believable world, or at least one with as few uncanny valleys as possible.

Doors are hard, as is everything interactive. That doesn't mean people shouldn't try to make these things better. And at the same time, we need to acknowledge that doing this is bloody hard.

So your first solution means that NPCs can't interact with doors. What if your game needs NPCs to be able to move around freely and not be trapped in the rooms they spawn in.

Your blocked door solution also has some issues. How do I represent the state of a partially open door? Can a partially open door block bullets? Can I move through a partially open door? Can NPCs? What happens if the car moves towards the door while it is partly open? What if the car moves away? What happens if I try to interact with a partially open blocked door? What happens if I try to interact with a partially open unblocked door?

> StarCraft did this by destroying the siege tank under a landed building

If this in StarCraft I? In StarCraft II even a burrowed zergling can prevent the landing of a Command Center. (That makes no sense from a realistic point of view.)

Yes. And it only became relevant if you exploited a race condition by ordering the building to land, then ordering a siege tank to move under that landing point while the landing animation was in progress. You couldn't order a building to land on top of a unit, and a queued order to land would fail if any units were in the way, but once the building started to land, it wouldn't stop, and any units under it would be trapped. The bug fix added a second check which would kill any units under the building when it finished landing.

In principle, you could do this with any unit, but it was mostly useful for siege tanks, since those were the only Terran ground unit which really benefited from sitting in place.

Yes, StarCraft I. The issue wasn't physical realism. The problem was that a player could move a tank under a building during mid-landing, siege it up, and the boundaries of the building protected the siege tank from melee attacks.

Killing the tank was the "creative" solution, instead of a "brute force" solution to change the game dynamics to prevent the tank from sieging up under the building in the first place.

In SC2 the tanks will be forced to move out from under the building when it lands, but SC2 also has a much improved unit movement system over SC1 that allows this to be done more easily.

I've never seen this in any of the BW games I watched. I wonder if they fixed it. You just can't land a building where a unit is. There was a crazy bug where you could load units into a flying CC and use it as a mobile fortress but that too is patched.
That was the whole point -- it was fixed early on by killing the tank, rendering the exploit useless, which is why you never see it in games anymore.

Search on YT for the tank glitch.

I only found buildings crushing interceptors https://www.starcraftai.com/wiki/Tricks,_Glitches_and_Exploi...
Doors are complicated? Just don't have doors, problem solved. Game is complicated? Just don't create game. Such easy solutions.