At first glance, Wings of Fury might seem like a simple game with not much depth. However, if you look under the surface, there are many underlying complications, which I talk about below.
I used a program called L3DT which is a program designed to create large terrains. I used a random seed to create a mountainous area and then used one of the filters in the program to make the edges seamlessly tile with each other. Once this was done I exported the heightmap as a .RAW and imported it into Unity. Once it was in unity, I used a script that I found on the unity forums to tile 9 terrains under the player so that it looks infinite.
I had a lot of trouble importing several assets into unity (Red Baron and Biplane). Unity wasn’t recognizing them as a .FBX or as a .blend. In the end I had to scrap those models.
For lighting the scene I used a free skybox package from the unity asset store called Sky5X One which had a very nice detailed night sky skybox. Originally I had a skybox with a sunny clear sky but when you are flying a plane with a clear skybox you can get very disoriented. The night sky skybox is a lot better in this way because it has high contrast and lots of details like stars that help you orient yourself. There were several ways I could have chosen to light the scene. Originally I had the skybox giving out ambient light but the result wasn’t quite what I was looking for. After giving up on the automatic skybox lighting, I ended up opting for a directional light with a similar colour and intensity to the skybox. This achieved the atmospheric deep blue night effect I was going for.
As you can see, the colours of the skybox and the ground match up quite nicely
Creating UI in Unity
Before this project I had no experience with using the unity UI system. I watched a few videos (this one in particular help me the most) and I quickly got the hang of it. For each button that was created, a script had to be made specially for it.
I made 2 different menu screens for this game. The first is a splash screen (pictured below). The purpose of this is to act as a sort of introduction to the game.
The second menu screen (also pictured below) is the main menu. This is where you can view instructions, start the game or quit the game. Originally the menu was just a static screen with not much going on. Eventually I realised that having a scene where the plane flew in a straight line while the camera followed it made for a much more interesting menu. In order to make the plane go only forwards, the original plane control script had to be edited to remove the turning and slow-motion controls.
The timer was a fairly simple feature to implement. All that had to be done was create a script that every frame removed the time since the last frame from a counter. From there all that remained was to tell a UI component to show the amount of time left.
The way the scoring works in Wings of Fury is that every time the player passes through a hoop, points get added to your score and time gets added on to your timer. There was an issue with detecting whether the player had passed through a hoop. Because of the way the player was being moved around the game world, colliders were disabled for this object. In order to get around that, what had to be done was check the distance to each hoop every frame and if the distance is below a certain level, assume the player passed through the hoop. This is a less than perfect method, but it does the job.
Particle effects are among the easiest ways to add graphical depth and provide the user with feedback. One example of particle effects that was used in Wings of Fury was when you pass through a hoop, an explosion of particles appears.
Slow motion was a fairly easy feature to implement. Unity has a default variable called Time.timeScale which has a value of 1 when time is going at a normal speed. Changing the value of this variable has the effect of changing time. This meant that all that needed to be done to add slow motion as a feature was create a script that changed the value of this variable to a value lower than 1. The only issue with this method was that the slow motion didn’t affect the speed of the countdown timer. This had an easy fix of just limiting the counter speed when slow motion was enabled.
The jet trail was not a particularly difficult feature to add as Unity has a built in component called a “trail renderer”. The trail renderer takes a material and uses it to create a trail behind a moving object.
This was probably the most important stage of development. Without the hoops, the game had no goal or purpose. In order to spawn the hoops in random spots I created a script which took in a minimum and maximum x and z value for the area to spawn the hoops in and an amount of hoops to spawn. The y value was always higher than the terrain’s maximum height. Once the hoops were spawned all at the same height, they had to be lowered down based on the height of the terrain below them. I used a raycast (a line drawn in a certain direction to get information of what it hits) to get the terrain below each hoop and then set the y value of each hoop to be the height of the terrain below them + 60.
I spent a long time looking for an appropriate music track that was royalty free and copyright free. The song had to have a light-hearted fun feel to it so that it would fit the theme of the game. After a long while searching, eventually I stumbled upon Funk Interlude by Dysfunction_AL which ticked all the boxes.
It was also very difficult to find a sound effect for a jet engine. There were a few that were not quite right for Wings of Fury because they were recorded on a commercial flight and had people talking in the background or they didn’t loop. Eventually I realised that I would probably have more luck trying to find a rocket engine sound effect, which was when I found this. This is an almost perfect sound for Wings of Fury, the only issue with it is that it doesn’t loop perfectly. When the game is being played however, this doesn’t matter all that much as the volume on the jets is quite low to keep it as a subtle background sound.
The minimap was not too difficult to implement. The way I chose to create a minimap was to add a new camera above the game world looking down and restrict its area on the screen so that it would only be in the top right hand corner. Once the camera was in place, I needed to create a script that would keep the x and z positions of the camera the same as the players so that it would follow the player around. At this point the player couldn’t really see a whole lot on the minimap because everything was so small so I added some coloured cubes above the hoops and the player which only render through the minimap camera.