- Organising folders
- Naming objects in the scene appropriately
- Naming the classes appropriately
- Naming the variables and functions appropriately
- Improving the code so that the prototypes' performance is enhanced
- Adding comments to the code
- Building the prototypes for a PC so that they can be played using a computer
28 April 2015
Polish time
Having reached the point, where after having gone through iterations, all three prototypes have become easy to learn and difficult to master, I am going to start polishing them. Since my dissertation puts a high focus on coding (that's what I want to be marked on), polishing will be mostly code related. Polishing will include:
25 April 2015
C# I've learned from Square Follow
Just like the previous prototypes - Square Follow has taught me some new C# commands.
Drag input:
//when using mouse
Vector3 touchPos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
// get the current position of the player GameObject
Vector3 originalPos = this.transform.position;
// replace the x coordinate with the x of touched pos.
originalPos.x = touchPos.x;
// set the player position to the modified one
this.transform.position = originalPos;
Adding a highscore:
public int score;
public int highscore;
//retrieve highscore
highscore = PlayerPrefs.GetInt("High Score");
//set new highscore
if(score > highscore){
highscore = score;
PlayerPrefs.SetInt("High Score", highscore);
}
Adding a restart button:
if(GUI.Button(new Rect((Screen.width / 2) - 160,(Screen.height / 2) - 40, 320, 80), "Again?")) {
Application.LoadLevel(0);
}
I also learnt more about controlling the font size, text allignment etc. through modifying skins:
Drag input:
//when using mouse
Vector3 touchPos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
// get the current position of the player GameObject
Vector3 originalPos = this.transform.position;
// replace the x coordinate with the x of touched pos.
originalPos.x = touchPos.x;
// set the player position to the modified one
this.transform.position = originalPos;
Adding a highscore:
public int score;
public int highscore;
//retrieve highscore
highscore = PlayerPrefs.GetInt("High Score");
//set new highscore
if(score > highscore){
highscore = score;
PlayerPrefs.SetInt("High Score", highscore);
}
Adding a restart button:
if(GUI.Button(new Rect((Screen.width / 2) - 160,(Screen.height / 2) - 40, 320, 80), "Again?")) {
Application.LoadLevel(0);
}
I also learnt more about controlling the font size, text allignment etc. through modifying skins:

22 April 2015
Playtesting Square Follow - Part 2
This week once more I asked a number of people to playtest Square Follow and let me know if the game has improved since last time.
Here are the results:
Adding tuning was a very good iteration, as lower skilled players could finally play without being frustrated that the game is too difficult from the start, whereas higher skilled players after reaching a certain score were finding the game challenging enough that they were eventually getting defeated by it. This resulted in the game proving addicting to differently skilled players.
The feedback results prove that in player's eyes Square Follow is now easy to learn, and difficult to master.
This means that I have reached my goal and Square Follow needs no further iterations. Before I write any conclusions regarding this dissertation, I will be spending the remaining two weeks on improving the performance of all the prototypes I created by improving their code.
As usual I'll be posting about these improvements in here.
Here are the results:

The feedback results prove that in player's eyes Square Follow is now easy to learn, and difficult to master.
This means that I have reached my goal and Square Follow needs no further iterations. Before I write any conclusions regarding this dissertation, I will be spending the remaining two weeks on improving the performance of all the prototypes I created by improving their code.
As usual I'll be posting about these improvements in here.
19 April 2015
Adding a restart button
As mentioned in my previous post First Square Follow feedback adding a restart button will improve user friendliness in a way so that players won't accidentally skip their score when the game is over.
To add a working button quickly and easily all I had to do was return to the OnGui function, and add the following piece of code when the game is over:
The if statement automatically adds a click event listener which allows the button to trigger the function once the player presses it, and then there's the positioning and what text the button will say, in this case 'Again?'.
This is what the button (and the earlier this month mentioned highscore) look like in practice:
Tomorrow I'll get my first wave of playtesters to try the updated version of Square Follow.
To add a working button quickly and easily all I had to do was return to the OnGui function, and add the following piece of code when the game is over:

This is what the button (and the earlier this month mentioned highscore) look like in practice:
16 April 2015
First Square Follow feedback
I've been gathering a number of people lately to playtest Square Follow, but before I show the final results, I'll wait until I get more people next week when everybody's back from Easter holidays.
Anyway one feedback I received I thought I'm going to share here because I find it quite important.
It isn't related to the game itself, but it's more about user experience. The way the game works at the moment, is that when the player loses the game, they receive the 'Again?' message to encourage them to try again, and once they tap the screen the game restarts. As this happens the score resets back to zero so that the player can generate a new score again.
The problem with that is that in the heat of the moment, when players tap the screen repeatedly, they may miss out on the fact they lost and carry on tapping, resulting in restarting the game, without them seeing what their final score was. Although this was the case with only one of my playtesters, I can see it causing a lot of frustration if it happens to others, so I came up with a solution that should fix this.
I should add a restart button.
That way players will need to touch the screen in a specific place, in order to restart the game and reset the score, as opposed to click anywhere on stage to let it happen.
I will code this new feature in by this weekend.
Anyway one feedback I received I thought I'm going to share here because I find it quite important.
It isn't related to the game itself, but it's more about user experience. The way the game works at the moment, is that when the player loses the game, they receive the 'Again?' message to encourage them to try again, and once they tap the screen the game restarts. As this happens the score resets back to zero so that the player can generate a new score again.
The problem with that is that in the heat of the moment, when players tap the screen repeatedly, they may miss out on the fact they lost and carry on tapping, resulting in restarting the game, without them seeing what their final score was. Although this was the case with only one of my playtesters, I can see it causing a lot of frustration if it happens to others, so I came up with a solution that should fix this.
I should add a restart button.
That way players will need to touch the screen in a specific place, in order to restart the game and reset the score, as opposed to click anywhere on stage to let it happen.
I will code this new feature in by this weekend.
12 April 2015
Adding a highscore
It's a no brainer that every game involving a score should have a highscore to challenge the player to beat it. Particularly with my prototypes, where the score is the only way to tell how well the player has done, a highscore is indispensable.
Having said that I've done a bit of research to find out how to save a variable even after the application is closed and then re-opened which would enable to save a highscore.
PlayerPrefs.SetInt("variableName", variableName);
and:
PlayerPrefs.GetInt("variableName");
is what I needed. SetInt remembers a variable whereas GetInt retrieves it.
Here's the updated Square code where I put them:
Now it is only a matter of placing the highscore textfield in the top right corner and leave it there for players to compare with their score.
References:
How to save a progress by user with diferent users [ONLINE] Available at: http://answers.unity3d.com/questions/201731/how-to-save-a-progress-by-user-with-diferent-users.html [Accessed 12th April 2015]
Unity Documentation: PlayerPrefs.SetInt[ONLINE] Available at: http://docs.unity3d.com/ScriptReference/PlayerPrefs.SetInt.html [Accessed 12th April 2015]
Having said that I've done a bit of research to find out how to save a variable even after the application is closed and then re-opened which would enable to save a highscore.
PlayerPrefs.SetInt("variableName", variableName);
and:
PlayerPrefs.GetInt("variableName");
is what I needed. SetInt remembers a variable whereas GetInt retrieves it.
Here's the updated Square code where I put them:

References:
How to save a progress by user with diferent users [ONLINE] Available at: http://answers.unity3d.com/questions/201731/how-to-save-a-progress-by-user-with-diferent-users.html [Accessed 12th April 2015]
Unity Documentation: PlayerPrefs.SetInt[ONLINE] Available at: http://docs.unity3d.com/ScriptReference/PlayerPrefs.SetInt.html [Accessed 12th April 2015]
5 April 2015
Iterating Square Follow
To make Square Follow playable for lower skilled players, and challenging for those who are good at twitch based games, I decided to introduce a difficulty curve and increase the collectable spawn rate depending on the score. Here is the updated code:
I will be checking if this improvement has made my last prototype a better, more addicting to a wider audience game, by performing one more playtesting process. Because of Easter holidays, I will probably need to wait for 2 weeks before everyone's back in order to do so.

Subscribe to:
Posts (Atom)