You are on page 1of 3

Israr Hussain

M3 - Unit 22
In Unity 5 GameEngine I have used the console to collect data about the tests carried out.
The Debug. Log method was used to retrieve the evidence that the scripts worked
successfully and the game did not contain errors.
The screenshot below shows the writing shown when the shot was taken and when the
ball had scored points. Once the game had been Won the scores saved and the script
successfully debugged the words “ScoreSaved” in the log, The same occurred with the
“GameWon!” and for the Replay button (“Replay Pressed”)
I tested the main menu button by selecting the button named Main Menu, the log stated
MainMenuSelected which shows evidence for the main menu button working.
I had also carried out test for the actual game controls, (E and Spacebar) when the space
bar and E button were pressed the console showed (“E Pressed” & “Space Pressed” ) this
also shows evidence that the controls are fully working in the game therefore the white box
testing is successful for the actual users side of gameplay.
Furthermore i also tested how the waiting system worked along with the respawn system. I
did this by telling the scripts to debug in the log when the triggers had been disabled, the
scripts has done this by showing “tiggers have shutdown” in the console log showing that
the script executed the lines of code without trouble.
The HASCOLL = false means that the HASCOLLIDED boolean is false therefore the
triggers can be turned back on for the second shot to take place. The waiting system also
debugged waited 6 seconds showing me that there has been a successful wait of 6
seconds before the “respawning” took place.
When the ball respawns the attempts script minuses 1 from the value e.g 6 will be into 5
when the “MinusAttempts” is shown. I implemented this
debug.log(“MinusAttempts”) after the code Attempts -= 1;
to show
that the minus
has
happened. I
have also
shown this in
game
(screenshot
below)

Israr Hussain

M3 – Errors must be sorted.
In this document I will discuss the errors I have seen while playing the game, although I did not
face many errors during gameplay I will discuss some of the errors that I have fixed.

1. I have fixed the errors of the ball flying out of the stadium; I have done this by making the
colliders of the wall bigger in size so that they have more mass which can stop the ball from
going through the walls and into the open space in the scene.
The walls have a Box Collider on the game object which in unity is a Collider in the shape of a
box, it can stop other colliders from passing through if it is configured correctly.
I have a Sphere Collider on the ball which is a sphere shaped collider specially made for sphere
shaped object, which in this instant can be used on a football.
The football is configured to rebound of the walls when the two objects collider (Ball and wall) the
below screenshot of the
football is showing that there is a sphere
collider attached (green
lines around the ball)
The below screenshot of the wall shows
that the box colliders are attached with a
larger size than the actual walls (vertical
green lines)

Israr Hussain

2. Another error that I have faced during the testing period is that I saw that the mouse controlled
movement that depends on the directional shot was not performing like it was supposed to as the
ball was shooting more in a left direction than straight.
After looking into the error I had checked the scripts and everything seemed fine, however I had
changed the static (Showing in the screenshot) position of the camera to be exactly in the middle
which
helped
fix the
error
and
allow
the ball
to
shoot
in a
straight

direction.
The rotation is 0,90,0 which are right in the middle
view this is what fixed the error.
Before & after the rotation values.

of the