- Unity
- 4 designers, 6 artists
- 7 weeks + 2 week pre-production
- Scripter, gameplay designer
- Nominated for Best technical execution and Best art at Swedish Game Awards 2018
What is Ley Lines?
Ley Lines is a first person shooter featuring elemental interactions with the world.
Use different types of ammo for your gun to not only interact with objects in different ways, but also to deal with enemies, discover hidden paths and secrets!
The game is to be seen as a vertical slice and not as a complete product.
What did I do?
In the Ley Lines project I was the primary scripter and constructed the majority of the core mechanics in the game. This includes all the player movement, upgrade systems, sound implementation, weapons, menus, UI, enemies, as well as some of the intractables in the game.
I worked in close conjunction with the 3D-team to implement new features and optimize the game, as well as writing custom editor scripts for us all to use.
I also hatched the initial idea of the game, as well as coming up with the theme.
Ledge climbing
Ledge climbing was essential to the movement as it gives room for error as well as much fluidity in the way the player can get around the world.
The process is quite simple, first some sphere- and raycasts is performed to see if the player can reach and fit on the ledge, then lerp the player from point a to point b. This process is visualized below.
To give the climb a nice feel to it the lerp is split into horizontal and vertical movement, both controlled by separate animation graphs. This made the climb super easy to customize and fast to iterate on.
I studied the climb in Doom (2016) frame-by-frame to see how I could do ours. One thing I found when researching was that their climb felt very stiff and killed the momentum of the player. To fight this problem I made the climb super fast, as well as saving the velocity the player have when going into the climb and reapply it after the climb is complete. This adds a lot of fluidity and makes it less intrusive to the flow of the game.
STEP 1
1. Spherecast up from the player.
2. If first check didn’t hit anything, spherecast forward from where last check ended.
3. If second check didn’t hit anything, raycast down from where second check ended and see if there is anything there.
4. If the ray hits something, save the position of impact for step two.
STEP 2
Raycast up from the saved point and see if there is anything obstructing the space, if there’s room for the player, start lerping the player position.
Ice ammo
The ice ammo featured in the game went through a lot of iterations before it started to feel cool.
I rewrote the ammo two – three times and tried many different things, but eventually ended up with projectiles that move slow as long as you fire the gun. When you let go off the trigger all the projectiles both gain a big boost of speed and damage.
The projectiles are also homing and will seek out enemies, this makes for a very relaxed, yet satisfying experience with the ammo type.
BuzzBot Enemy
Enemies in Ley Lines wasn’t initially a task for me, but as problems arose, I had to step in and try to create something in the short amount of time I had between my other tasks.
I made a super simple enemy that can chase and damage the player, as well as being able to patrol in the level.
If the player shoots an un-alerted enemy, it will charge the player but also call all out to nearby enemies and make them chase the player as well.
But if the player comes into the enemies proximity they will chase the player by themselves.
This was made to help reduce drawing the attention of a whole room full of enemies just by accidentally walking close to one randomly patrolling around.
Basic character movement
This is the first time I’ve built an FPS-controller. After playing around with the default one in unity a while I knew I had to make one myself to get the right feel for the game we were going to make.
I started out with the ground movement. It is velocity and friction based, and it behaves differently on different type of surfaces. On high friction surfaces the character accelerates and stop fairly quick, but on slippery surfaces the velocity is kept longer, but also builds up slower.
The movement in air is more or less the same as the ground movement except that a custom air material is used when not on the ground.
Misc things
I added a lot of small things to make the game feel more polished and fleshed out. Some of these are shown here, such as the player and weapon reacting to be close to walls, and the 3D in-game ui featured in the game.
Adding a reaction to walls gave a fair bit of realism in this otherwise arcade:y game. When the weapon is rotated away you lose the ability to shoot, as it would be silly shooting to the side.