In Good Boy V2 I had a basket full of balls for the player to use if they needed a top-up. V2 was a prototype for PC, so I was trying to give an impression of what the final game might look like, with not much thought on optimisation. The basket was full of balls, and although I reduced the poly-count, it was still pretty high and it could’ve caused issues if I had too many in the environment.
When I decided to move Good Boy to mobile, I knew this would be one of the most important things I needed to optimise. I used projection to create a 3D looking render of the balls to create a normal map. It did look great until looking at the texture from certain angles, where it would reveal itself to be a flat texture.
I tried to solve this by adding a few balls sticking out from the surface, and it did give it a more 3D look.
I found it unlikely that the baskets would be full of the same-coloured ball, so I rendered another texture with the colours of the balls, to put onto the material. This sorted the problem I had with it looking less 3D from certain angles.
The video above shows that when the player can collect a ball, the lid of the ball basket will open while the human is standing next to it. It only won’t open if the player already has a ball.
Only one ball is ever in play at a time, so if the dog is waiting for the return command after picking up the ball, and the player collects one from the ball basket, the dog will return to his idle state, forgetting about the ball he collected. This is to prevent players from having loads of balls in the environment and potentially causing stability issues on slower devices. My guess is it would take hundreds or even thousands to do this, but I’d rather not risk it.
Something I’ve been wondering is the colour of the ball. I like to give players options for customisation, and my thought was letting them choose what colour ball they have. Now the ball basket has multiple coloured balls, this would make more sense for the ball colour to be random. My plan is to have balls the player can unlock, and by default the ball will be a random colour, but if the player has unlocked a certain ball they can select that to use every time.