Development Surgery 19/05
- kw4u19
- May 25, 2021
- 4 min read
Updated: May 27, 2021
Aims for this session:
Implement UI
End scene - How?
How to implement sound?
This was the final development session with James before and the deadline is the very next day. At the end of today ,all five of the game puzzles will be functional as I just need to finish off with the panpipe puzzle later today. I booked this development surgery with James to cover the last few things that I needed guidance with, UI, Sound, and how to end the game. I was planning to just incorporate an end screen that would take you back to the main menu but James had some more creative ideas.
UI
The start screens function is to display at the beginning of the game and be used for advert/promotion purposed. In the vertical slice, the detail that is shows is the name of the game, the region name and the play bottom.
How to implement? - Drag the start screen into place at the beginning of the scene and then drag the main camera over the start screen and position it so it is fully in the camera frame. Add a box collider to cover the start button. This will be the trigger to start the game once the player clicks on it.

Here is the script that is applied to the start button. On click, transform the position of the main camera, and trigger it to start moving.
Prompts

I initially thought that the UI prompts should pop up on the screen when the player needed to see the, activated by a trigger box somewhere on the platforms. But James suggested that they just be part of the scene and the player can walk past them and stop to read if they need to. They fit in the scene because they have been designed with the colour scheme carefully considered so it does not take away from the scenery.
Other UI I was planning to get put in during this session, was the pause and menu screens as well as an end screen that would give you the option to restart or quit. But James told be that this UI was not necessary for the vertical slice so not to bother.
The End Scene
The player make the final courageous leap off of the final platform, as planned in the initial project scope, but rather than descending downwards into the unknown, they fall upon a cloud that wistfully carries them away into the distance.
How this was set up?
First added a box collider with a trigger and rigid body, with clouds behind and in front of it so when the player stood upon it, they would be surrounded by clouds.
We did attempt to add a particle system so that as the player was carried off by the clouds, a trail would be left behind. However I tried my best to finish setting this up after the session and I could not work out how to stop the trail looking like black smog rather than fluffy white clouds. It would have been nice to get this sorted before the arcade event but the end scene still looks great and conveys the messages of enlightenment, discovery and beauty proposed in the scope.
Another feature we attempted to implement but did not succeed with, was the game fading to black once the player had floated away and off screen. We added a canvas to the scene and wrote into the same script (CloudFloat), instructions for the canvas to fade to black, though after testing this was not functional and we had run out of time for the session, so I had to disable that part of the script.
The script:

The script includes the three parts we tried to implement.
When the player collides with the trigger, the clouds position is transformed, floating away along the x-axis.
A small force is added to the rigid body of the cloud to achieve this.
We did also add a coroutine so there was a delay between when the player lands on the cloud and when the cloud starts moving. This made for a smoother visual.
Although we did not manage to successfully implement two of the ideas, I am happy that we tried because I learned a little bit about particle system and how to set them up. The end scene really is beautiful and was a great addition to the vertical slice, and I know people are really going to enjoy the feature as much as I did, because it just is a sweet interaction that brings the game to a close really well. It inspires introspection I would say.
Sound
The sound that needs to be put into the vertical slice, is the soundtrack composed by Emilia and the three sound effects that have been sourced online. During the development surgery I asked James to show me how to add in both types.
The soundtrack clip was added to the main camera. This is done by adding an AudioSource component in the inspector of the main camera. So when the game starts running, the music immediately starts playing. It is about 2 minutes long and some players will take longer to complete the level, so the audio clip has been put on loop.. It takes me about 2 minutes but of course I made the game, so it a lot easier for me to get through the level very quickly.
The boulder thump sound for whenever a bolder hits the ground has been added again into an audio source component, but onto the boulder prefab.
After testing, both sounds worked perfectly and I was glad that it was simple enough to get them into the build and functioning.
Reflection
This development surgery was successful because I was able to learn about the last few features I did not understand but needed applying to the vertical slice. At this point the vertical slice is almost complete and just requires a few more additional assets such as the other two sound effects. I am so happy that we have got to this point and we're almost at the end!
Next Steps
Put in the music note animations and add into the eagle 2 script the function so that it plays upon interaction with the panpipes.
Add final sounds effects.
Make final checks so everything is running smoothly and working as it is expected to.
Comments