Posts

Showing posts from May, 2018

Gamespace: Future Developments

If I were to continue developing this Gamespace and turn it into a fully functioning game, I would: Add levels (Each level themed in a different way) e.g. ice level that may be more difficult to control as the ice is slippery etc. Different Characters (shapes/skins) that may be unlockable Menu System Pause Button 3rd Person Camera to work correctly  Increase the size of the ball feature to add more difficulty Different abilities (Dash, Brake, Higher Jump etc.) that may be unlockable  Different variety of enemies Timer for time trials (Scores could be uploaded onto a leaderboard) Leaderboard (Most collectable Items, Quickest timed run etc.)

Gamespace: Exported Final Build

Image
Overall I am very pleased with my Gamespace as it includes the elements that we talked about in class and includes additional features that were not covered. It looks professional and is fun to travel in this Gamespace. My final build meets my original concept idea's well with the time frame that was given. Improvements from User Testing I attempted to incorporate the additional features mentioned in my user testing, however when attempting to change the camera so that the screen moves with the ball made my Gamespace spin. I attempted many other ways of achieving the result I wanted however this was not possible. Although I did incorporate all the audio elements that I wanted to include in my Gamespace. This included whenever the player was near a rain cloud enemy, a rain sound would play. The volume would increase the closer the player was to the object and decrease when the player moved away from the object. I was especially pleased with this result.

Gamespace: Inputting Audio

Image
I inputted the background by attaching the audio source component to my player. I checked the loop and play on awake option so that the background music would constantly play.  Audio Source for the background music The audio source for the 'Rain Loop' sound was attached as a component to the rain cloud enemies. The Loop and Play on awake options are checked as I want this sound to be playing continuously. I changed the values for specific settings/effects and changed the lines on the graph. Therefore when the player was near the rain cloud enemy, the volume would be quite high (shown by the red line on the graph) and when further away the volume would decrease. Audio Source for the rain loop I added this code to the PickUp script so that when the player collides with a gameObject with the tag 'Player'. The audio source would be received and the ball collection sound would be played. Code snippet from PickUp script This was the au

Gamespace: Audio Collaboration

I collaborated with Matt Burrows who studies a BSc in Sound Design Technology at the University of Hertfordshire. Matt composed the background music for my Gamespace as well as my ball collection sound. He looped the rain sound so that it continued when it was looped in unity and didn't cut abruptly like it did before being looped. The music composed was used in the background of my Gamespace which fitted really well with my overall theme. Collecting balls Raincloud enemy

Gamespace: User Testing

Image
When testing my close to final build game, I discovered that when rolling my ball towards the screen instead of away from the screen, the camera wouldn't rotate meaning that it was difficult to see where the ball was going without the scene view. Moreover, the only audio that was currently included was the background audio music. I wanted additional sounds when the collectables were collected, and a rain sound to play when the player was near the cloud enemy.

Gamespace: Increasing Size Attempt

Image
My original concept was that I wanted to increase the scale of the player whenever the player collected an item to increase the difficulty of the Gamespace. I attempted many times to make this work however I was unsuccessful. The 'IncreaseSize' script basically tells the sphere that when it has collided with an object that uses the tag 'Item' increase it's size by 2 in every axis. My code worked logically but when testing, it would not work. Attempted Increasing Size Script

Gamespace: Count & Win Text

Image
I wanted a way to count up the number of items the player has collected in the Gamespace. Therefore I decided to add a count feature and a win text which informs the player that all items have been collected in the Gamespace. Game View including count and win text The count feature adding up the number of collected items Win text displayed as all items have been collected The count and win text are both displayed on the screen as they are child objects of the canvas object which also holds the health bar. The Render Mode has been set to Overlay so that both pieces of texts are overlaid on the screen and are separate from the Gamespace. For example, they aren't visible in the background of the screen and are clearly in the foreground. Moreover, the UI scale mode in the Canvas Scaler has been set to 'Scale With Screen Size' meaning that if the screen is made bigger/smaller, the count and win text will re-adapt and fit with the screen size.

Gamespace: Restarting Game

Image
I have set the Gamespace to restart whenever a player falls off the edge of the world or the health bar points have decreased to zero due to the rain cloud enemies. I found that if I put a cube underneath my landscape and the player collided with it (due to falling off) I could set the Gamespace to restart which means that the player does not need to manually restart the game by reloading the exe file. I made this cube invisible by removing the mesh renderer component as the Gamespace would look unprofessional and messy if the cube could be seen. A tag named 'Respawn' is attached to the cube so that it can be identified in the script. Restarting the Game by falling using collisions This is the inspector for the restart cube, a box collider has been added to the object so that the script can detect when the player has fallen off of the landscape. Restart Cube Inspector The 'Respawn' script detects when a collision has occurred with the invisible box

Gamespace: Health Bar

Image
I decided to add a health bar so that when the player collides with an enemy, they lose health. When the health point value is equal to zero, the Gamespace restarts. Health Bar Game View The health bar gameObject held the foreground and background for the health bar. Health Bar Inspector This is the inspector for the background used in the health bar.  The background is only shown when the player loses health as the foreground bar decreases in length. The colour has been changed to a dark grey to fit the sky theme. Background Bar Inspector This is the inspector for the foreground bar used in the health bar. This bar decreased in length when the player loses health. The X Pivot has been set to zero so that when the player loses health, the bar only decreases in length from right to left. When the bar does not exist anymore, the player's health is at zero and the Gamespace restarts. Foreground Bar Inspector The 'HealthBar' scrip

Gamespace: Enemies

Image
I wanted to create an enemy that when the player collides with the object points are deducted from the health bar. I also wanted my enemy to fit with the theme and therefore made it look like a raincloud. Raincloud enemy with added box collider Raincloud enemy deducting points from the health bar This is the inspector for the raincloud enemy.  The 'Enemy' script is attached and a box collider component is added so that when the player collides with the enemy the script understands that a collision has occurred. Cloud Enemy Inspector The Enemy script works by using an 'OnTriggerEnter' function. Therefore, when the player collides with the box collider that encapsulates the rain and rain cloud this function is called. The variable 'healthBar' is received.  If the value assigned to the health bar is not equal to nothing, then the health bar takes 10 damage when the player collides with a raincloud. Enemy Script To make

Gamespace: Moving End Platform (Panel Animation)

Image
Once I had got the platform to move back and forward, I decided that I wanted the panel to lift up depending on whether the player was close to the platform otherwise the panel would stay downwards. Panel staying down This is the inspector for the moving end platform. The 'Panel Open for Player' and 'Panel Closed for Player' scripts are attached to this object. A sphere collider has also been added so that when the player collides with the collider this triggers the panel to lift. Moving End Platform Inspector Sphere collider where the panel is lifted The 'PanelClosedForPlayer' plays the closed animation when the player has not collided with the collider. If the 'IsOpen' parameter on the animator is false then the panel will close otherwise the panel will be open. Panel Closed For Player Script The 'PanelOpenForPlayer' script uses the 'OnTriggerEnter' function which is triggered when the player

Gamespace: Moving End Platform (Movement)

Image
I wanted my last platform to move and say the word 'FINISH' so that the player knows where the end of the landscape is. Platform Moving Away Platform Moving Closer This was the inspector for my moving end platform. The Script 'Moving End Platform' has been attached to it. Moving End Platform Inspector The Vector 3 variable 'initialPosition' is set to private so that it cannot be changed in the inspector. The 'initialPosition' variable is assigned to the object's location using 'transform.Position' in the Start() function. In the Update() function, the position of the platform is set using the initial position of the platform (using the variable 'initialPosition') plus the new 3D vector where the X-axis is equal to zero, the Y-axis is equal to zero and the Y-axis is equal to a Sin wave multiplied by three to make the wave bigger. This moves the platform continuously on the Z-axis. Moving E

Gamespace: Collectable Item Coded Animation

Image
After successfully picking up one ball, I duplicated this object and placed them all over the landscape. Items spread across landscape To make the object more interesting I wanted to add movement and rotation to the object as all items were completely still. Item I attached two scripts to the Collectable Item inspector 'Idle Move' and 'Constant Rotation' where the amplitude was set to 0.15, the frequency was set to 2 and the speed of rotation was set to 90. Collectable Item Inspector The 'Idle move' script has two float variables 'amplitude' (how far up the item goes when moving) and the 'frequency' declared as public meaning that they can be edited in the inspector. The Vector3 variable 'initialPosition' is set as private meaning that it cannot be edited outside of the script. The initial position of the item is assigned in the 'Start' function. The value assigned to the 'initialPosition' var