News for hackers. Stuff that matters.
[dead]
Re:Why video game doors are so hard to get right [video] by burnished on Monday September 06, 2021 @02:09PM (#28436387)
Sounds like you'd benefit from giving it a try. I'm going to go out on a limb here; you're at that stage of your life where everything you haven't tried sounds simple and you don't understand why other people struggle so much. I'm guessing this because on hearing that something is difficult your first suggestion is to.. simply design a class, and then suggest that the problem resides in the kinds of people approaching the problem.

Its a sort of arrogance that I think will be familiar to many people. But it sort of assumes that other people are too stupid or incompetent to try <insert obvious easy solution>. You might do better by trying to figure out what went wrong with the 'obvious' solution, or what you are missing in your own understanding that makes the problem appear so much simpler. If you figure out novel solutions, great! That's real genius. I think mostly you'll find out how tough most problems are.

Re:Why video game doors are so hard to get right [video] by dharmab on Monday September 06, 2021 @02:19PM (#28436461)
Thank you for writing up a clear headed response. I had started to write a response to the comment, but decided I didn't know a way to phrase it in a way that would be constructive and decided not to submit.
[dead]
Re:Why video game doors are so hard to get right [video] by scrollaway on Monday September 06, 2021 @03:22PM (#28437019)
Ah, you’re one of those people.

Sounds to me like the person you’re replying to had you perfectly figured out. If you’re lucky one day you’ll get to look back on this comment in regret. If not, you’ll keep living in ignorance.

[dead]
Re:Why video game doors are so hard to get right [video] by jcelerier on Monday September 06, 2021 @03:47PM (#28437250)
for someone without regrets your comments sound awfully bitter
Re:Why video game doors are so hard to get right [video] by egypturnash on Monday September 06, 2021 @02:52PM (#28436754)
Watch the video, it goes into detail about why doors are hard, especially as you start moving from "press space when near the door to make it slide into the wall" to "the door is a physics-simulated object that interacts with all the other physics-simulated objects in the game, and which players and NPCs will open in a realistic fashion that involves blending pre-fab animation with the location of the handle/knob relative to the character instead of vaguely waving a canned animation in the direction of the door as it magically opens".

Never mind a door simulated at the level of "I am opening it just wide enough for me to get outside with some food and water for the semi-feral cats who live under my house, with minimum opportunity for them to run inside before they're distracted with that food, also I have to kick it to get it open now because this is New Orleans and the house just settled a little more after Ida and now the frame's a little less square". Which is an interaction I have with a door every morning without ever thinking about the door.

There's also a quote from a lead developer at an AAA team saying that doors are the hardest thing to get right. Everything in a video game is a thin veneer of illusion, and doors are surprisingly complex in how they have to interact with every level of that illusion.

[dead]
Re:Why video game doors are so hard to get right [video] by midnightclubbed on Tuesday September 07, 2021 @01:28AM (#28441238)
Many games do simulate/animate/synchronize doors with their own custom systems because doors are way more complex and problematic than 99% of other in-game objects.
Re:Why video game doors are so hard to get right [video] by short_sells_poo on Monday September 06, 2021 @03:42PM (#28437195)
There are some things that generalize in game development, mamy don't. How you implement a door can very much depend on the sort of game you are building. And it can absolutely get complicated simply by the fact that you'll likely need to hand roll your solutions.

I haven't worked in game dev in decades, but I remember that just network synchronization could be tricky because the degree to which a door is open could lead to very different outcomes in a game. Eg take a shooter game:

Does the door block/deflect bullets?

Yes? Well now you need to make sure to synchronize clients really cleverly because each player will see a different state of the door depending on their latency. Whether they can shoot through the opening is relative to each clients' reference frame.

Oh, just make the server decide you say? Well, now all your inputs have a perceptible delay because your client has to wait for confirmation from the server, or you'll often see jarring prediction error correction when the thing you predicted is wrong.

A huge amount of research and work has gone into this and yet there's still no silver bullet.

That you think this is all solved just says that you know very little of the problem area - which is ok - but then you should not be making broad and confident statements about it. A touch of humility doesn't hurt.

Re:Why video game doors are so hard to get right [video] by faanghacker on Monday September 06, 2021 @03:49PM (#28437285)
Except network issues were not mentioned in the video. Moving the goalposts.
Re:Why video game doors are so hard to get right [video] by short_sells_poo on Monday September 06, 2021 @03:56PM (#28437361)
It was just an example of conceptually simple things that are hard in games. Are you disagreeing with what I wrote?
Re:Why video game doors are so hard to get right [video] by faanghacker on Monday September 06, 2021 @04:02PM (#28437429)
Not at all. Network issues make everything in games more complicated, not just bullets going through doors.

Everything in games can be complicated: physics, doors, AI, network. Even the first line of that video description.

I think that just proves my original point: it's clickbait to single out doors as being exceptionally hard versus everything else in game design.

Re:Why video game doors are so hard to get right [video] by short_sells_poo on Monday September 06, 2021 @04:52PM (#28437988)
> I think that just proves my original point: it's clickbait to single out doors as being exceptionally hard versus everything else in game design.

That's a fair point, but I think the charitable reading of the title is that amongst all the complicated things, a conceptually simple object like a door can still be very deceptively complex.

I sometimes get an urge to work on the myriad of game ideas I've written down over the years. And every time I remind myself that what I really like is the "idea" of making a game, not the actual process. Because the actual process is a draining, thankless and often rage inducing process. The actual building of a game is 95% of the time spent on stupid little details like making a door work properly.

And it is for that reason that I really admire game developers, particularly indie ones. It takes an insane amount of willpower, mental fortitude and wits to take a game from idea to playable product. And you then have to contend with one of the most toxic and volatile consumer groups in existence.

Re:Why video game doors are so hard to get right [video] by faanghacker on Monday September 06, 2021 @04:58PM (#28438033)
> I sometimes get an urge to work on the myriad of game ideas I've written down over the years. And every time I remind myself that what I really like is the "idea" of making a game, not the actual process. Because the actual process is a draining, thankless and often rage inducing process. The actual building of a game is 95% of the time spent on stupid little details like making a door work properly.

Yeah, I agree. I actually started out learning programming as a pre-teen by making my own games. It can be a lot of fun at times, but a lot of frustration too, and I can see how the latter eclipses the former as as you scale into a more complex game and with a bigger team.

It's not an easy job that's for sure.

Re:Why video game doors are so hard to get right [video] by Animats on Monday September 06, 2021 @02:49PM (#28436735)
Move, shoot, and drive are easy, or at least well worked out, and everything else is hard. Doors are just a common case of "everything else" Sitting down realistically is hard. Standing up realistically is hard. Picking up stuff realistically is hard. Interacting with any object via contact is hard. Interacting with moving avatars is really hard.

The hard problems come up when you actually have to do motion planning, in the robotic sense. Few games do that. In most games, you're just moving the avatar while running canned animations. UE5 has a new dynamic animation system which is supposed to help with this. In the UE5 demo video, you see the character walk through an open doorway, and she reaches out and touches the doorframe. That's some kind of IK-driven animation triggered by proximity. Not clear if the mechanism behind that is general enough to handle door opening. Anyone know?

In virtual worlds, where you don't have pre-planned gameplay, it's a big problem. Second Life has hundreds of thousands of doors, and at least three vendors of door control software. Usually, doors have to be clicked on to open them, although stores often have automatic sliding doors.

Re:Why video game doors are so hard to get right [video] by 5faulker on Monday September 06, 2021 @02:13PM (#28436410)
Doors are one of those things that seem simple but actually is not, due to it being an interaction point between players and the game.
Re:Why video game doors are so hard to get right [video] by faanghacker on Monday September 06, 2021 @03:06PM (#28436891)
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.

Re:Why video game doors are so hard to get right [video] by short_sells_poo on Monday September 06, 2021 @03:50PM (#28437292)
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.

Re:Why video game doors are so hard to get right [video] by fredophile on Monday September 06, 2021 @07:51PM (#28439374)
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?

Re:Why video game doors are so hard to get right [video] by gus_massa on Monday September 06, 2021 @03:15PM (#28436959)
> 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.)

Re:Why video game doors are so hard to get right [video] by duskwuff on Monday September 06, 2021 @06:36PM (#28438896)
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.

Re:Why video game doors are so hard to get right [video] by faanghacker on Monday September 06, 2021 @03:23PM (#28437024)
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.

Re:Why video game doors are so hard to get right [video] by sgarman on Monday September 06, 2021 @04:50PM (#28437965)
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.
Re:Why video game doors are so hard to get right [video] by faanghacker on Monday September 06, 2021 @06:24PM (#28438785)
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.

Re:Why video game doors are so hard to get right [video] by gus_massa on Monday September 06, 2021 @07:20PM (#28439185)
I only found buildings crushing interceptors https://www.starcraftai.com/wiki/Tricks,_Glitches_and_Exploi...
Re:Why video game doors are so hard to get right [video] by Hikikomori on Monday September 06, 2021 @07:40PM (#28439319)
Doors are complicated? Just don't have doors, problem solved. Game is complicated? Just don't create game. Such easy solutions.