Asylum – Dev Diary 19

Shorter development session this week as I had a few jobs to do around the house.

There were a couple of smaller things I wanted to address. The first item on the list was movement speed. Up until now our player has been content walking his way through the corridors of the asylum, well now he can also run. As usual this is achieved by holding down the shift key. For the moment this does introduce a small issue. Running diagonally increases the movement speed; this is a common issue when you are using single pixel movement systems as the diagonal directions cause the vertical and horizontal speed to be applied at the same time. I will sort this out later.

The second item to address was the ability to see and interact with objects behind walls. This became evident when I was testing my locked room. If the key was outside the room and the player on the other side of the wall not only did the interaction circle display but he could also pick it up. Well not any more mister! Using a relatively simple ray cast line I check to see if there is a wall object between the player and the interactive object. If there is then ignore the action and do not show the interaction circle. This sort of thing was actually very unlikely to occur during the game and if it did the object could theoretically be moved to prevent it but I felt it was important to do it right just to be on the safe side.