Alexander Frost

Specialization

Why did I make this?

One of my favorite things to make in games is player movement and making everything feel good to play.

One of my favorite games, when I was a kid, was Mirrors Edge and that game has some very complex movements so I wanted to challenge myself while at the same time working with an interface that I was used to. That’s why I decided to work in Unity, an interface I had much experience in.

Features

Besides the basic features like running & jumping, we also have.

Horizontal wall-running where you can jump between walls.

Vertical wall-running.

Edge-climbing.

If you press Q while wall running you will turn 180 degrees.

Slide, and if you slide down a slope you gain more speed.

Vaulting.

Kick attack that can also work as a dash when used right.

When you press space on impact with an enemy you will get a boost that will launch you into the air.

Rolling for when you wall from a high place so you’ll dampen the fall and won't get stunned.

Issues along the way

When I got people to playtest, the most common issue was that people didn’t know what was going on sometimes because of the lack of feedback. I could understand this since I didn't have animations at the time and only relied on camera movement. Fortunatly later on, I managed to find someone amongst the first years who would gladly make animations for me. This added a lot to the gameplay experience and came closer to my vision of the game.

The features that got cut

We had to cut some features because of lack of time and since I was working with someone from the first year who had her own projects to work on I wanted to cut things to take workload of her. I could have kept the features without animations but I thought that that would ruin consistency.

The thing I decided to cut was the crouch feature because it had so many animations that needed to be done and didn’t add that much to the experience.

We also wanted running animations in different directions but it wasn’t essential and only a nice thing to have.

The other thing we wanted was a combat system where you could combo but we settled for a simple kick.

State Machines

During my time at TGA, I learned to make state machines to structure everything better and create a good workflow so I wanted to use that since there are a lot of moves with a lot of different variations. I’m so glad that I learned about this structure. It is so easy to add and change existing states.

specializationState image1
specializationState image2
specializationState image3

Observer Pattern

I’m pretty sure that Unity has its equivalent of the observer pattern but I wanted to implement my own since I knew how to make them and then I would have full control over what was going on and could manipulate the observers how I’d like.

specializationObserver image1
specializationObserver image2
specializationObserver image3

Slope Problem

One problem I faced was when I had to ground the player on the slopes. I could just raycast down to the slope but then the capsule would just clip through the slope.

Fortunately, unity has a sphere cast that works exactly like the ray cast but with a sphere instead. I decided to use a sphere since a capsule is a cylinder with two spheres at its ends. This only returned the hit position and not the position I wanted to put the player on. So I had to calculate the position myself.

To find the position I needed to get the sphere's center and just add the sphere's radius in its down position.

Since I already had the A length and C length I just needed to get the length of its B side. I rearranged the Pythagorean theorem to get it’s side.

A²+B²=C² → B²=C²-A²

It was just this little part where I used the same formula because I already have the A from before and the C is just the sphere's radius.

I then subtracted that value from the b and added the radius downwards and BAM there.

Progress

Preprod (Feb 12-15)

Prior to this I already worked on a basic FPS controller with jump and a slide so I had a head start in this project.

I started with deciding metrics and what features I wanted to implement within the timeframe of this course. I decided that I wanted it to be fast-paced so I cut the features that I thought slowed down the pacing of my refference game such as balancing, pipe climbing and swinging. I also thought about implementing combat if I got ahead of planning, but I wanted to only focus on hand to hand combat since it makes more sence to use your environment to get close to the enemy instead of shooting them at a far in a parkour game.

Alpha (Feb 19-29)

I made a player gym where I could jump around and get the features how I wanted them. I then started to implement a first draft of the features. The first thing I started working on was the wall running since It's one of the most fun features in any parkour game in my opinion, so it was important that it feelt right. To make it feel more responsive I made the wall detection slightly wider so that you could hit your jumps more easily. I also added coyote time for when you exit a wall and also for the normal jump. I later on implemented a wallclimbing feature so you could land your jumps even when missing it by a centimeter. Other features added were vaulting, and rolling for when you land after a high fall, this feature was tough to get right without animations since you temporarily lost vision of where you were in the level. I also studied a lot about Mirrors Edge and learned that a cross-hair helped with motion sickness and orientation so I added one to the game.

When I got people to playtest the game I mostly got positive feedback and players couldn't stop running around in the play area, which means it was easy to get into. The only real feedback that I got was that it was hard to understand what was going on due to the lack of feedback in the game. So I had two options, either try to get an animator who were willing to help me, try to find some free assets, or get someone who could make UI to represent the different states the player was in.

Wall running & jumping without any animations other that camera work to show what was going on.

Beta (Mars 4-14)

After asking around amongst the first years I found someone who was willing and motivated to help me and I also got someone from level design who wanted to help me with the project.

So I started by setting up a GitHub page for our project so I could easily work with the other members. While the others were helping me make content for my game, I had to rework some of my code to work with the animations and replan and cut some features to fit the new vision we had for the game.

Because we cut some features we were able to add the combat feature that I wanted, and my level designer thought it would be cool if you could launch yourself from enemies after landing a hit on them. I loved this idea and got straight into implementing it.

By the end of this sprint, the animations made the game much easier to read.

Animations that shows the rolling feature for when you fall from a high fall. The high fall is indicated when the speed lines show up on the screen.

Closing (Mars 18-28)

This sprint I just pollished, timed the animations with everything, bug-checked the features as much as possible and worked on this website.

Since I made the game in Unity I could easily make a web player for the game so I actually implemented a playable version of the finished project on my page. You can find the game at the bottom of this website.

The vaulting shown in this GIF was one on the animations that I had to time, you can also see the kick-launch feature

Summary

In the end, I am very happy with what I managed to deliver. I sure am glad that I decided to make this in Unity and that people not only was nice to help me but also excited to help. I would absolutely like to make this into a full game at some point in the future and iterate on some of the features to make the game stand out more.

If you would like to try it out you’re more than welcome to click the button below to play it on my website

Thanks to the guys that helped me

Veronica Norbrink - Animation

Frans Alexandersson - Level Design

Assar Wade - Audio

Model used for the character

specialization image1
specialization image2
specialization image3