Nick Barber
Portfolio Resume Contact Blog

Nicks Game Dev Blog

Unsorted ramblings about things I do

Nick Barber Game Dev

GhostRunner Study

Category:

Studies

This is a short project I used to study the game "GhostRunner". I wanted to recreate the movement system in Unreal 4 using C++. The animations were made in blender, and could use a lot of work, but the point of this project was to show my UE4 C++ ability. I set the goal of creating this study in one week.

Movement

Movement was the main focus for this project. For the wall running, I simply used the cross product between the hit normal and the players up vector to decide what direction the player should run. I also smoothly lean the player camera similarly to how the game does. When jumping towards a ledge, if the angle is towards the wall, the character attempts a ledge grab. A line trace is fired above the players head, and if it hits nothing a ledge is detected for the player to climb up on.

For the grappling hook, I add force to the player based on a curve. I also added a particle effect so you could see what you attached to. While I was at it, I cropped out the grapple icon from the game and animated it as a widget.

Combat

I wanted to use the rest of my time focusing on studying GhostRunner's combat. I created a simple AI bot, which doesn't move, but I made sure the AI aim is predictive. Using the players current velocity the ai tries to work out where the player and a fired bullet will meet. I then simply made the bullet raycast over its delta to reliably get the bullet collision. I've found this is the best way to solve the "bullet through paper" problem where bullets move through a colliders depth. The player can reflect bullets back at enemies like in the game.

Below is a snippet of the iterative aiming solving. This is a much quicker option and allows customization of aiming iteration and offsets.

Conclusion

Overall, this was a fun side project. I really liked the feeling of the wall running and grapple ability. I think it could use some more polish to make some movements transition into each other more fluidly. I would have also liked to spend some more time on a test level.

Below are some clips from the game for comparison's sake:

<< Back