Monday 4 January 2016

Walkthrough, Questionnaire Results, Conclusion and Evaluation of my finished Unity Demo


The main sources used to make my game:

When creating my platformer game I used this tutorial series as a guide for help implementing various mechanics it offers:


(Link: https://www.youtube.com/watch?v=oK_NzdVSxaQ)

However, even though I used a tutorial for assistance, I improved and built upon multiple things he did in the series to follow a more professional standard, such as (as mentioned in the damage blog), optimising the spikes damage and fireball properties code into running more efficiently in just one script, optimising the scene management order when using 'Application.LoadLevel' in my Unity build index (to organise my level structure since I have a lot of scenes and stages), or changing a lot of the collision functions to hit an object with a tag instead of just any object (or else for example a stray enemy projectile could accidentally set off a trigger. So instead it must be the player that collides with said trigger). I also added a bundle of content that was never included in the video series from outside sources (like the Unity website and me personally posting in Unity Answers), such as music/ scripted sound, a main menu, grabbing ledges, bottomless pits, an in-game tutorial with level-design that gets harder as the player gets better, etc. So I feel I improved upon the code provided and optimised it, while using it in a more meaningful way.

I also used a different video series (shown below) to create my game's main menu, but still optimised the code to fit my needs. For example, the tutorial covers various topics like posting links and entering usernames things that aren't necessary to have in a platformer game. Also, because I used Unity 5.3 to make my game (before downgrading to 5.1, as that's the version installed on the Uni computers) I used 'scene manager' to manage and organise my game's levels over just directly using 'load level' as said in the video. I changed the code back to load level Unity 5.1 later on though but amended the code myself after checking the official documentation from (SceneManager, 2016) at the official Unity website (somewhere I also found detailed documentation for various areas of my code (like sound)), to compare how different the scenemanager API works. All that helped we learn a deeper understanding on how scenes are handled in Unity, and also how scene manager and load level differ in nature. My research into the differences in these functions and also seeing how they compare is an example of me following professional standards, with changing and tweaking the code in my game depending on the Unity version it's running.


(Link: https://www.youtube.com/watch?v=SgOCIlQx5Gw)


Video Walkthrough of my Game:

Once my game was finished I decided to record a video of me playing through the entire prototype. I recorded a step-by-step playthrough of the Unity game using Fraps, and the video shows-off a variety of functionality and features found inside my game! From proof that all of my menus and buttons work correctly, to showing damage knockback and death in action, it all works well as evidence to support my development blog posts I previously wrote, showing how everything has come together into a mechanically deep prototype of my platformer game (and most importantly, it's evidence that the entire game works as intended without any glitches). The game also introduces most of the functionality in the first two levels (which the video proves), with the last one introducing floating spikeballs and merging together everything you know about the game playing beforehand into one hard level. Because of this some testers may not be able to finish the game due to a few spikes in difficulty near the end, but this video helps show the entire game in full just in-case someone really wanted to beat the game, but couldn't do it themselves. The game on the Uni PCs also have a slight case of screen-tearing every now and again, where sometimes a line or portion of the moving image doesn't match the motion of the game's visuals and looks jagged as a result. However this video also provides evidence that the game doesn't have any visual tearing when recording at home. Here is the video walkthrough I recorded, which I have uploaded onto Youtube for easy access and viewing without the need to download the video:

(Link: https://www.youtube.com/watch?v=oK_NzdVSxaQ)


I also changed my game a bit after adding some suggestions from the end-user review below (with various game improvements people suggested. Like a higher double jump that's now 1.5 times weaker than the main jump instead of 1.75 (which makes the later levels in the game much more manageable and forgiving), improved physics for optimisation/ smoother gameplay (like spikeballs now being marked as 'is trigger' to stop falling platforms from bouncing off them) and a timer that counts down to your death). So here's another, shorter walkthrough video that shows the higher jump, moving platform and timer in action with a much-improved version of Pippy The Bird:







End-user review:

In order to get a wider range of opinions towards my finished game, and not just my own, I decided to conduct an online survey using Google Forms to ask a few questions and gage how well received my game is overall. Essentially everyone will play through the game, and then afterwards click the link to my online survey and fill out a few questions on what they thought (link to the survey is available here: https://docs.google.com/forms/d/1KCGXBpYZV3uLMoeyFpU1C3zM7gU3H6x1AKn6qA38SS4/viewform). Because my game has always been planned to be an accessible, yet challenging casual game that anyone can pick and up and play, I asked various friends (online and offline) and family members within a very large age range that are both male and female to get a broad range of responses. In the end I managed to get 17 responses from lots of different people who I were with in person and also online. Here are the questions I asked them with the results I received just below each question:

Are you male or female?

Male1168.8%
Female531.3%

How old are you?

3-715.9%
8-1215.9%
13-17317.6%
18-21529.4%
22-26317.6%
27-31211.8%
32-3715.9%
38+15.9%

How often do you play video games in your average week?

Never211.8%
Rarely317.6%
1-3 hours a week211.8%
4-6 hours a week423.5%
7-10 hours a week211.8%
11-14 hours a week317.6%
15-18 hours a week00%
19-23 hours a week15.9%
24+ hours a week00%

On a scale of 1-5, how much did you enjoy playing the game?

115.9%
2211.8%
3423.5%
4847.1%
5211.8%

If the game prototype was expanded upon and released as a full game, would you buy it?










Yes, I would pre-order it.423.5%
I would buy it after release423.5%
I'd wait for it to go on sale741.2%
I wouldn't buy the game211.8%

Overall, do you have any suggestions or improvements to the game that you think would improve it (please type your answer below)?

Lovely game Adam. Was very fun!
Please make the the bird jump HIGHER!! The game plays smoothly like butter, but the bird could just have a little bit extra OOMPH in his jump.
Needs to come out on PS4. I love it.
you did a really good job of designing challenges within the rules of the game, which is the unappreciated art. The difficulty was right: not too easy, but still took several attempts to complete. The dialogue stuff was my favourite part, it gave it its own personality. 10/10 made me have a meltdown irl
Add multiplayer so we can play together at the same time like rayman adammm!!
It doesnt feel fluid. The jumping is really strange for how far you can slide and the game looks like something made in Scratch. Also the sign that said "haha" in the first level was fucked up. Plus those cacti blend into the background too well and it's hard to see them, and i dislike the 1-hit kill mechanic when you land on something. Overall it seems like a game that had quite a bit of time put into it, which it probably did. Not bad. Wouldnt play it again though.
The game was good, I enjoyed it, and the music, fucking great, I enjoyed the shit outta that. It was a little buggy with the platforms, where sometimes I would have to jump over a small invisible wall. Some higher quality sprites and backgrounds, and you got yourself something pretty good. Props to you for making something that I would never even attempt to make =)
The game's more fun than my entire life has been...
The game mechanics are well polished. But could be improved. Maybe make the bird jump higher?
The bird was cute! But please make the game have more animals. Loads of different colour toucans would be amazing! At the moment there's only one type.
Great game, actually quite enjoyed it, not usually that into platformers but in honesty this is as good as a lot of platformers I've played if you bump up the textures and general graphical parts a bit. (But obviously thats hardly even necessary now, you're a student). Only other issue is that occasionally knowing where to land etc. needs to be done on guessing alone, like there's no way I could know where some of the platforms in the final level were until I'd died falling past them. Personally I die a lot so it didn't matter anyway, so a timer to make people hurry up would be good. Thanks for making this fam
Really good game and I very-much enjoyed it, but the character could jump a bit higher. Or even just make the double jump not be so minimal in height! Double jump height should be higher (jumps in general should be higher) Should be some level of friction in the air so you slow down naturally when not holding forward, less friction than on the ground Passive hero is boring, add power ups or some form of attack, along with breakables that contain collectables Powers such as flight, glide, third jump, beak drill dive Even though its a demo, practice good level design, dont use leaps of faith Plan levels to be ran through quickly and smoothly if played by an experienced player, for replayablity/speed running, such as timing up projectile spawners and moving platforms Controls need a lot of work, maybe it was my controller but it was a hassle getting it to work with my 360 controller and mouse only menus is a bad idea, get em working with keyboard and ideally gamepad as well
I don't play many games- however I found it lots of fun!
The game offered me a temporary distraction through a form of escapism, from the chaos and hell that is my own existence. 10/10 would play again.
It's still better than AC:U at launch... (Gg though Adam, this is good stuff you've got here)
It was ok, there could have been a bit more to it, but its not a game for me but not too bad by any means either. The game has a few small bugs that should be fixed if it were to reach a final consumer release. When the player is knocked back, they are only pushed left, leading to insta-deaths when the player had two hit points. The controls are a unresponsive at times (getting stuck on a platform). The double jump mechanic as a game choice is interesting as it requires the user to master the timing, was not sure if it was intentional. Overall the mechanics of the game are good, the game was enjoyable as a small/prototype release, if think the game assets were more consistent and bugs were fixed the game would be a very good platformer. Good job.
improve art direction - make stage hazard more apparent -art design look to condensed -control are floaty but kinda acceptable with cliff hook and double jump -quite a lot of text to read, kinda kills the game's pacing -and call me dumb but it took me 3 tries to realise the cactus is a hazard, make it more apparent


Overall out of this sample size of 17 people, the results are actually fairly positive and I'm pleased to see such an overall good reaction form a broad range of people of different ages and genders. Although saying that, twice as many males took the survey than females, and most of the people who took the survey were teenagers and early adults, so gender bias towards a specific group of people is something to take into account here. However even though there is this unbalance, the results surprised me- in the fact that this large demographic was mostly positive towards the game, and everyone except 2 people said that they would buy it in some way. The comments for improvements were mostly positive, aside from the obvious joke ones, there are clearly people who enjoyed the game, and those who had improvements like:

Multiplayer (which was tested with a bit before, however it didn't work very well as the birds could jump on eachother, push everyone around and fell off  another person's head when the other moved. Plus the game is just designed with one person in mind), a better camera angle (and I do agree, as pointed out, a section in this last level requires the player to fall down, and it's tricky to see exactly where you're going to land. But this wouldn't take too much extra time to implement as the camera script is set to just follow the player's central position), fixing the damage so you don't instantly die when you jump and land on spikes (which was intentional at first, but now feels harsh on the player so I adjusted the code accordingly so you always take 2 hits to die), a timer (which I think is a good idea and something to add, since it'll count down and kill the player when it reaches 0, adding a sense of urgency) and better art design (as apparently it was hard to tell that the cacti were dangerous without the toucan explicitly saying it is, so in the future all of the dangerous objects need some way to 'stand 'out without being pointed out directly).

One of the most common suggestions as asked by a few people was to increase the bird's vertical jump height, even if it's just for the double jump. The game was designed with this in mind from the beginning, since Pippy has a very large horizontal jump and can reach quite far, but can't go very high. It matches the aesthetic of the fact that he's a bird, but it does go against various typical platformer game conventions and I can see why it was a bother for some people. However, remedying this is not as simple as increasing the value of the jump height in the player script, as the entire game's levels were built around Pippy's limited moveset and abilities, so even the simple act of making him jump higher could have disastrous consequences of players possibly reaching out of bounds areas they're not supposed to reach, or they could maybe skip sections of the game they were supposed to. In the end I slightly altered the code to match this feedback, where before the double jump was 1.75 times weaker than the regular jump, now it's 1.50. I feel that it's not worth the extensive testing it would require to remedy this small gameplay mechanic even further, so in my opinion it should stay as it is with only a small change, and it also gives this game an edge over other platformers out there like Mario and Sonic, in the fact it's all about stealth, strategy and planning your next move.

Lastly as a final note, this survey was incredibly helpful to conduct, and I've gotten a much greater understanding of what way to take the game next (with other honourable mentions being levels designed around speedrun tactics and Xbox 360 controller support), and also what can be improved if I ever made this into a full and finished game released to the public. But in it's current state Pippy The Bird is still a very well-received product that seems to have a great casual, and hardcore appeal (judging by the variety of hours my test subjects play games for).



Evaluation:

My game 'Pippy The Bird!' follows a lot of core professional games design techniques throughout, which both enhance the experience and make the game generally more enjoyable raising it to a very high standard. For example; the game has various gameplay mechanics inside of it that the user will need to learn, however these are slowly drip-fed to the player as they get introduced one at a time piece-by-piece, starting with the basics of movement and jumping at the very start of the game, to enemy Dinosaurs, falling platforms and floating spikeballs in tricky positions by the end of level 3. This was done to not overwhelm and confuse the player with such a huge amount of different gameplay fundamentals at once, but it also helps keep the gameplay fresh and interesting throughout the entire thing, as the gamer is always aware that something new is just around the corner to shake up everything they thought they once knew about the game, and it adds another layer of complexity and challenge to the level design to match the player's own skill level. The levels were also designed with this in mind, as the player must have been able to clear every obstacle thus far to get to any point in the game, and with that in mind I as designer were free to gradually increase the difficulty of the game while still being confident the player could keep up.

The game also demonstrates excellence at teaching the player these mechanics one at a time. And not just by the in-game tutorial messages (which do work well, often enhancing the learning process through entertainment, by teaching the player every gameplay mechanic through witty and comedic dialogue with the animal NPCs (non-playable characters). But it's a lot of text to take in throughout the whole game, and some people may just want to be left to their own devises when playing to figure things out and explore for themselves). Almost every gameplay mechanic in Pippy The Bird  is introduced in a 'safe space', where there's no immediate danger to the player and the user is allowed to freely toy around with the controls/ mechanics until they have a basic understanding of how it works. After that the difficulty can be ramped up slightly with confidence that the player knows how that mechanic works, which can then often pose a threat that increasingly gets tougher as the game goes forward (here's an example of this method of teaching that my game uses in action, which is shown below).


The first time the player encounters a falling platform near the end of level 2, which tumbles downwards if you stand on it for 0.5 seconds.
As you can see, the player experimented with this new discovery and it fell downwards. But it landed safely on the sturdy platform below it, a game object that the player has already encountered before. So the player has just witnessed this first-hand.
Now further on just after the first one, is another falling platform, this time over a bottomless pit. And because this is late into the game it's something that the player is highly likely to know that falling off the edge kills them. So they can see it'll fall downwards into the hole and plan how they will get over this platform accordingly.


If I were to create the game again I'd create the levels with a more mobile main character in mind with a higher jump (as suggested by the questionnaire answers) to add a more universal appeal and generally make the game appealing to look at and play. I also would make the levels larger and more explorable, with even more secrets and goodies to be found. Plus, the game does have a pretty large difficulty spike between the end of the second level and to the start of the third, which is something that can be remedied in a larger game as the levels can get tougher at a more gradual pace. But the game does have a lot of variety in both the mechanics I programmed into the game, to the things that Pippy will encounter on his adventure. But with the current and complex code in the game currently (using the latest version of Unity 5.3, with the latest APIs being incorporated like 'Scene Manager' showing professional practises), there are absolutely no Syntax or Logic errors in the Unity console. This also shows a good level of professional working practises, and this is evidence my code has undergone lots of debugging with rigorous testing to iron-out every issue.
To expand on this, I also added various wild and plant-life like Toucans and Frogs, and plants and trees, using royalty-free sprites sourced from OpenGameArt.org to populate this expansive world and make it feel more natural. Or else if the entire thing would be composed entirely of platforms, it would feel... uninteresting and generic. The extensive programming I did in the game like the Dinosaurs, falling platforms and spiked objects just couldn't carry the whole project (as engaging as they may be), there needs to be pretty eye-candy as decoration for the player to gaze at too.

But if this were to have a full-on retail release then I would also definitely create all of the assets myself, without having to use royalty-free ones. This would have the advantage of having the game being able to fit into one cohesive artstyle, whereas now the characters feature pixel-art designs but the locations are more cartoony. If everything were made by me as well then dangerous objects could be more defined, as it stands some dangerous things like the cacti in the game blend in with the environment too well, so having every dangerous object have a similar style or look would go a long way into improving the player's quality of life whilst playing. I also created my game from a completely blank Unity project without using any starting assets or downloading from he Asset Store, something that would be done if this were created into a full-game too. I did this is for multiple reasons: firstly it helps optimise the game by reducing the filesize and cutting out unnecessary padding to my game in files that may never be used, but it also demonstrates clearly that everything programmed and added into the game is my own work (aside from the royalty-free sounds and sprites used) and all the scripts, prefabs, materials, etc were created by me and tweaked/ coding by hand.


Overall though to conclude, I'm incredibly proud of the game I've managed to create, and it's definitely similar to what I set out to achieve (a fun, stealthy platformer game with cute characters, enjoyable gameplay and witty humour). The game managed to meet the deadline by being finished a week in advance (giving me time to finish my blog entries), due to good time management and doing a certain amount of work towards it every day (so one day for example I included the camera that follows you, and another I added the pause menu). It may have a few possible quality of life improvements that could have been worked on here and there (like having a higher jump, cutting back on the text to read and less slippery controls), but overall it's a solid product with quite a lot of content spread out between its three well-designed levels, that meets the criteria set for this programming assignment. It has plenty of replay-value to boot since it has a scoring system and easy to learn, hard to master mechanics. Pippy The Bird could be the start of something special.

Black and White Box Testing for my Prototype Game

Throughout the creation of my game I have performed a variety of methods for testing the game to see if it works as intended, and this involves both Black Box Testing (for functionality and seeing if everything works as intended) and White Box Testing (for the code's structure). Because I have so much functionality included in the game, as talked about in the development blog posts, there's a lot of testing and debugging involved in the game-making process to ensure everything is of a high-quality. These two methods work together to test the game from both the player's perspective to make sure they essentially are playing a working product with blackbox testing, whereas the whitebox testing organises everything 'behind the scenes' that is never normally seen in-game.

First I will talk about my Black Box Testing, which is designed for me to test if the game functions correctly throughout development and is constantly updated throughout the creation of my game (compared to White Box Testing which is performed when the code is finished), and this ensures each mechanic works as intended before I move on to including the next one. It doesn't really look at the code as a whole, rather the actions the code actually does. Here is my Black Box test-log I made for my own Unity game, that has been continuously updated and dated (with the date each post was typed) throughout the development of my game:

Black box test-log:

Date

Test No
Purpose of testing

Input

Expected output

Actual output

Additional comments

27/11/15
B1.1
Can the player make the bird perform an action depending on the key pressed?
Left arrow key
The bird should walk to the left and play the walking animation
The bird moves to the left and plays the animation
The bird has no friction unless the ground material object is applied to the trigger box of the ground object, as that contains the friction for movement

B1.2

Right arrow key
The bird should walk to the right and play the walking animation
The bird moves to the right and plays the animation
(See screenshot in player input blog post for photo evidence.)

B1.3

Stop pressing an arrow key
The bird slows down gradually and then stops, then plays the idle animation.
The bird slows down and plays the idle animation when it has fully stopped moving
The friction causes the bird to slightly slide forwards before it stops fully

B1.4

Spacebar
The bird should jump and play the jump animation, if the player presses spacebar again before you land perform a double jump
The bird is able to jump, double jump and play the jumping animation, but infinitely without ever having to land.
The bird can keep jumping infinitely through the air with no cooldown. Not intentional.

B1.5

Escape key
The game should bring up the pause menu and freeze the game in the background
The pause menu successfully pops up, and each button can be clicked on
The quit button doesn’t work in the editor, but when the game is exported as a build it will work fine
29/11/15
B2.0
The bird should be able to stand on platforms with a physics collider attached, and shouldn’t fall through out
Position the bird on top of a platform
The bird falls and lands on the ground, and it stops them falling any further
The bird is capable of standing on a platform

30/11/15
B1.4
Can the player make the bird perform an action depending on the key pressed? (Repeated test)
Space bar
The bird should jump and play the jump animation, if the player presses spacebar again before you land perform a double jump
The bird is able to jump, double jump and play the jumping animation, and they can only jump/ double jump once until they touch the ground again
As of 30/11/15 the infinite jumping it was fixed. Now the code for jumping and double jumping only works once and is reset once the bird hits the ground again. So they can’t just jump in the air forever (See screenshot in player input blog post for photo evidence.)
4/12/15
B3.0
Does the camera follow the bird around the level?
Move the bird off-screen
If the bird moves off-screen the camera should follow them (but still not move under the stage when the player falls, as there are boundaries below it)
The camera successfully follows the bird around the level, however it can follow them under the stage too breaking the immersion of the game
Fixed as of 6/12/15. The camera boundaries can be customised at any time in the camera’s settings
5/12/15
B4.0
Can the level restart if the bird falls down a hole?
Make bird fall off the stage
If the bird falls off a stage then the level should restart
When the bird falls down a hole the level restarts successfully
A huge invisible object with a simple collider is stretched under the whole level, so when the bird hits that restart the game
7/12/15
B3.0
Does the camera follow the bird around the level? (Repeated test)
Move the bird off-screen
If the bird moves off-screen the camera should follow them (but still not move under the stage when the player falls, as there are boundaries below it)
The camera successfully follows the bird around the level, and also stops following them when it gets to certain points, success!

12/12/15
B5.0
If the player collides with a dangerous object, does it cause them harm and show feedback/ affect the UI healthbar?
Collide with a dangerous object
If the player hits a spiky object, they will be knocked back, play the bird’s damage animation and take 1 point of damage while losing 1 point of health from their healthbar. After 5 points they should die and restart the level
If the bird hits the object from the side, they will successfully be knocked back, play the injured animation and take 1 point of damage. However if they jump on top of the dangerous object, they will die instantly unintentionally. Also the healthbar UI will not change and is bugged to a static image
The damage code is inside various game objects, from cacti, to spikes, fireballs and floating spikeballs
13/12/15
B5.0
If the player collides with a dangerous object, does it cause them harm and show feedback? (Repeated test)
Collide with a dangerous object
If the player hits a spiky object, they will be knocked back, play the bird’s damage animation and take 1 point of damage. After 2 points they should die and restart the level
If the bird hits the object from the side, they will successfully be knocked back, play the injured animation and take 1 point of damage. However if they jump on top of the dangerous object, they will die instantly.
Removed healthbar and reduced the bird’s health to 2 for balancing reasons, taking 5 hits made the game too easy. Still have a lingering issue with landing directly on spikes though
15/12/15
B5.0
If the player collides with a dangerous object, does it cause them harm and show feedback? (Repeated test)
Collide with a dangerous object
If the player hits a spiky object, they will be knocked back, play the bird’s damage animation and take 1 point of damage. After 2 points they should die and restart the level
If the bird hits the object both from the side and from above, they will successfully be knocked back, play the injured animation and take 1 point of damage.
Previously on the 12th and 13th the damage code was bugged, however the code was amended and now the player takes 1 point of damage from all angles (See screenshot in damage blog post for photo evidence.)
17/12/15
B6.0
Can the game switch to the next level when required?
Move the bird near a door (marked at the end of a level) and press the E key
The game should load the next scene and spawn the player into the new level when the bird collides with the door game object and presses E. It also draws instruction text onto the screen, and changes the text when the bird moves away again
The next level is successfully loaded after the player is both touching the door and pressing E, and the text is drawn onto the screen too
The door code is outdated and not recommended to use as of Unity 5.3 (it was implemented before the update), so it will need to be changed later-on, with another repeated test that I must also perform.

(I did another test on 07/01/16 late on, as I downgraded my Unity version back to 5.1)
19/12/15
B7.0
Testing to see if the collectable coins function correctly
Make the bird run into and collect a coin
The coin should destroy itself, play a sound and add 1 point to the score at the top of the screen
The coin successfully destroys itself, play a sound and add 1 point to the score at the top of the screen
Your score is also saved and carries over between levels in conjunction with the game’s doors. But if you die in a scene your score resets back to what it was at the start of that stage.
22/12/15
B8.1
Do the enemy dinosaurs have working AI?
Move the bird within a certain distance of a sleeping dinosaur
Wh en the bird gets close to the dinosaur, it should play the ‘waking up’ animation look either left or right towards the player. If the player leaves again the dinosaur goes back to sleep.
W hen the bird gets close to the dinosaur, it plays the ‘waking up’ animation look either left or right towards the player. If the player leaves again the dinosaur goes back to sleep.
Multiple dinosaurs originally spawned at the same position, but were quickly changed without the need of modifying code as I’d included a set position in-game in the dinosaur’s animation window

B8.2

Make the bird stay close to the dinosaur, within that set distance required for it to wake up
If the bird as visible to the dinosaur for a certain amount of time, it shoots a fireball towards the player’s position that damages them in the same way as spikes do upon contact
The dinosaur never instantiates a fireball, and doesn’t work as intended
The dinosaur plays the waking animation just fine, but never attempts to attack the player
26/12/15
B6.0
Can the game switch to the next level when required? (Repeated test)
Move the bird near a door (marked at the end of a level) and press the E key
The game should load the next scene and spawn the player into the new level when the bird collides with the door game object and presses E. It also draws instruction text onto the screen, and changes the text when the bird moves away again
The next level is successfully loaded after the player is both touching the door and pressing E, and the text is drawn onto the screen too
The code was successfully re-written from loading ‘load level’ to ‘scene manager’, it has all been tested again and works the same way as before, only loading times are faster now too!

(I did another test later on as I downgraded my Unity version to 5.1)
28/12/15
B8.2
Do the enemy dinosaurs have AI that is still broken? (Repeated test)
Make the bird stay close to the dinosaur, within that set distance required for it to wake up
If the bird as visible to the dinosaur for a certain amount of time, it shoots a fireball towards the player’s position that damages them in the same way as spikes do upon contact
The dinosaur still does not instantiate a fireball upon waking up
Modified the dinosaur’s code to no avail, also changed a lot of its animation properties and settings
29/12/15
B8.2
Do the enemy dinosaurs have working AI? (Repeated test)
Make the bird stay close to the dinosaur, within that set distance required for it to wake up
If the bird as visible to the dinosaur for a certain amount of time, it shoots a fireball towards the player’s position that damages them in the same way as spikes do upon contact
The dinosaur now successfully attacks the player. When you get nearby it will wait for a set amount of time and shoot a fireball at you, and if you’re hit it will deal 1 point of damage, knock you back and play the bird’s damage animation
After days of modifying code, the dinosaur’s AI finally works as intended. This needed to be one of the most tweaked scripts of my game to get it to function properly, with three different test logs with different code and properties included each time (See screenshot in AI blog post for photo evidence.)
31/12/15
B9.1
Does sound play in my game?
Load the game
When the game loads, play the looping background music
The background music plays correctly when the game begins
The music clip is attached to a black game object inside an audio source component, and is set to play at the start of the game and loop forever (See screenshot in sound blog post for photo evidence.)

B9.2

Press spacebar
When the bird jumps with space, play the jump sound. Also play the jump sound when the player double jumps.
The sound plays correctly when the bird jumps


B9.3

Make the bird collide with a coin
When the player collects a coin, play the corresponding sound
The correct sound plays when a coin is collided with

07/01/16
B10.0
Does the game have a 3-minute timer that counts down?
Load the game
The timer should count down from 180 seconds, and when it reaches 0 kill the bird and restart the game
The timer counts down as planned and resets the stage when it reaches 0
The time counts in milliseconds, but is only visible in seconds to the player as to not make the HUD too convoluted (See screenshot in score blog post for photo evidence.)
07/01/16
B6.0
Can the game switch to the next level when required? (Repeated test)
Move the bird near a door (marked at the end of a level) and press the E key
The game should load the next scene and spawn the player into the new level when the bird collides with the door game object and presses E. It also draws instruction text onto the screen, and changes the text when the bird moves away again
The next level is successfully loaded after the player is both touching the door and pressing E, and the text is drawn onto the screen too
My game’s Unity version was downgraded back to 5.1 since that’s what version of Unity the PCs at Uni have. So I rewrote the code to use ‘load level’ again.






Now for White Box Testing. Before I started making the game I created three UML diagrams (shown in the planning blog post) to show the code's structure and layout. The code itself has changed since then with those initial plans, but it still follows the same basic structure and layout since the game's code itself was based on those diagrams. This test-log below shows examples of me testing various different scripts and functions within my code, to see if they work as intended and what their output is.

White box test-log:

Date

Test No
Class

Function
Test purpose
Input

Expected output

Actual output

Additional comments

27/11/15
W1.1
Player
Void Update ()
Handles the keypresses of the player
Horizontal
Flip the bird left when left is pressed
The bird flips left


W1.2



Horizontal
Flip the bird right when right is pressed
The bird flips right


W1.3



Jump
Apply a force below the bird and move it up. Checks to see if you’re touching the ground before jumping is allowed again.
The bird jumps, and also can double jumps again. Checks to see if you’re touching the ground before jumping is allowed again. Also as of 31/12/15 the bird makes a jumping sound.
Can only jump when the bird touches the ground, and the grounded variable is set to true
28/11/15
W2.1
Player
Void FixedUpdate ()
Handles the keypresses of the player
Horizontal
Apply a force to the right of the bird and move it
The bird moves right at a set speed






Horizontal
Apply a force to the left of the bird and move it
The bird moves left at a set speed


W2.2



Release horizontal
Stop applying the force to the bird and it slows down due to friction
The bird gradually slows down and then stops

7/12/15
W3.0
CameraFollow
Void FixedUpdate ()
Code that makes the main camera track the player’s position and follows the game object whenever it moves
Transform.position. x, player.transform.
position.x
Whenever the player moves left or right, make the camera follow their position too
The camera  follows the player in a smooth motion
The camera has set boundaries that are assigned in the game object’s inspector view, it prevents it from moving out of bounds and stops the player from seeing outside of the level
12/12/15
W4.0
Player
Void Die ()
Function is called when the player dies
Col.gameobject.tag == “Bullet”
Restart the loaded scene and kill the bird
The level successfully restarts

13/12/15
W5.1
Player
Void OnTriggerEnter2D ()
Code is run depending on the tagged object that is collided with
Col.gameobject.tag == “Spike” at 2 health
Knockback the player, deal 1 damage and play the damage animation
The bird gets knocked back, receives 1 damage and plays the damage animation
Code that runs depending on the object the bird collides with

W5.2



Col.gameobject.tag == “Spike” (or “Bullet”)  at 1 health
Reference the ‘Die’ function. Restart the level and kill he bird
The level restarts as intended


W5.3



Col.gameobject.tag == “Pit”
Reference the ‘Die’ function. Restart the level and kill he bird regardless of your health
The level restarts as intended

19/12/15
W5.4



Col.gameobject.tag == “Coin”
Add 1 point to the score in the GameMaster script, destroy the coin object and play the coin collection sound
The coin gets collected as intended

19/12/15
W6.1
GameMaster
Void Start ()
If you’re in the first level of the game, set the value of the score to 0
SceneManager.
GetActiveScene
().buildIndex == 1
When you start the first level, the displayed score will be 0
The score is successfully 0 when the first level starts
Linked to the coin collection code above

W6.2

Void Update()
Display the text ‘Points:’, that changes whenever a coin is obtained
gm.points += 1; (in Player script)
The score goes up by 1 every time a coin is collided with
The score displays at the top-right of the screen, and increases by 1 for every coin

20/12/15
W7.1
Door
void OnTriggerStay2D (Collider2D col)
Test to see if the door object’s code works
(Input.GetKeyDown ("e"))
When the player collides with the door draw text on the screen, and when they press E inside the collision box, advance to the next scene, and save the current score
The next level loads after pressing E. Score carries over. The text is drawn on the screen when the bird collides with the door
There are four different doors and scripts for four levels of the game

W7.2
Door1
void OnTriggerStay2D (Collider2D col)
Test to see if the door object’s code works
(Input.GetKeyDown ("e"))
When the player collides with the door draw text on the screen, and when they press E inside the collision box, advance to the next scene, and save the current score
The next level loads after pressing E. Score carries over. The text is drawn on the screen when the bird collides with the door


W7.3
Door2
void OnTriggerStay2D (Collider2D col)
Test to see if the door object’s code works
(Input.GetKeyDown ("e"))
When the player collides with the door draw text on the screen, and when they press E inside the collision box, advance to the next scene, and save the current score
The next level loads after pressing E. Score carries over. The text is drawn on the screen when the bird collides with the door


W7.4
Door3
void OnTriggerStay2D (Collider2D col)
Test to see if the door object’s code works
(Input.GetKeyDown ("e"))
When the player collides with the door draw text on the screen, and when they press E inside the collision box, advance to the next scene, and save the current score
The next level loads after pressing E. Score carries over. The text is drawn on the screen when the bird collides with the door

22/12/15
W8.1
DinoTurret
Void Update ()
Used to see if the Dinosaur should turn left or right
target.transform. position.x > transform.position.x
If the bird’s x (horizontal) position is greater than the dino’s, make them face right to match the bird’s position



W8.2



target.transform. position.x < transform.position.x
If the bird’s x (horizontal) position is less than the dino’s, make them face right to match the bird’s position



W8.3

Void RangeCheck ()
Used to see if the Dino’s AI behaviour should  change depending on the player’s distance
if(distance < wakeRange)
If the bird’s position is smaller than the dino’s (they’re close by), wake them up
The dinosaur wakes up when the bird comes within a set range
When the dinosaur is set to awake, then it can start attacking the player

W8.4



if(distance > wakeRange)
If the bird’s position is greater than the dino’s (they’re further away), keep sleeping
The dinosaur goes to sleep when the bird moves a certain distance away


W8.5

Public Void Attack ()
Code that handles the dinosaur’s attacking. When a bullet should be instantiated and in what direction
if (!attackingRight)
If the dinosaur Is facing left towards the player, attack to the left (the ! means the opposite, so not facing right means it must be left). Spawns a fireball towards the player that damages them upon contact using the previous damage code
The dinosaur faces the player and shoots a fireball at them every 1.8 seconds. If you’re hit, the bird takes damage, knockback and plays the damage animation
The dinosaur stops firing if the player moves away again





if (attackingRight)
If the dinosaur Is facing right towards the player, attack to the right). Spawns a fireball towards the player that damages them upon contact using the previous damage code
The dinosaur faces the player and shoots a fireball at them every 1.8 seconds. If you’re hit, the bird takes damage, knockback and plays the damage animation

31/12/15
W9.1
PauseMenu
Void Start ()
Code that disables the pause menu on startup
PauseUI.SetActive (false);
Hides the menu when the game first loads
The pause menu does not appear when the game first starts
You don’t want the game to instantly pause when you start the game, or else it’ll block the screen!
01/01/15
W10.1

Void Update ()
Code that makes the core of the pause menu function
(Input.GetButton
Down ("Pause")
When the player presses Escape during gameplay, pause the game by bringing up the menu and stopping the game
The menu loads up as intended when you press Esc
A toggle-enabled pause menu using two if statements to switch between states

W10.2



(Input.GetButton
Down ("Pause")
When the player presses Escape while already paused, unpause the game and unfreeze the delta time
The menu closes correctly when Esc is clicked

02/01/16
W11.1

Public Void Continue()
Handles the function for the continue button
Continue button clicked
When the player presses continue during while paused, unpause the game and unfreeze the delta time
The game unpauses and continues as normal when this button is clicked
Each of the 4 pause menu buttons have their own separate functions

W11.2

Public Void Restart()
Handles the function for the restart button
Restart button clicked
Reloads the level that is currently loaded to restart the game
When restart is pressed on the current level restarts


W11.3

Public Void MainMenu()
Handles the function for the main menu button
Main menu button clicked
Uses LoadLevel to load the main menu’s scene
Takes you to the main menu scene when clicked as intended


W11.4

Public Void Quit()
Handles the function for the quit button
Quit button clicked
Simply closes the Unity application
Clicking the button in the built version of the game (not in-editor) exits the application

03/01/16
W12.1
MainMenuButtons
Void Start()
Handles the help box toggle when the game loads
infoOpen = false;
Hide the help section of the main menu when the game first loads
The main menu hides as intended upon the game’s bootup
We want to hide the help-box at first as the text box is rather large, and covers a portion of the screen where most players may only want to read it once and never need to view it again
04/01/16
W13.1

Public Void StartGame()
Handles the function for the start button
Start button clicked
Loads the scene for the first level in the game
When you click the button, it loads the first level
Like the pause menu, each button has their own function that reacts on click

W13.2

Public Void TestLevel()
Handles the function for the test level button
Test level button clicked
Similar to the start button, only loads the level that was used for testing the game’s mechanics instead
Loads the test level successfully on-click


W13.3

Public Void InfoPanel()
Handles the function for the how to play button
How to play button clicked
On button press at the start of the game, it should unhide the big text box that explains the controls to the player
When the button’s clicked the textbox is successfully toggled on
Two tests for this button, one to see if the help box appears, and one to see if it hides again

W13.4




On button press when the help box is already on the screen, it should hide the big text box that explains the controls to the player out of view
When the button is clicked for a second time, the hint box is hidden again


W13.5

Public Void Quit()
Handles the function for the quit button




07/01/16
W14.1
GameMaster
Void Update()
Decides when the timer should count down, and what happens when it reaches 0
if (timer > 0.1)
If the timer value is greater than 0.1, continue counting down from 180 seconds
The timer counts down for three minutes as intended when the game loads
Uses two if statements to make a choice, whether or not the timer is above or below a certain value and what to do accordingly

W14.2



if (timer < 0.1)
If the timer value is less than 0.1, kill the bird and restart the level
When the timer reaches 0 (from whatever value it started at), the level restarts successfully