Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

What's the best door mechanic for FPS?

Discussion in 'Game Design' started by Vefery, Aug 15, 2020.

  1. Vefery

    Vefery

    Joined:
    Feb 23, 2018
    Posts:
    119
    I'm making a horror-ish fps game and currently I'm working on doors mechanic. Everything works fine, but I have some issues: door pushes the player while opening, blocks him, locks him between a wall and the door, etc
    I've never noticed such details, but now I'm wondering how developers deal with these issues in big games?
    I don't have powerful enough PC for modern horror games (aka genre with the most advanced door mechanics) to play with doors there, so I decided to ask here: what's the best practice of handling doors in fps?
     
  2. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    I'd say either allow door to clip through player to avoid the annoyance of fussy tight spaces (terribly annoying for me as a gamer), or perhaps give a large collider that doesnt allow player to get close enough for the door to clip through them. Then have collider disable once door animation finishes.

    But most games I play, even big AAA ones, have doors that can be fussy. So i wouldn't spend too much time fussing over it. Player can easily learn the distance to open from in order to avoid getting pushed if necessary.

    If you rely on player to learn distance to open doors from in order to not get pushed by it, give a healthy preselection distance so you can get them open easily. Very annoying to have to get in a very small zone where you can reach the thing but also not be in its way. The more the game can be played with broad, imprecise gestures, the better IMO. That way there is no annoying slow downs that pull you out from the drama.

    some games also lock you in an animation to open doors or perform other actions. Personally I dont like getting "locked" in games. Especially a horror or action game, I like to always feel like I am ready to react at any moment. Not like you can't stop opening a door or stop reloading a gun in real life, so it feels cheap to lock player into animations like that. So if you do make certain actions into an animation, a cancel all button is nice. And if the cancel all button is just moving away from area, thats even better.
     
    Last edited: Aug 15, 2020
    Vefery likes this.
  3. CityGen3D

    CityGen3D

    Joined:
    Nov 23, 2012
    Posts:
    681
    In a lot of games I think the door always opens away from the player.
    I'm pretty sure games like PUBG do this.
    It's not 100% realistic, but it feels very natural from a gameplay perspective.
     
    j4ke, Martin_H and Vefery like this.
  4. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,492
    Slide doors
     
    Martin_H likes this.
  5. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    Check out a video on the doors in Insurgency Sandstorm.


    Didn't Amnesia: The Dark Descent have physics based doors that you manipulate with the mouse like you open drawers in that game? I liked that mechanic for a horror game. If you have guns in the game, it might not work as well though.
     
    j4ke and Vefery like this.
  6. Vefery

    Vefery

    Joined:
    Feb 23, 2018
    Posts:
    119
    Not an option unfortunately
     
  7. j4ke

    j4ke

    Joined:
    Dec 9, 2018
    Posts:
    21
    How about the door mechanic from the original Thief game series? If a door collides with the player while opening, the door will stop immediately and thus doesn't push player away. So the door is opened partially. If the player interacts with the door again, the door will close. So the player have to make sure that doors have enough room to open completely.
     
    Last edited: Sep 7, 2020
    Vefery and Martin_H like this.
  8. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,492
    What about crushing the enemy character so that their rig explode
     
  9. Not_Sure

    Not_Sure

    Joined:
    Dec 13, 2011
    Posts:
    3,546
    Depends on the game.

    But ones that you barely notice is my personal favorite.
     
    Joe-Censored and Vefery like this.
  10. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    My favorite has always been the doors from Doom 93 which slide up. Gives the game a sci fi or industrial feel, and they work very well.
     
    Vefery likes this.
  11. Vryken

    Vryken

    Joined:
    Jan 23, 2018
    Posts:
    2,106
    Bust open the doors with a flying kick. Add some explosions and a guitar rift for some extra dramatic flare.

    ...Or maybe go with the above suggestions.
     
  12. newjerseyrunner

    newjerseyrunner

    Joined:
    Jul 20, 2017
    Posts:
    966
    I would simply remove its collision while it’s animating, or maybe just put it on a layer where the player can’t interact with it, but let everything.
     
    Vefery likes this.
  13. Serinx

    Serinx

    Joined:
    Mar 31, 2014
    Posts:
    788
    Someone already mentioned it but in amnesia you can click on the door and push/pull it using your mouse, so there's no animation. The door would basically just be a rigidbody attached using hinge joints and you could apply force to the door or rotate it on its hinges with the mouse movement.

    I'd make the door really light, so it can't push the player or enemies at all, and i'd just put a "door collider" around your player that prevents them from getting their face too close to the door - that way if they try to pull the door into themselves, they won't be able to and they'll have to move back a bit, giving a bit more immersion too.

    It's perfect for horror games because you can "peek" into the room before moving in. Seeing a monster through the crack in the door is pretty scary stuff if you ask me!
     
    Vefery likes this.
  14. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    6,492
    or something behind the door can block from progrssing, like a glitch monster's pathfinding