|||

back

August 9th 2024

Ball Game

Task introduction

A basic game programming framework has been developed following a series of task and implementations from Studio 6 Exercies. Now with the basic framework complete it was time to implement a basic ball game.

The idea of the game is to allow the player to control the grey ball with their mouse. In the game there are also two extra balls "good" balls which is green and spawn at the top and "bad" balls that are red and spawn at the bottom. When the player collides with a green ball, the player grows in size and vice versa, when the player collides with a red ball they will shrink in size.

Demo

Ball Game Demo

You can see that once I click spawn good balls they all spawn at the top and when I collide into them then I start to grow. Once I click spawn bad balls, the red balls spawn at the bottom of the screen and when I collide with then I begin to shrink.

For the purposes of developing and testing I set a limit to the minimum and maximum size the player can grow or shrink. I also made it grow and shrink by 0.05 each time to make it more noticeable.