This is the second part of my latest development log for my little indie game The Ball. For the first part, please click here
One new feature that I added to the game is the ability to let the player change the colour of the ball and trail in the options screen. The way I did this for the ball was that I used a plain white version of the ball texture as a base sprite and created a BallColor script where I used the colour property of the ball game object’s Sprite Renderer component to tint the ball’s colour in game programmatically. For the trail, I did something similar but changed the colour using the emissive colour property of the trail renderer component attached to a child of my ball game object. At the moment however, the player is restricted to 7 preset colours (coincidentally the colours of the rainbow) although this means that they have about 49 different ball and trail combinations to choose from. In the future though, I may possibly implement a colour wheel of some sort to replace these preset values and give the players some flexibility (once I figure out a cheap and effective way to store array values in Unity’s player preferences).
I also added some lighting effects to the game by switching the materials of all of my in-game (non-UI) textures to one that uses a diffuse shader (so that they would be affected by any light source) and attached an empty game object with a light component as a child of my ball game object. In the beginning, I set the colour of the light to white at first but later on I changed it so that it would match the current colour of the ball instead (giving it some sort of neon like effect). To make the lighting stand out a bit more, I also changed the colour of the background in game from cream to a more neutral grey.
As I mentioned previously in the last part of this progress log, I created some coin objects that the player can collect for extra points in the game. Since the player now has more than one way to earn points in the game (either by surviving as long as possible or collecting coins), I adjusted the scoring system so that coins are now worth 5 points in the game and changed the score text in the background to now display the number of seconds the player has lasted in this game session instead. I also implemented a bonus multiplier based on the current difficulty of the game in order to encourage more skilled players to play on harder difficulties to get more higher scores.
I also implemented some video ads in the game using the Unity Ads SDK (due to its ease of use and obvious integration with the Unity game engine itself) although for playtesting purposes, I’ve currently disabled ads in the game. Originally I was planning to release the game as a free to play title with my revenue coming from either ads or in app purchases but now I’m considering the possibility of releasing it as a premium title (with a small price tag) instead so chances are I may need ads in my game in the end.
Using my somewhat limited art skills, I also created a possible logo for the game using Inkscape going for a copper design at first but then later changing it into a more cobalt blue instead.
At the suggestion of a friend, I also implemented some parallax scrolling effects into the game by creating a script to randomly spawn some bubble game objects of different sizes (using the same texture I used for the player’s main ball game object) which move at different speeds depending on how far in the background they’re in to create a somewhat basic illusion of depth. I also implemented some basic object pooling into the game to improve performance since the game is constantly instantiating a lot of object over time. In addition, for extra visual effect, I created a script to change the colour of the background bubble objects between two random values over time (in a manner similar to how I changed the colour for the main ball object) using linear interpolation.
Finally, I added some social features to the game. When I went to the Develop conference in July, I met some people at GameSparks who introduced me to their backend as a service solution (I also demoed my game to them as well). I was so impressed by their platform’s ease of use as well as setup costs that I decided to use their services to handle some of the backend stuff for my game (namely online high score leaderboards at the moment). Originally I planned on having the players log into the service via Facebook or Twitter along with a third anonymous device login option which ties game data into the device that they’re currently playing on but unfortunately there were some problems where the game was unable to remember that the Facebook authentication so I ended up having only the device login option for now (It turns out that the problem was due to a small bug in Facebook’s Unity SDK which was eventually patched a few week ago so I’ll be fixing this very soon). In addition, I also implemented the ability to let players using the anonymous device login option change their display name on the leaderboard (By default, the display name is “Anonymous”).
I also integrated Unity’s Everyplay service into the game as well. For those of you that don’t know, Everyplay is a social video replay sharing service which seems perfect for a small simple arcade style game such as mine already. Since the service only works on certain platforms (namely iOS 5+ and Android 4.1+), for unsupported devices I created a fallback option (at least for Android devices since I have no Mac to make iOS builds on) which lets players share their score to their preferred social networks in text form.
As I mentioned before in the previous part of this progress log, the game runs pretty well on a variety of different device form factors but however, on some devices there seems to be a couple of strange rendering issues (particularly with scrolling text). At the moment the problem only seems to occur on my HP Slate 10 HD tablet running Android 4.2 and not on any other devices I tested it on such as an old Xperia Play running Android 2.3 and my brother’s Samsung Galaxy Note 4 running Android 5.0 but unfortunately I don’t have any other Android tablets on me to check if it’s just a tablet problem or the HP tablet itself (the problem wasn’t as bad on Unity 5.1 but since the 5.2 update it seems to have gotten worse).
Thank you for taking the time to read the second part of this progress log and I hope you will all look forward to the next one soon. Also, as I completely forgot to mention this in the last part of this progress log, I recently created a Facebook page for all my indie development stuff. Whilst I will still be using my Twitter for quick progress updates as well as this blog for more detailed logs, I will also try to post some updates on my new Facebook page on a somewhat regularly so I would appreciate it if you give my page a visit and give it a like.