Posts

Adding Force to the Balls: Creating Balls - Task 2 Part 3

Image
This script adds force to the balls being created and allows the balls to have force used in a random range in a positive direction and a negative direction using vector3 you can access the x, y and z value for the balls.

Code Explained: Creating Balls - Task 2 Part 2

Image
This is the code we used to create balls by pressing a button. The variable 'm_prefab' has been declared in the public class as a gameObject meaning that a new game object has been created that can be used in Unity. 3D vectors are structure that are used throughout Unity to pass 3D positions and directions around. It  contains functions for doing common vector operations. Vector3 -  Creates a new vector with given x, y, z components. Random.Range - Returns a random float number between and min [inclusive] and max [inclusive]. This range is between -1f and 1f and is the same for the vectors x, y and z value components. Quaternion - Constructs new Quaternion with given x,y,z,w components. Instantiate - Clones the object original and returns the clone. To summerise, this code creates clones of the ball prefab and spawns them randomly. Bibliography & References [1] https://docs.unity3d.com/ScriptReference/Random.Range.html ...

Unity Project 2: Creating Balls - Task 2 Part 1

Image
This project uses a button that when pressed the scene produces a new ball as a clone. This hierarchy displays all of the elements needed to create this project.  By inserting a canvas and panel, the balls had a place to land. Hierarchy for the ball project  The inspector allows us to change the position, rotation and scale of the ball. Other options can also be changed in the inspector which includes rigidbody, collider and rendered for the mesh. Inspector for the ball object Gamespace These are the textures I have designed that will wrap around my objects and act as a skin.  Textures Different materials can be added to the objects (Panel, Ball etc.) to give them originality and a realistic feel. Materials By storing objects already used as prefabs means that they can be re-used making the game creation more  efficient. Prefabs When the spam balls button is pressed, the ball object is cloned creating m...

Code Explained: ButtonCheckScore - Task 1 Part 2

Image
This code checks the score inputted in the text field and displays the colour of the medal that the user would have won depending on the score.  This is an explanation of the code used for this task: The public variables m_colours as the type 'colour', m_inputfield as the type 'input field', m_medalImage as the type 'image', m_mediaText as the type 'text' are declared. The function GetScoreandSetMedal() has no parameters and uses a try catch statement which are used to handle exceptions. The integer variable 'value' is declared. The try block is where exceptions occur and therefore handles what happens when an unvalid input such as a letter is inputted into the text field. The try block uses int.parse to convert the text string inputted into the input field into an integer which is set in the integer variable 'value'. However if a random letter is inputted instead, then the statement catches this exception and therefore sets ...

Unity Project 1: ButtonCheckScore - Task 1 Part 1

Image
We created a way for a gamer to type in their score from a game. The text and colour of the background panel changes depending on their score.  Default colour of game before any input When the score is less than the value set for the variable 'silver' then the panel's text changes to 'bronze' and the colour of the panel is set to changes to a browny-bronze colour. Bronze display When the score is less than the value set for the variable 'gold' or equal to the value set in the variable 'silver' then the panel's text changes to 'silver' and the colour of the panel is set to change to a silver colour. Silver display When the score is more than or equal to the value set for the variable 'gold' then the panel's text changes to 'gold' and the colour of the panel is set to change to a gold colour. Gold display The inspector allows us to change the colours of the panel and set the varia...

Indie Game: The Movie

Image
Indie Game: The Movie is a documentary made in 2012 which explains the lives of people working in the video game industry, their struggles in relation to funding and social life and the pressure to meet specific deadlines. This video talks about three games which include: Super Meat Boy (2010) Super Meat boy was designed by Edmund McMillen and Tommy Refenes. It was then developed by Team Meat which currently consists of Edmund McMillen and Tommy Refenes. It is about a boy with no skin that travels to find his girlfriend who has been kidnapped by a character named Dr Fetus. The aim of the game is that the player plays as Super Meat Boy and has to travel through harsh conditions and difficult obstacles to reach his girlfriend who is made of bandages. I would describe this game as a platformer that is made to be difficult which compensates for that by giving you unlimited lives and automatically restarts the level. Like other games for example 'Cut the Rope' ...

The perplexing puzzles of Fez

Image
I found this video very interesting because although it's main purpose is to explain the difficult puzzles used in Fez it also explains how puzzles are used in general and how some puzzles get you to think literally and some laterally. The Youtuber creates physical objects which help him complete the game. He finds a way to translate the alphabet used in Fez as well as the numbering system which is vital in specific puzzles. Bibliography & References [1] https://www.youtube.com/watch?v=iefXGaaVERg