Sound of Life – The beginning

Hallo everyone! My name is Emil Wahlund and I’m a member of the group !false and we are working on a concept called Sound of Life. In the game you plays as a rescue worker in an bombed city and your mission is to find people that has been buried under collapsed buildings. You do this by listening through sensors to try to pinpoint their location so that they can be rescued. I’m the lead designer in the group and also one of only two programmers. We are working in Unreal Engine 4 and the game is played in first person.

So now when everyone know the basics I can start talking about what I have been doing. The first thing we needed to have in our game was movement and we also had to decide what kind of movement. We decided to have a simple movement system, walking where the mouse is used for guidance and a crouch mode. Unreal provide a couple of templates and functions that contain different types of movement but they are not that good. They have a crouch function that set a new capsule and camera height but that does not contain a smooth transition.

So I started working on a new crouch function and it was more complicated then I first would thought. First I used a simple raycast to see if something was above the player. The player could not uncrouch as long as the raycast detected a hit. If nothing was detected the player could uncrouch and that would be done by a timeline so that the player got a smooth transition up or down. The problem with this was that the raycast was located at the top of capsule/player so it was a chance that player would get stuck if he/she stopped moving after an crouched area. The player could also not interrupter the transitions.

So I made a new function with help from our lead coder. The transitions are now updated by delta seconds so the player can now interrupt an crouching transition or an uncrouching transition. I also added more raycasts to reduce the getting stuck risk. Now all the raycast needs to return false to letting the player return to hes/shes original height. This work much better! the player does not get stuck often and it feels like you have more controller now when you can interrupt crouching. There are still some bugs where the player get stuck but that will be fixed in a later date.

B1

Leave a comment