Search Unity

  1. Get all the Unite Berlin 2018 news on the blog.
    Dismiss Notice
  2. Unity 2018.2 has arrived! Read about it here.
    Dismiss Notice
  3. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  4. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  5. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  6. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Slender Man -- WIP

Discussion in 'Works In Progress' started by AgentParsec, Jun 2, 2012.

Thread Status:
Not open for further replies.
  1. AgentParsec

    AgentParsec

    Joined:
    May 5, 2012
    Posts:
    393
    Starting a new thread for this (it's proceeding enough that the collaboration thread is probably no longer needed).

    Building a game based loosly on the Slender Man mythos. You have to go through a wooded area with some old buildings and collect all eight pages that are randomly scattered in the area. As you start collecting pages, however, the Slender Man begins stalking you and becomes more and more persistant as you collect each page.

    Right now, I'm testing a really basic movement script for the enemy I made. It works really well, but it has the drawback of requiring the level to be perfectly flat (i.e., no slopes, hills, stairways, 2nd floors, etc.); everything has to be on the same height. While that's definitely a limiting factor, I can deal with it unless someone can help me find a way to fix it.

    Anyway, the current build is a test area to test the movement. There are 5 pages right in front of where the player starts; collecting all 5 should get SM up to a good difficulty (he might not spawn with 3 or fewer due to the test area being so small). There's no win condition at this time for collecting all 8 pages.

    Oh, also, don't look at SM if you can avoid it. That's how you lose, or if he catches you (though there's a bug right now where you get stuck if he catches you; that will be fixed in the next build).

    SMTEST
     
  2. xxxDjdogxxx

    xxxDjdogxxx

    Joined:
    Mar 28, 2011
    Posts:
    751
    damn! i actually got scared my second try, looking for the last page ;_;
     
  3. AgentParsec

    AgentParsec

    Joined:
    May 5, 2012
    Posts:
    393
    Just uploaded the newest version. This one shrinks the size of the flashlight so that the sides of the screen are dimmer, but it also makes it so that sanity loss is weaker towards the edges of the screen, but stronger towards the center (at least horizontally). It also fixes a few audio bugs and the one where it gets stuck if SM catches you. Also, he should disappear if the 8th page is collected.

    Still to go:

    1. Page locations need to be randomized.
    2. The actual play area needs to be built.
    3. I'd really like to improve the scripting for being able to see SM, since right now you don't "see" him if you see only his left or right edge. I have some ideas on that, though.

    I'll record a quick video of how it stands so far. I'll also get a mac version up.

    *EDIT* Hold on, something's screwed up with sanity loss in this version. It's not doing it anymore really. I'm going to remove the scripting that has it change the loss rate based on the position on the screen, it's causing more trouble than it's worth.

    *EDIT EDIT* Ok, uploaded fixed version. Same link as before.
     
    Last edited: Jun 3, 2012
  4. xxxDjdogxxx

    xxxDjdogxxx

    Joined:
    Mar 28, 2011
    Posts:
    751
    want to use my forest i made the other night? i can add some buildings and camp site.
     
  5. AgentParsec

    AgentParsec

    Joined:
    May 5, 2012
    Posts:
    393
    Possibly, although it needs to be completely flat for it to work correctly. If there's any elevation changes, the scripting won't work.

    Uploaded a new video:

     
  6. BusterBlader

    BusterBlader

    Joined:
    Apr 23, 2012
    Posts:
    79
    It is a very cool game :O Wondering why i am never having so great ideas :)
     
  7. xxxDjdogxxx

    xxxDjdogxxx

    Joined:
    Mar 28, 2011
    Posts:
    751
    Alright i can change it so its all flat.
     
  8. AgentParsec

    AgentParsec

    Joined:
    May 5, 2012
    Posts:
    393
    Just completed and uploaded latest build. Assuming no more odd bugs, this could be the last one before the next big step: working on the actual map.

    New to this build:

    1. Pages now appear in random locations. There are 16 possible locations on the current test map, but I could add lots more if I wanted to.
    2. SM can now be seen from his right and left sides, thanks to an extra raycast aimed at his right and left arm. It's still by no means perfect (it's still possible to catch the tiniest edge of him before being "visible", especially on his front and back), but it's rare and most likely won't come into play at all anyway.
    3. Added a wall around the edge of the test area; just didn't want people falling off.

    NOTE: The play area is still too small for SM to spawn with the first few pages (and on page 3, I think he will only spawn if you're on a far edge, like one of the corners). This will obviously be fixed when the actual map is made.

    Original link is the same: SMTEST
    Mac version: SMTEST_MAC
     
  9. xxxDjdogxxx

    xxxDjdogxxx

    Joined:
    Mar 28, 2011
    Posts:
    751
    Alright this look good, i can add some camps and things then port it over.


    EDIT:
    $Mapsize.JPG
    :Map Size: You are the little red dot.
     
    Last edited: Jun 3, 2012
  10. Blacklight

    Blacklight

    Joined:
    Dec 6, 2009
    Posts:
    1,240
    Can you upload a webplayer?
     
  11. AgentParsec

    AgentParsec

    Joined:
    May 5, 2012
    Posts:
    393
    I can try when I get the chance. I haven't tried to do anything with webplayer yet, still new at Unity in general.

    For the buildings in the area, I wanted to have at least one or two kind of run-down, burnt out buildings. There's a really good example of this in the Slender Man mythos in one of the Marble Hornets videos, and it's all on a single floor as well (watch starting at about 2:30 in):

     
  12. Balsamic_Vinegar

    Balsamic_Vinegar

    Joined:
    Mar 9, 2012
    Posts:
    19
    Only managed to find 4 pages in my run through. Great atmosphere in general!
    Are you using a raycast to the pages to see if they can be picked up? Just noticed it was a little tricky sometimes. Perhaps just do a distance check or even a physics.overlapsphere. View frustum checking would probably be good to make sure you can pick it up.

    Nice work. It was actually pretty startling the first time he popped up and the static started!
     
  13. AgentParsec

    AgentParsec

    Joined:
    May 5, 2012
    Posts:
    393
    It's tricky to pick up the pages, because it wants you to point directly at it. That's not normally a problem, but the flashlight gives the visual impression that the center is more to the lower right than where it actually is. I can fix that by making the camera beam wider, but then it seemed like things were too lit up.
     
  14. Balsamic_Vinegar

    Balsamic_Vinegar

    Joined:
    Mar 9, 2012
    Posts:
    19
    I guess design wise it would be more intuitive if you could pick it up as long as it was on screen rather than dead centre.

    This script will help you determine if something is visible to the camera or not http://www.unifycommunity.com/wiki/index.php?title=IsVisibleFrom (I haven't tested this, but it's on the unify community so I'm going to assume it works haha)

    Then you can just do the distance check or overlap sphere and if it's in view and in range then it can be picked up.

    That said, if you want pickups to be only dead centre of the camera then just ignore my message :D
     
  15. AgentParsec

    AgentParsec

    Joined:
    May 5, 2012
    Posts:
    393
    Just an update, I've added a few extras (I will upload the new version when I get the chance):

    1. The camera view can be zoomed in and out (to about 3x zoom) by pressing E to zoom in and Q to zoom out. A faint motor sound accompanies it.
    2. There are now 12 different footstep sound effects which are chosen from randomly (the script does not allow the same one to be played twice in a row).
    3. Ambient forest sounds have been added; there is a faint wind loop that plays, and sounds of crickets and owls will randomly play in different directions from the player's position.
    4. I have now changed it so that you can pick up a page when you're close enough and can see the page; you no longer have to have it centered in your view.

    *EDIT* Uploading now (PC version; I have not yet made the Mac version), it will probably take a few minutes before it's ready for download. I found a bug after I started the upload though; you can pick up pages from the opposite side of a wall. Not sure how I'm going to fix that.
     
    Last edited: Jun 4, 2012
  16. AgentParsec

    AgentParsec

    Joined:
    May 5, 2012
    Posts:
    393
    Alright, I have PC and Mac versions uploaded. I fixed a bug where the pages wouldn't always pick up when you click; this was because I was calling the function on FixedUpdate instead of Update, so sometimes it missed the mouse button event.

    Still to do:

    1. The actual play area needs to be made, of course.
    2. Make the camera zoom motor sound effect just a bit louder; it gets drowned out by the wind.
    3. I THINK the forest noises continue to play even if you lose, but I have been unable to verify this since it's hard to time one of the longer ones playing with losing (so that it can be heard after the static if it's still playing). If this IS the case, then I either need to find a way to stop one shot audio events, or I need to make the forest sounds go away once SM spawns (which might make it more creepy anyway).
    4. Still need to find a way to fix pages being able to be picked up from the opposite side of a wall.
     
    Last edited: Jun 4, 2012
  17. xxxDjdogxxx

    xxxDjdogxxx

    Joined:
    Mar 28, 2011
    Posts:
    751
    I think i just had a heart attack when i was looking for pages, i ran from corner to corner and when i saw a page i ran to it and then back to the corner, and mid run slender man face appeared and i jumped in my seat ;_; good job. ;3
     
  18. Sir-Tiddlesworth

    Sir-Tiddlesworth

    Joined:
    Oct 19, 2011
    Posts:
    908
    I have been following your Collaboration thread for a while and it is good to see the game taking shape.
    I will take a look at the game when I have the time.
     
  19. AgentParsec

    AgentParsec

    Joined:
    May 5, 2012
    Posts:
    393
    Okay, I fixed the page bug. I added a raycast testing to make sure there aren't any obstacles between you and the page. It wasn't picking up objects that were low, however, until I realized the raycast was hitting the player object. So I created a new layer for the player, masked it for the raycast, and now it works perfectly. All the SM raycasting still works normally as well.

    I have also fixed the problem (which turned out to be true) where ambient sounds started after the player lost continued to play. I simply moved the player to a very far away position where the sounds couldn't be heard anymore. I also made the camera zoom sound louder, since that one was easy to do.

    All that remains is putting in the actual woods/buildings, and creating some sort of ending.
     
  20. AgentParsec

    AgentParsec

    Joined:
    May 5, 2012
    Posts:
    393
    Latest build uploaded, both PC and Mac versions. (Actually, Mac version is stlil uploading, give it a few minutes.)

    Djdog, are you still making the map? Since I'm out of things to do until the map is done, I wanted to make sure you were still doing it, otherwise I have time to start making a map myself.
     
  21. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,957
    Looks very nice, have to test it when i get home : )
    If you are out of things to do you can always remake the controller to be able to have hills and stuff : p
    You cant just use the standard character controller?
     
  22. AgentParsec

    AgentParsec

    Joined:
    May 5, 2012
    Posts:
    393
    I'm already using the standard character controller. It's not a problem with the player's movement, it's a problem with SM's. If there are elevation changes, he could end up floating through the air when he does the close-range portion of the pursuit. I know there are better ways to move him, but I just don't have the programming skills to do proper pathfinding. So instead, he teleports between waypoints that are scattered around the map, and if he gets close enough and is able to capsulecast to the player, he moves directly towards him (or the last position he was seen). Though it's not very efficient, it does work, but only if the terrain is flat.
     
  23. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,957
    Yeah, but using the player controller on the SM and then using that controllers move(), then you will get automatic collision detection and if you don't want him to collide against trees and stuff that should be possible to solve quite easy i think.
     
  24. AgentParsec

    AgentParsec

    Joined:
    May 5, 2012
    Posts:
    393
    He would still need to avoid obstacles. It's not as much an issue when there aren't elevation changes that can get in the way, but a target standing on a hill or around a corner is still difficult to reach since it's not a straight line.
     
  25. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,957
    Finally tested this just now. Turned off the light, started the game, collected a few pages and the mood went up really good all time, at 4 pages when the static and beeps started coming i started to get a bit scared at times : p Then after 6 pages it was very creepy and i felt shivers down my spine, then i died : D
    Very, very good game, i love the small level, makes it a bit claustrophobic. I thing the inside of an old mansion or something would be a great setting for this game as well, don't make a big open level i think, it really added to the "atmosfear" that the level was small and full of walls and stuff.

    Edit: Had to play again : ) Got 7 pages this time. Not sure how it works now with stamina, do you get less max stamina the more pages you collect? If not maybe increase max stamina at start and decrease it when collecting pages.
     
    Last edited: Jun 5, 2012
  26. AgentParsec

    AgentParsec

    Joined:
    May 5, 2012
    Posts:
    393
    Your max stamina decreases the more you sprint. It's an incentive to take it easy and sprint only when you need to. When the map gets larger, I might tweak it to have the max stamina go down slower.

    Slender Man mythos generally puts him in the woods. I will have some interior locations within the woods, which is where the majority of pages will be found, but travelling between them via the woods will be necessary. I'd rather the map not be too large either, but I don't want the game to be too short either. Suspense is good, and a little extra roaming time helps to build it.

    I think I get how to use the terrain editor, but how do you build buildings? Out of cubes like I was doing with the walls, or is there a better way?
     
  27. AgentParsec

    AgentParsec

    Joined:
    May 5, 2012
    Posts:
    393
    I've programmed a win condition now. When you finish collecting all the pages, SM disappears and the music stops, like it did in the previous builds. However, he doesn't actually disappear: he becomes invisible and teleports to a far enough distance away from you that he won't catch you immediately. Then he resumes stalking you as normal. Since he's invisible though, he can go anywhere and is not restricted by being watched. Once he catches you, he becomes visible again, and of course you lose. However, it still considers this a "win", and rolls credits afterwards.
     
  28. virror

    virror

    Joined:
    Feb 3, 2012
    Posts:
    2,957
    Ahh, so that's how the sprinting works.
    One other idea might be some flashlight flickering or even short blackouts when you only have the last few pages left.
    Looking forward to see the new environment : )
     
  29. Mechanoxx

    Mechanoxx

    Joined:
    Apr 9, 2011
    Posts:
    67
    What if you had him go out of sight when you get all the pages, and have a quiet ambient sound that slowly gets louder as the screen gets darker and it ends with a brief image of him jumping at you.
     
  30. AgentParsec

    AgentParsec

    Joined:
    May 5, 2012
    Posts:
    393
    Then you would expect it. This way, you think everything's safe since the music stops and he disappears. It's really startling when he then pops up.
     
  31. AgentParsec

    AgentParsec

    Joined:
    May 5, 2012
    Posts:
    393
    Uploading newest version (will take a few minutes to complete). A lot of minor bug fixes, and it now includes the ending I mentioned.

    PC / Mac

    Honestly, I think everything's done except for the map. Djdog, still waiting to hear back if you're working on it or not. If I don't hear some kind of update soon, I'm going to start on a new map myself.
     
  32. ludiares

    ludiares

    Joined:
    Jul 14, 2011
    Posts:
    242
    I've seen that you don't know how to do buildings, and that's my best job(i'm better doing buildings/props than doing characters), so, if needed, i could make the buildings
     
  33. AgentParsec

    AgentParsec

    Joined:
    May 5, 2012
    Posts:
    393
    Oh THAT'S what you meant by props. Sorry, I wasnt familiar with the term usage. Sure, that'd be great, let me just figure out what points of interest there should be and I'll send you a message with the details. In all cases, the only requirements is that there should be no elevation changes (at least none that the player could clear), and the vertical clearance of accessible areas should be 2 units (SM stands 1.98 tall).
     
  34. awesomeaustin316

    awesomeaustin316

    Joined:
    Jun 6, 2012
    Posts:
    21
    Love it, especially how it seems like you are looking through the camera at all times, like in Marble Hornets. I think this will evolve into a very popular game when it is released. If you need anykind of help with a cool enviroment still, I could help?
     
  35. TehWut

    TehWut

    Joined:
    Jun 18, 2011
    Posts:
    1,577
    This game is getting better and better! good luck on the release
     
  36. AgentParsec

    AgentParsec

    Joined:
    May 5, 2012
    Posts:
    393
    Ok, I tried to save it as webplayer, and it doesn't work correctly. Everything is lit, the ground is solid black, and there's no flashlight. I'm just going to stick with PC and Mac versions for right now.
     
  37. AgentParsec

    AgentParsec

    Joined:
    May 5, 2012
    Posts:
    393
    Another video of the most current build. There's a bug that shows up in the video; after collecting 6+ pages, when SM gets the ability to teleport into and out of areas that you are currently observing, the screen is supposed to flicker briefly, but once during the video it does not. I need to figure out why, so I'll be going back over the code.

    I spend a lot of time running around on this, in part because in the panic of the moment, I forgot where all the possible spawn spots are, so I was trying to remember what areas I've already checked while trying to avoid SM at the same time.

    See if you can also catch the spot where I legitimately got startled and my camera spazzed out.

     
    Last edited: Jun 7, 2012
  38. Endgame

    Endgame

    Joined:
    Dec 9, 2011
    Posts:
    61
    what a cool game, excellent work with the atmosphere and sounds.
     
  39. AgentParsec

    AgentParsec

    Joined:
    May 5, 2012
    Posts:
    393
    I'm experimenting with the tree creator. In order to properly line up with the collider so that it blocks line of sight from SM, the trunk of the tree has to be straight at least up to the point of the player's height. I can make that happen by keeping growth angle zero and modifying the crinkliness graph slightly.
     
  40. AgentParsec

    AgentParsec

    Joined:
    May 5, 2012
    Posts:
    393
    I apologize for the lack of updates. Building the woods is the current step, and I am still working with the tree creator to get the trees exactly the way I want them to appear. Ludiares is helping me with the buildings, and a few other landmarks in the woods. I will keep the tread updated on our progress.
     
  41. MellowNinja

    MellowNinja

    Joined:
    Mar 26, 2012
    Posts:
    345
    holy crap, its really good. i got creeped out when i collected the 6th page then turned around then he was there i dropped my keyboard :L great work man :)

    also what texture size do you use for your pages ?
     
  42. AgentParsec

    AgentParsec

    Joined:
    May 5, 2012
    Posts:
    393
    It was pretty high, I think 600 x 900. I wanted you to be able to zoom in on it without losing much detail.
     
  43. Mechanoxx

    Mechanoxx

    Joined:
    Apr 9, 2011
    Posts:
    67
    I just peed my pants
     
  44. KMGameDev

    KMGameDev

    Joined:
    Mar 8, 2011
    Posts:
    17
    Did you model SM yourself? I love the ambient feel of the game. Even the videos get me spooked.

    EDIT: Just played it. You owe me a new pair of pants.
     
    Last edited: Jun 10, 2012
  45. RingOfStorms

    RingOfStorms

    Joined:
    Oct 23, 2010
    Posts:
    584
    OMG 7/8 and I was gonna quit, but I decided not to. I realized a few moments later that I should have lol. Sacred me half to death.
     
  46. AgentParsec

    AgentParsec

    Joined:
    May 5, 2012
    Posts:
    393
    I'm trying to decide something... For trees, the mesh collider obviously works the best for determining whether or not the tree is blocking line of sight. However, I'm told that making a terrain with a bunch of trees that have mesh colliders can cause big performance issues. The only way I can get around this is to make sure the lower truck of each tree is straight at least up to the player's visual height, then add a capsulecollider for the trunk. Since the gameplay's all confined to a single height, this will work, but it also means the lower part of all the trees will be boring (i.e., no slanted trees or any weird shapes). Is this the right way to go, or is the mesh collider the right way to go?
     
  47. ludiares

    ludiares

    Joined:
    Jul 14, 2011
    Posts:
    242
    You could put the trees with the mesh collider manually, as you would do with any other asset. I don't think it would be a great performance difference.
     
  48. LeakySink

    LeakySink

    Joined:
    Apr 9, 2012
    Posts:
    128
    Depending on how many trees we're talking, on PC it probably won't be an issue.

    Even if it was you could write a treeManager that only turns on the colliders within a certain range of the player.

    Better still have within range colliders and just a plane to block the raycasts on trees further away.
     
  49. AgentParsec

    AgentParsec

    Joined:
    May 5, 2012
    Posts:
    393
    I'm not sure how many trees I'll need, it depends on how big the area turns out to be. Maybe I can make mesh colliders for trees that are near the paths or near important landmarks, and capsule colliders for the off-path trees that fill in the remaining space.

    Also, I'm trying to decide if the play area will be enclosed in walls or fences.
     
  50. AgentParsec

    AgentParsec

    Joined:
    May 5, 2012
    Posts:
    393
    Forgot to answer this before. The SM model is by ludiares, who is also doing modeling for structures in the game.
     
Thread Status:
Not open for further replies.