Peek through door

Started by
16 comments, last by Nypyren 6 years, 2 months ago
41 minutes ago, Nypyren said:

Okay, is there something specific you're having trouble with?

Watch this, and you'll see what I mean by peaking :)

 

 

Advertisement
23 minutes ago, Timothy Sharp said:

Watch this, and you'll see what I mean by peaking :)

Rephrasing Nypyren's question slightly, how about you show us what you've managed to achieve so far? That way we'll be able to see where you are stuck, and provide specific advice.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Ok, I misunderstood.  I thought you meant the character was looking through a door without moving into the room on the other side.

Every time the player in that video goes uses a door, he goes into the next room.  I don't know how the game controls work, so I don't know if it's automatically doing that, or if the player is.  Does the game also let you do something else?

What I saw in the video was camera-related techniques used for third-person games:

  • When you move through a door which is parallel to the screen, the door turns transparent so that the third-person camera can see the player character.
  • When you move through a door which is perpendicular to the screen, your can see a blue ghost of your character as the camera pans through the wall.

Are those what you mean by peeking?  Or did I miss something in the video?

Yea thats what I mean

21 minutes ago, Nypyren said:

Ok, I misunderstood.  I thought you meant the character was looking through a door without moving into the room on the other side.

Every time the player in that video goes uses a door, he goes into the next room.  I don't know how the game controls work, so I don't know if it's automatically doing that, or if the player is.  Does the game also let you do something else?

What I saw in the video was camera-related techniques used for third-person games:

  • When you move through a door which is parallel to the screen, the door turns transparent so that the third-person camera can see the player character.
  • When you move through a door which is perpendicular to the screen, your can see a blue ghost of your character as the camera pans through the wall.

Are those what you mean by peeking?  Or did I miss something in the video?

 

OK.

For the first part, where the door turns transparent, it looks like what the game does is:  If you're in a room, turn the near wall and door transparent.  It looks like there is an animation for the wall which hides/reveals it.  This feels to me like it's being scripted by detecting which room the player is in, and telling the wall(s) and door(s) to change state when you change rooms.

For the second part, where the character appears as a blue ghost when they're behind a solid object, I believe that's done with a shader and some rendering tricks.  You'll also notice a few places where the character is behind other objects where it happens as well, so I believe this effect is always active even if you're not going through a door.  Unfortunately I don't know enough about shaders to tell you what to do or what search terms to use to find someone who does.  Maybe it works by simply turning off z-test, drawing the character last, and if any previously drawn pixel has a nearer depth, draw a blue pixel instead?

7 minutes ago, Nypyren said:

OK.

For the first part, where the door turns transparent, it looks like what the game does is:  If you're in a room, turn the near wall and door transparent.  It looks like there is an animation for the wall which hides/reveals it.  This feels to me like it's being scripted by detecting which room the player is in, and telling the wall(s) and door(s) to change state when you change rooms.

For the second part, where the character appears as a blue ghost when they're behind a solid object, I believe that's done with a shader and some rendering tricks.  You'll also notice a few places where the character is behind other objects where it happens as well, so I believe this effect is always active even if you're not going through a door.  Unfortunately I don't know enough about shaders to tell you what to do or what search terms to use to find someone who does.  Maybe it works by simply turning off z-test, drawing the character last, and if any previously drawn pixel has a nearer depth, draw a blue pixel instead?

Would you like to be my Unity game design partner?

No thanks, I've got my hands too full to help much more than this.  I take breaks on the forum occasionally though.  Good luck on your project!

This topic is closed to new replies.

Advertisement