Secret of the Forest Temple

Secret of the Forest Temple

Summary

Secret of the Forest Temple is a game where the player discovers the secret of an ancient temple. The gameplay consists of the player moving around the environment, killing the enemy orcs in her way and picking up health pickups. There are also scripted events in the game where the camera or environment is manipulated, as well as scripted encounters where the player is locked in together with enemies.

Specifications

  • Created in six weeks half-time
  • Using Unity 5.5.1.
  • All 3D Models, animations and most particles from Unity Asset Store

Major Features

  • An input system that handles movement and combat.
  • A health system with damage and health pickups.
  • Animation state machines
  • An AI system that uses the nav mesh.
  • Reusable level events such as camera events and scripted encounters.
  • Special level events
  • A menu and level transition system.
  • UI and pause menu

My work

Level Design

  • Built the basic layout of the levels using modular assets
  • Iterated based on feedback and usability testing
  • Created both reusable and unique level events
  • Level Art, lighting, particles and polish
  •  Paper-planning
    • Research 
    • Pre-production game-design document
    • Topdown maps for all levels

Other

  • Created custom particle effects
  • Modifications of pre-made asset packs
    • Created a new emissive texture
    • Changed particle system textures
    • Modified pre-made particle systems

 

Technical Design & Scripting

  • Player Input
    • Created an input system
    • Created the main character state machine for combat, effects and animations
    • Animation transitions and setup in Mechanim
  • Character Movement
    • Prototyped different versions of the character controls and camera
    • Usability testing of the prototypes
    • Iteration and polish on the best one based on feedback
  • Combat System
    • Prototype
    • Created health pickups and loot drop system
    • Designed and scripted the player attack
    • Designed and implemented the enemy behaviour
    • Set up enemy animations as a state machine in mechanim
    • Balanced the combat variables based on feedback
  • UI and menus
    • Created and implemented UI for health
    • Created and implemented a pause menu
    • Main Menu screen
    • Credits screen

Introduction

I wanted to create something that would feel like an adventure to both the player and myself. I also wanted to challenge myself to take a project from start to finish, and learn more about scripting. This is why I chose to make a small game from scratch. I used beautiful hand-painted assets from the Unity Asset Store, providing an aesthetic of a fantasy adventure to the player and enabling me to showcase my gameplay in two distinctly different settings.

Project Goals

  • Create a project that could become a vertical slice of a bigger game
  • Create a project that would convey a sense of adventure to the player
  • Challenge myself to create a whole experience from scratch to finish, creating everything besides the models, animations and some particles.
  • Challenge myself to learn new aspects about the Unity engine
  • Have fun!

 

 

One of my wishes was to create a world that felt mysterious and alive

Planning and pre-production

I started off by looking at the Unity asset store to figure out what my limits were asset-wise and ended up choosing a selection of asset packs that felt like they would suit my purpose and the feeling I wanted in the game. It was also important that the character models were animated.

My planned core features were movement and attacking, which is why I started off with a cube-based prototype. Using only cubes I built the basic systems for movement, health and damage within the first couple of days of the project. Even though these were extremely iterated upon as the project went on, it was still valuable and motivating to have some functionality up and running quickly.

Once I had the basic systems set up it was a matter of deciding exactly what kind of game I wanted to make when it came to the controls. I had three main ideas; Bastion-inspired, Zelda: Wind waker-inspired or Diablo 3-inspired. I ended up testing out all three within the first two weeks, devoting at least a couple of days to each idea to see which one was the most manageable, and ended up deciding based on usability testing. I then made preproduction lists with game mechanics and ideas as a base for my production phase.

 

What the combat looked like in the first days of development. 🙂

... and what it looked like in the end (in fast-forward)

 

The player runs effortlessly across the sloped bridge

Taking it to the next level

Once my basic systems were in place and somewhat finalized, it was a matter of iteration and optimisation to make everything stable and expandable. To achieve the level of polish I was after, I had to evolve my own knowledge. One example of this is the use of navmesh. Originally, my movement wasn't based on a navmesh, since I had never previously used the system. I added navmesh and navmesh agents in order to enable smooth movement in stairs and slopes. 

After adding the navmesh agent to both the player and the enemies, all basic systems had to be adapted accordingly. I am happy that I chose to do so since it made my movement a lot better and also evolved my knowledge in Unity.

Using navmesh now meant that I could have stairs and slopes in my levels without the movement being wonky or enemies getting stuck. It brought a new level of polish to the movement of the game. It also meant that I could build levels with a lot of verticality which was my original intent. So while I might have spent some time on the implementation, it definitely paid off in polish and saved time on the level design end.

 

Modular Event Design

I got to a point where I had functioning combat (with just a few bugs 🙂 ) and a basic environment, but aside from that it was an empty experience. This is where I changed focus to make my game more interesting. I had to come up with an easy concept to make my levels more interesting that I could reuse for many purposes.

What I came up with was to make a trigger event that changed the camera angle of the player, to draw attention to focal points in the level. This event can take any camera in the scene and create a smooth interpolation from the main camera to that camera. The new camera can then become the  main camera, or it can interpolate back to the old one when the player exits the trigger. All the settings are easily accessible as checkboxes in Unity.

This was an easy way for me to lead the player forward and also create the feeling of a story to the environment, since these events become like a small cutscene where the character notices something about the environment. I have also combine these events with custom events that I made to create smooth transitions between animated cameras.

The settings for one of the camera events in my game

An example of an arena where the exits are blocked off with spiky gates

Another modular event I made resulted from a change I made to the enemy spawn triggers that allowed you to add gates, trapping the player in an area with a bunch of enemies. This turned out to be a great decision since it immediately added a whole new level of action to the gameplay.

Each event can be trigged either from range or from a trigger and can spawn any number of gates and enemies in any constellation. This enabled them to be used in many different places and for many purposes. It also collaborates with the component managing the movement of the gates so that they smoothly appear when the area is entered, and disappear when all enemies are dead. 

Level and Environment Design

The most important thing regarding the level design in this project was that the levels should be linear, but still feel like part of a larger world. Part of this was achieved by choosing assets that complimented each other. Another important part was getting feedback from playtesters and advice from the graphical artists at school, making sure that the levels always looked alive. The biggest part to achieving this goal was about building the levels with a story and theme in mind.

Level 1: Entrance and Waterfall Cave

Story

In the first level of the game, the player enters a secret temple, and discovers a staircase that has burst up from below. Entering it, she manages to find an underground waterfall and a lake, swarmed with orcs. In the middle of the lake there is a mysterious evil entrance to unknown depths. In order to reach the entrance the player has to go to another part of the temple and press a button which will close the gate to the waterfall, enabling her to go through the evil entrance and take on what's inside.

A glowing red staircase has appeared! What could it be?

Combat

This area is the first area, and it's where the player gets accustomed to the game. I start off by introducing a lonely small orc together with instructions for the controls as a tutorial area. Next, I trap the player on a bridge together with three enemies. Since these enemies are very easy it is not a real challenge, instead it serves as a way of introducing the locked-in combat concept.

Moving forward, the combat challenge gradually increases until the player finally is locked into an arena with a large, more dangerous orc. After this ordeal, the player is rewarded with a cool event (see below!) as they unlock the entrance to the next level. Moving towards it, I spawn some more enemies in the player's way to keep the game from getting stale and also creating the illusion of enemies emerging from the depths to meet the player.

 

 

 

Using small means, I created the illusion of a big change

Environment

To keep with this story in my level design, I chose to make the player feel like they always go "deeper" by keeping the general direction of the level downwards. Even when the player needs to climb a different part of the temple in order to shut down the waterfall, the result of this is that the player then gets to venture below the lake, further contributing to the feeling of going downwards. I've received feedback that going below the waterlevel was surprising and intriguing to the playtesters and I am very happy about how it turned out.

I also used textures and particles to my advantage, making sure that the "evil" parts had a red emissive texture on them signaling the danger, as well as hints of reddish clouds surrounding the areas. The path the player is supposed to walk is instead highlighted with mysterious blue runes and fireflies. The rune-like patterns on the textures were already present, and I used them to create custom emissive textures in Photoshop for this purpose. The fireflies and clouds are particle systems originally meant to be dust, that I modified.

 

The player's first encounter with a large orc


Scripted Events

In this level, I regularly use the enemy spawn events with gates to create small combat arenas. I also use two instances of camera switch to bring the player's attention to the waterfall gate as a reward for exploring the level.

There are two custom events. The first is a simple event that triggers the animation of a pillar, falling behind the player and blocking their path backward. An impactful moment but rather simple to implement, since it only required an animation and a navmesh change. This forces the player to move downwards and creates tension.

As a reward to clear the difficult arena the player receives the next event, and the coolest one, the "Waterfall" event which you can see to the right. This is usually the moment all players like the most about my game and I'm proud that I managed to create such an impactful moment. In reality, it is a matter of coordinating a few animations and fades which creates the illusion that the whole level is changing. However, since I create new level space with this event, I also involve a custom navmesh and new enemy triggers.

 

Level 2: Burning Underworld

Story

In the second level, the player has gone through the underwater entrance and finds herself deep underground right in the enemy's nest, surrounded by lava and hostile orcs. Here, the player fights their way through hordes of orcs and navigates their lava-filled caves in order to reach the final destination - the Evil Leader's Chamber.

The player is being both directly led by the blue runes, as well as by the direction the props are facing (green)

Combat

In this level I significantly up the number of enemies. Since my combat loop is so repetitive, I want the player to feel significantly more challenged as a means of varying the gameplay between the levels. It also fits well with the theme of the level. I use a lot more large orcs, gradually upping the number until the player faces four at once.

Scripted Events

In this level the enemy spawn with gates-events are very prominent since they provide the biggest challenge for the player. I also use some of the camera switch events in order to draw the player's attention to the end of the level. Near the end, I choose to swap out the main camera twice in order to maintain the focus on the exit all throughout the end of the game. 

There are two custom events in this level. One camera animation triggers from a camera switch and gives a nice, cutscene-like view of the evil gate. This is a permanent camera change which makes the final moments of the level more dramatic and ominous. The other event is the player stepping onto a platform which takes them across a lava lake, seen to your right.

The platform event required several different steps since the player needs to be immobile during the journey. The navmesh agent had to be turned off and all forces affecting the player removed, or otherwise she would slowly spin on top of the platform. I also had to bake a few different sets of navmesh in order for this to work out. However, I wish I had incorporated this type of event more in my game since it contributed a lot to the feeling of making a journey.

 

Environment

In this level I might have gone slightly overboard with the emissive lava colours, but I wanted this place to just scream evil! This level is filled with reddish vapour from the pits of lava as well as a lava river slowly running with the help of a scrolling UV script. However, the player's path is still lined with mysterious blue.

Creating this level I was focused on creating interesting environments for the lava, and enabling nice combat moments. Looking back, I would have improved the placement of the level exit and made it a more clear focal point of the level since I think it would have made more sense and enabled more cool-looking camera angles. I would have also made a more epic fight just before the player enters to make the conclusion to the game more impactful. Still, I think what I achieved was good from both a gameplay and an environment perspective since the lava mountains look cool and enabled nice arena moments.

 

The player has cleared an arena
The player rides a magical platform over the lava lake

Main Problems and how I solved them

Losing my vision

After the first prototyping stage, I got to a point where I slightly lost track of what I wanted to create, and I started creating the controls and fine-tune the movements without having a reference game in mind. Even though I learned a lot from it, of course it turned out to be a mistake since the product I ended up creating didn’t feel good.

Solution: Research
As soon as I realized that I did not have a vision, I went back to researching. Eventually I decided to look at Diablo 3 as my reference game for controls and combat. From there on, things went straight forward. Since I had a clear reference I could rewrite my movement rather quickly because I knew exactly what result I was after.
This was a very valuable lesson and I later applied my knowledge when creating my Portal 2 level by making sure that I had a clear, research-based vision of my end result before starting my work. 

 

To make the level less combat-focused I use modular camera events to make cutscenes such as this

 

 

Chaarge!

Sub-par combat

With Diablo as my reference game for the controls, naturally I wanted combat to be a core feature of the game. Inspired by the monk character in Diablo 3 for my main character, I created a 3-strike system for the regular auto attacks, and also created a secondary attack. Quickly, I realised that the systems had gotten too extensive for me to be able to eliminate all of the bugs, and eventually I felt like my time could be better spent wrapping up the project.

Solution: Killing darlings and changing focus
The secondary attack ended up being cut from the final product since I figured time was better spent on polishing the basic attacks and the levels as a whole. As a result of the combat being a bit sub-par, I had to shift focus away from it in the game, by using a lot of events in the levels such as camera animations. Even though it was not ideal in a game where I originally wanted to focus on the combat, I feel like the events did bring a whole lot of polish to my level and I'm glad that I chose to prioritize them. 
In the process, I also got the opportunity to build "modular" events, that I could pop in anywhere in the level and reuse in a very easy way, which saved me tons of time and gave a lot of output for a small effort.

The problem of repetitive gameplay

I felt that it was extremely important that the core mechanics ended up at a good level so that the player would enjoy playing the game. This is why I chose such a simple concept of "left-click to attack the enemy". However, this becomes a bit dull and repetitive after a while. I chose two different approaches to tackle this

Three strike system

I spent a lot of time trying to make the left-clicking seem more fun and dynamic, by implementing a three strike system. If the player strikes thrice, the third strike will be a swirl dealing a lot of AOE damage to all enemies around the player. In hindsight, this system needed more feedback to the player in order to be as rewarding as I'd hoped. For instance, if the player was signalled when the third strike was ready via the UI, it would have been a lot more impactful and affected the gameplay. As it is now, most players don't notice it or play around it. In comparison to the amount of time spent on it, the output was not as big as I'd hoped. Nevertheless, the system was very fun to make and I kept it in the game.

 

Secondary attack

My primary choice to break up the gameplay was to implement a secondary attack. My character had a pretty cool kick animation which I really wanted to use, making an AOE move with a cooldown. I got a long way with this attack, but in the end I couldn't justify spending more time on it. I got to a point where I felt like I either could have two attacks, but nothing happening in the level, or an eventful level with only a single attack, and I chose the latter option.

 

In the end, my game is still very repetitive. When going back to this project, one of my first priorities will be to add UI to the three-strike system in order to make it have the intended effect on gameplay. Then, I will try out one of my other ideas for a secondary attack. Based on playtesting, the players really want something ranged in my game and I'd love to try and make that happen since I believe it will be very worthwhile for the quality of the game

 

The gameplay is a little repetitive but the levels are very diverse

Starting the game.

Closing thoughts

This project was a lot of fun and while creating it I found myself delving deep into areas of Unity where I’d never ventured before, such as different settings for the animations and the navmesh system. Since I’m now a lot more well-versed in Unity than when I started the project, some of the basic systems like movement and attacking could use some more polish. I also feel like there are features missing for the game to feel like a complete experience, such as incentives to explore every corner of the map (for example, loot).

Overall, I feel very pleased with what I accomplished considering the timeframe and the extent to which my knowledge has developed over the course of this project. I feel like I can now be confident in my ability to develop my skillset independently and take responsibility for my own learning process.

Screenshots